wrpll-simulation/flake.nix

38 lines
894 B
Nix
Raw Normal View History

2023-11-16 11:53:22 +08:00
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
2023-11-16 11:53:22 +08:00
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in rec {
devShell = pkgs.mkShell {
name = "WRPLL-sim";
venvDir = "./.venv";
buildInputs = with pkgs.python3Packages; [
python
numba
numpy
notebook # use jupyter notebook without missing libstdc++.so.6
venvShellHook
2023-11-16 11:53:22 +08:00
];
# Only run once when venv is created
postVenvCreation = ''
unset SOURCE_DATE_EPOCH
pip install -r requirements.txt
'';
postShellHook = ''
# allow pip to install wheels
unset SOURCE_DATE_EPOCH
'';
2023-11-16 11:53:22 +08:00
};
}
);
}