-
Notifications
You must be signed in to change notification settings - Fork 59
/
flake.nix
81 lines (70 loc) · 2.28 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
{
description = "Cardano JS SDK";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
devshell.url = "github:numtide/devshell";
n2c.url = "github:nlewo/nix2container";
n2c.inputs.nixpkgs.follows = "nixpkgs";
nix-toolbox.url = "github:DevPalace/nix-toolbox/";
#nix-toolbox.inputs.nixpkgs.follows = "nixpkgs";
nix-toolbox.inputs.flake-parts.follows = "flake-parts";
nix-toolbox.inputs.nix2container.follows = "";
std = {
url = "github:divnix/std";
inputs.nixpkgs.follows = "nixpkgs";
inputs.n2c.follows = "n2c";
inputs.devshell.follows = "devshell";
};
};
# --- Flake Local Nix Configuration ----------------------------
nixConfig = {
# still used by single-user-mode (e.g. ci)
extra-substituters = [
"https://cache.iog.io"
"s3://lace-nix-cache?region=us-east-1"
];
allow-import-from-derivation = "true";
};
# --------------------------------------------------------------
outputs = {
std,
self,
nix-toolbox,
devshell,
...
} @ inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
std.flakeModule
devshell.flakeModule
./nix/local/envs.nix
];
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin"];
std.grow = with inputs; {
cellsFrom = ./nix;
cellBlocks = with std.blockTypes; [
# Software Delivery Lifecycle (Local Development Environment)
(runnables "jobs")
# Software Delivery Lifecycle (Packaging Layers)
# For deeper context, please consult:
# https://std.divnix.com/patterns/four-packaging-layers.html
(installables "packages" {ci.build = true;})
(runnables "operables")
(containers "oci-images" {ci.publish = true;})
];
};
std.harvest = {
packages = [["local" "packages"] ["local" "jobs"]];
devShells = [["local" "envs"] ["desktop" "envs"]];
hydraJobs = ["desktop" "hydraJobs"];
};
perSystem = {
pkgs,
system,
...
}: {
legacyPackages.cardano-services = import ./nix/cardano-services/deployments {inherit pkgs nix-toolbox inputs;};
};
};
}