-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
47 lines (44 loc) · 1.4 KB
/
Copy pathflake.nix
File metadata and controls
47 lines (44 loc) · 1.4 KB
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
{
inputs = {
fenix.url = "github:nix-community/fenix/monthly";
naersk.url = "github:nix-community/naersk/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, fenix, naersk, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
naersk-lib = pkgs.callPackage naersk { };
fenix-pkgs = fenix.packages.${system};
in {
packages.default = naersk-lib.buildPackage ./.;
devShells.default = with pkgs;
mkShell {
buildInputs = [
# Rust toolchain
fenix-pkgs.latest.toolchain
fenix-pkgs.rust-analyzer
maturin
mold
# Development utilities
cargo-flamegraph
cargo-nextest
cargo-outdated
f3d
pre-commit
watchexec
# Python packages
python3Packages.click
python3Packages.numpy
python3Packages.pip
python3Packages.trimesh
python3Packages.venvShellHook
];
RUST_SRC_PATH =
"${fenix-pkgs.latest.rust-src}/lib/rustlib/src/rust/library";
PYO3_PYTHON = "${python3}/bin/python3";
venvDir = "./.venv";
};
});
}