Skip to content

Commit f5a780a

Browse files
committed
Add nix dev shell
1 parent 3e41d2c commit f5a780a

File tree

2 files changed

+145
-0
lines changed

2 files changed

+145
-0
lines changed

flake.lock

Lines changed: 99 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
description = "rust-bitcoinkernel";
3+
4+
inputs = {
5+
nixpkgs.url = "nixpkgs/nixos-25.05";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
fenix = {
8+
url = "github:nix-community/fenix";
9+
inputs.nixpkgs.follows = "nixpkgs";
10+
};
11+
};
12+
13+
outputs = { self, nixpkgs, flake-utils, fenix }:
14+
flake-utils.lib.eachDefaultSystem (system:
15+
let
16+
pkgs = import nixpkgs {
17+
inherit system;
18+
};
19+
20+
rustVersion = "1.71.0";
21+
rustToolchain = fenix.packages.${system}.fromToolchainName {
22+
name = rustVersion;
23+
sha256 = "sha256-ks0nMEGGXKrHnfv4Fku+vhQ7gx76ruv6Ij4fKZR3l78=";
24+
};
25+
rustBuildToolchain = fenix.packages.${system}.combine [
26+
rustToolchain.rustc
27+
rustToolchain.cargo
28+
rustToolchain.rust-src
29+
rustToolchain.llvm-tools
30+
rustToolchain.rust-std
31+
];
32+
in {
33+
devShells.default = pkgs.mkShell {
34+
packages = [
35+
rustBuildToolchain
36+
37+
pkgs.cmake
38+
pkgs.boost.dev
39+
pkgs.cargo-fuzz
40+
];
41+
42+
LIBCLANG_PATH = "${pkgs.llvmPackages.clang-unwrapped.lib}/lib/";
43+
};
44+
}
45+
);
46+
}

0 commit comments

Comments
 (0)