-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
71 lines (61 loc) · 1.86 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
{
description = "A Celestia/Rollmint/CosmWasm starter pack";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
outputs = {
self,
nixpkgs,
crane,
flake-utils,
rust-overlay
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
lib = (import ./lib { inherit pkgs lib crane; });
celestia = import ./tools/celestia.nix { inherit pkgs; };
wasmd = import ./tools/wasmd.nix { inherit pkgs; };
in rec
{
inherit lib;
packages = {
celestia = celestia.node;
wasmd = wasmd.wasmd { libwasmvm = wasmd.libwasmvm; };
docker-load = pkgs.symlinkJoin rec {
name = "docker-load";
paths = [
((pkgs.writeScriptBin name (builtins.readFile (pkgs.substituteAll { src = ./docker/load.sh; image = self.docker.${system}.celestia-light; }))).overrideAttrs(old: {
buildCommand = "${old.buildCommand}\n patchShebangs $out";
}))
] ++ [
];
buildInputs = [ pkgs.makeWrapper ];
postBuild = "wrapProgram $out/bin/${name} --prefix PATH : $out/bin";
};
};
apps = {
# cel-key: used to generate keys for interacting with the Celestia DA layer
cel-key = {
type = "app";
program = "${celestia.key}/bin/celestia-key";
};
};
}
);
}