-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
38 lines (38 loc) · 1.09 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
{
description = "Neuromorphic Intermediate Representation PyTorch graph analysis layer";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
py = pkgs.python3Packages;
in {
devShells.default = pkgs.mkShell rec {
name = "impurePythonEnv";
venvDir = "./.venv";
buildInputs = [
pkgs.stdenv.cc.cc.lib
py.python
py.venvShellHook
py.numpy
py.h5py
py.black
py.torch
pkgs.ruff
];
postVenvCreation = ''
unset SOURCE_DATE_EPOCH
'';
postShellHook = ''
unset SOURCE_DATE_EPOCH
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc
]}
pip install -e .
'';
};
}
);
}