diff options
Diffstat (limited to 'lid_driven_cavity/cuda')
-rw-r--r-- | lid_driven_cavity/cuda/shell.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lid_driven_cavity/cuda/shell.nix b/lid_driven_cavity/cuda/shell.nix new file mode 100644 index 0000000..86f707f --- /dev/null +++ b/lid_driven_cavity/cuda/shell.nix @@ -0,0 +1,42 @@ +{ pkgs ? import <nixpkgs> { }, ... }: + +pkgs.stdenvNoCC.mkDerivation rec { + name = "boltzgen-env"; + env = pkgs.buildEnv { name = name; paths = buildInputs; }; + + buildInputs = let + boltzgen = pkgs.python3.pkgs.buildPythonPackage rec { + pname = "boltzgen"; + version = "0.1"; + + src = builtins.fetchGit { + url = "https://code.kummerlaender.eu/boltzgen/"; + rev = "4a2885ad3ae0396486d288df94339d0c45e6db8b"; + }; + + propagatedBuildInputs = with pkgs.python37Packages; [ + sympy + numpy + Mako + ]; + + doCheck = false; + }; + + local-python = pkgs.python3.withPackages (python-packages: with python-packages; [ + boltzgen + ]); + + in with pkgs; [ + local-python + cmake + cudatoolkit + linuxPackages.nvidia_x11 + ]; + + shellHook = '' + export NIX_SHELL_NAME="${name}" + export CUDA_PATH="${pkgs.cudatoolkit}" + export PYTHONPATH="$PWD:$PYTHONPATH" + ''; +} |