forked from input-output-hk/marlowe-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
98 lines (95 loc) · 2.93 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
{
description = "Marlowe Starter Kit";
nixConfig = {
extra-substituters = [
"https://cache.zw3rk.com"
"https://cache.iog.io"
"https://hydra.iohk.io"
"https://tweag-jupyter.cachix.org"
];
extra-trusted-public-keys = [
"loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk="
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"tweag-jupyter.cachix.org-1:UtNH4Zs6hVUFpFBTLaA4ejYavPo5EFFqgd7G7FxGW9g="
];
};
inputs = {
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.follows = "marlowe/iogx/nixpkgs";
jupyenv.url = "github:tweag/jupyenv";
marlowe = {
type = "github";
owner = "input-output-hk";
repo = "marlowe-cardano";
ref = "[email protected]";
};
cardano-world.follows = "marlowe/cardano-world";
};
outputs = { self, flake-compat, flake-utils, nixpkgs, jupyenv, marlowe, cardano-world }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
mp = marlowe.packages.${system};
cp = cardano-world.${system}.cardano.packages;
extraPackages = p: [
mp.ghc8107-marlowe-runtime-cli-exe-marlowe-runtime-cli
mp.ghc8107-marlowe-cli-exe-marlowe-cli
mp.ghc8107-marlowe-apps-exe-marlowe-finder
mp.ghc8107-marlowe-apps-exe-marlowe-oracle
mp.ghc8107-marlowe-apps-exe-marlowe-pipe
mp.ghc8107-marlowe-apps-exe-marlowe-scaling
cp.cardano-address
cp.cardano-cli
cp.cardano-wallet
p.gcc
p.z3
p.coreutils
p.curl
p.gnused
p.jq
p.json2yaml
p.yaml2json
];
inherit (jupyenv.lib.${system}) mkJupyterlabNew;
jupyterlab = mkJupyterlabNew ({...}: {
nixpkgs = nixpkgs;
imports = [
({pkgs, ...}: {
kernel.bash.minimal = {
enable = true;
displayName = "Bash with Marlowe Tools";
runtimePackages = extraPackages pkgs ++ [
pkgs.docker
pkgs.docker-compose
];
};
})
];
});
in rec {
packages = {
inherit jupyterlab;
marlowe-runtime-cli = mp.ghc8107-marlowe-runtime-cli-exe-marlowe-runtime-cli;
marlowe-cli = mp.ghc8107-marlowe-cli-exe-marlowe-cli;
marlowe-pipe = mp.ghc8107-marlowe-apps-exe-marlowe-pipe;
};
packages.default = jupyterlab;
apps = {
default = {
program = "${jupyterlab}/bin/jupyter-lab";
type = "app";
};
};
devShell = pkgs.mkShell {
buildInputs = extraPackages pkgs;
};
hydraJobs = {
default = packages.default;
};
}
);
}