forked from ArdanaLabs/ardana-dollar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
106 lines (97 loc) · 5.79 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
description = "ardana-dollar";
inputs.haskell-nix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskell-nix/nixpkgs-unstable";
inputs.haskell-nix.inputs.nixpkgs.follows = "haskell-nix/nixpkgs-2105";
inputs.plutus.url = "github:input-output-hk/plutus"; # used for libsodium-vrf
inputs = {
};
outputs = { self, nixpkgs, haskell-nix, plutus}:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
perSystem = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = system: nixpkgs.legacyPackages.${system}.appendOverlays [ haskell-nix.overlay ]; inherit (haskell-nix) config ;
projectFor = system:
let
deferPluginErrors = true;
pkgs = nixpkgsFor system;
in
(nixpkgsFor system).haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc8107";
projectFileName = "cabal.project";
modules = [{
packages = {
marlowe.flags.defer-plugin-errors = deferPluginErrors;
plutus-use-cases.flags.defer-plugin-errors = deferPluginErrors;
plutus-ledger.flags.defer-plugin-errors = deferPluginErrors;
plutus-contract.flags.defer-plugin-errors = deferPluginErrors;
cardano-crypto-praos.components.library.pkgconfig =
nixpkgs.lib.mkForce [ [ (import plutus { inherit system; }).pkgs.libsodium-vrf ] ];
cardano-crypto-class.components.library.pkgconfig =
nixpkgs.lib.mkForce [ [ (import plutus { inherit system; }).pkgs.libsodium-vrf ] ];
};
}];
shell = {
withHoogle = true;
# We use the ones from Nixpkgs, since they are cached reliably.
# Eventually we will probably want to build these with haskell.nix.
nativeBuildInputs = [ pkgs.cabal-install pkgs.hlint pkgs.haskellPackages.fourmolu ];
};
sha256map = {
"https://github.com/input-output-hk/plutus.git"."3f089ccf0ca746b399c99afe51e063b0640af547"
= "BhGQPiCv4UxVs0XEdMMddaNWiztmkoeJotpW/lrtqNs=";
"https://github.com/input-output-hk/plutus-apps.git"."404af7ac3e27ebcb218c05f79d9a70ca966407c9"
= "+T9TGzHEzyfixBysxLwy5VWVrL5xqKF5pcbRlHQr+wI=";
"https://github.com/Quid2/flat.git"."ee59880f47ab835dbd73bea0847dab7869fc20d8"
= "lRFND+ZnZvAph6ZYkr9wl9VAx41pb3uSFP8Wc7idP9M=";
"https://github.com/input-output-hk/purescript-bridge.git"."366fc70b341e2633f3ad0158a577d52e1cd2b138"
= "paaId4GJ9/Z5LstYfakiCJZ2p9Q5NMHXdXUx5rTPQKI=";
"https://github.com/input-output-hk/servant-purescript.git"."ebea59c7bdfc0338d83fca772b9a57e28560bcde"
= "VkM9Q2XkDEnQh6khptoIjQ9xW7Fc2wsOJ4vPYDzBTD4=";
"https://github.com/input-output-hk/cardano-crypto.git"."07397f0e50da97eaa0575d93bee7ac4b2b2576ec"
= "oxIOVlgm07FAEmgGRF1C2me9TXqVxQulEOcJ22zpTRs=";
"https://github.com/input-output-hk/cardano-base"."4ea7e2d927c9a7f78ddc69738409a5827ab66b98"
= "zbjq43Bnhv1/LhJCFlI8gdd61dGvVlkEa6wkCvLqEFg=";
"https://github.com/input-output-hk/cardano-prelude"."fd773f7a58412131512b9f694ab95653ac430852"
= "BtbT5UxOAADvQD4qTPNrGfnjQNgbYNO4EAJwH2ZsTQo=";
"https://github.com/input-output-hk/cardano-addresses"."d2f86caa085402a953920c6714a0de6a50b655ec"
= "XgXQKJHRKAFwIjONh19D/gKE0ARlhMXXcV74eZpd0lw=";
"https://github.com/j-mueller/cardano-wallet"."6be73ab852c0592713dfe78218856d4a8a0ee69e"
= "5IZuqlE/4aGH3TEuGYQsZwOpI/Q7DYzJ4q3stuqGpWc=";
"https://github.com/input-output-hk/ouroboros-network"."1f4973f36f689d6da75b5d351fb124d66ef1057d"
= "lwTgyoZBQAaU6Sh7BouGJGUvK1tSVrWhJP63v7MpwKA=";
"https://github.com/input-output-hk/iohk-monitoring-framework"."46f994e216a1f8b36fe4669b47b2a7011b0e153c"
= "QE3QRpIHIABm+qCP/wP4epbUx0JmSJ9BMePqWEd3iMY=";
"https://github.com/input-output-hk/cardano-ledger-specs"."bf008ce028751cae9fb0b53c3bef20f07c06e333"
= "HTPOmVOXgBD/3uAxZip/HSttaKcJ+uImYDbuwANAw1c=";
"https://github.com/input-output-hk/cardano-node.git"."b6ca519f97a0e795611a63174687e6bb70c9f752"
= "tuEtSCJOk1MA9sguxL13XLa+qHaz//v7eNyhxHC9tHw=";
"https://github.com/input-output-hk/optparse-applicative"."7497a29cb998721a9068d5725d49461f2bba0e7a"
= "uQx+SEYsCH7JcG3xAT0eJck9yq3y0cvx49bvItLLer8=";
"https://github.com/input-output-hk/Win32-network"."3825d3abf75f83f406c1f7161883c438dac7277d"
= "Hesb5GXSx0IwKSIi42ofisVELcQNX6lwHcoZcbaDiqc=";
"https://github.com/input-output-hk/goblins"."cde90a2b27f79187ca8310b6549331e59595e7ba"
= "z9ut0y6umDIjJIRjz9KSvKgotuw06/S8QDwOtVdGiJ0=";
"https://github.com/Liqwid-Labs/plutus-extra.git"."658b5ea8a5d58cb15a670dd9709e47d6029a6acb"
= "9vrcwZrcfRQX2LylrlwgpYOkyS7bD529jVLZesBIlKA=";
};
};
in
{
project = perSystem projectFor;
flake = perSystem (system: (projectFor system).flake {});
# this could be done automatically, but would reduce readability
packages = perSystem (system: self.flake.${system}.packages);
checks = perSystem (system: self.flake.${system}.checks);
check = perSystem (system:
(nixpkgsFor system).runCommand "combined-test" {
nativeBuildInputs = builtins.attrValues self.checks.${system};
} "touch $out"
);
apps = perSystem (system: self.flake.${system}.apps);
devShell = perSystem (system: self.flake.${system}.devShell);
defaultPackage = perSystem (system: self.packages.${system}."ardana-dollar:lib:ardana-dollar");
herculesCI.ciSystems = [ "x86_64-linux" ];
};
}