-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathflake.nix
55 lines (52 loc) · 1.75 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
{
description = "Functional tests for cardano-node";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
cardano-node = {
url = "github:IntersectMBO/cardano-node";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = { self, nixpkgs, flake-utils, cardano-node }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
nodePkgs = cardano-node.packages.${system};
py3Pkgs = pkgs.python311Packages;
py3Full = pkgs.python311Full;
in
{
devShells = rec {
base = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ bash coreutils curl git gnugrep gnumake gnutar jq xz ];
};
postgres = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ glibcLocales postgresql lsof procps ];
};
venv = pkgs.mkShell {
nativeBuildInputs = base.nativeBuildInputs ++ postgres.nativeBuildInputs ++ [
nodePkgs.cardano-cli
nodePkgs.cardano-node
nodePkgs.cardano-submit-api
nodePkgs.bech32
pkgs.poetry
py3Full
py3Pkgs.virtualenv
];
};
# Use 'venv' directly as 'default' and 'dev'
default = venv;
dev = venv;
};
});
# --- Flake Local Nix Configuration ----------------------------
nixConfig = {
# Sets the flake to use the IOG nix cache.
extra-substituters = [ "https://cache.iog.io" ];
extra-trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
allow-import-from-derivation = "true";
};
}