-
Notifications
You must be signed in to change notification settings - Fork 123
/
flake.nix
63 lines (57 loc) · 1.56 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
{
description = "Saber development environment.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
saber-overlay.url = "github:saber-hq/saber-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, saber-overlay, flake-utils }:
flake-utils.lib.eachSystem [
"aarch64-darwin"
"x86_64-linux"
"x86_64-darwin"
]
(system:
let
pkgs = import nixpkgs { inherit system; }
// saber-overlay.packages.${system};
ci = pkgs.buildEnv {
name = "ci";
paths = with pkgs;
(pkgs.lib.optionals pkgs.stdenv.isLinux ([ udev ])) ++ [
anchor-0_24_2
cargo-workspaces
cargo-fuzz
# sdk
nodejs
yarn
python3
pkgconfig
openssl
jq
gnused
solana-basic
libiconv
] ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin
(with pkgs.darwin.apple_sdk.frameworks; [
AppKit
IOKit
Foundation
]));
};
in
{
packages.ci = ci;
devShell = pkgs.stdenvNoCC.mkDerivation {
name = "devshell";
buildInputs = with pkgs; [
ci
rustup
cargo-outdated
cargo-deps
gh
spl-token-cli
];
};
});
}