-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
66 lines (60 loc) · 1.72 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
{
description = "Tribeca 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};
anchor = pkgs.anchor-0_22_0;
rust-build-common = with pkgs;
[ pkgconfig openssl libiconv ]
++ (pkgs.lib.optionals pkgs.stdenv.isLinux ([ udev ]))
++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [
pkgs.darwin.apple_sdk.frameworks.AppKit
pkgs.darwin.apple_sdk.frameworks.IOKit
pkgs.darwin.apple_sdk.frameworks.Foundation
]);
ci = pkgs.buildEnv {
name = "ci";
paths = with pkgs;
[
solana-basic
anchor
# sdk
nodejs
yarn
python3
gnused
] ++ rust-build-common;
};
env-release = pkgs.buildEnv {
name = "env-release";
paths = with pkgs;
[ rust-stable cargo-workspaces ] ++ rust-build-common;
};
in {
packages = {
inherit ci env-release;
inherit (pkgs) cargo-workspaces rust-stable;
};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
ci
cargo-deps
cargo-readme
gh
jq
rustup
];
};
});
}