forked from itsfarseen/solana-flake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
45 lines (39 loc) · 1.22 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
{
description = "Solana";
inputs = {
solana-bpf-tools.url = "path:solana-bpf-tools";
solana-cli.url = "path:solana-cli";
cargo-build-bpf.url = "path:cargo-build-bpf";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs: with import inputs.nixpkgs {
system = "x86_64-linux";
}; rec {
packages.x86_64-linux.default = with import inputs.nixpkgs {
system = "x86_64-linux";
}; stdenv.mkDerivation rec {
name = "solana-${version}";
version = "1.23.1";
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out
cp -rf ${inputs.solana-cli.packages.x86_64-linux.default}/* $out
chmod 0755 -R $out;
cp -rf ${inputs.cargo-build-bpf.packages.x86_64-linux.default}/* $out
chmod 0755 -R $out;
mkdir -p $out/bin/sdk/bpf
cp -rf ${inputs.solana-bpf-tools.packages.x86_64-linux.default}/* $out/bin/sdk/bpf/
chmod 0755 -R $out;
'';
meta = with lib; {
homepage = "https://github.com/solana-labs";
platforms = platforms.linux;
};
};
devShells.x86_64-linux.default = mkShellNoCC {
packages = with packages.x86_64-linux; [
default
];
};
};
}