diff options
Merge shell environments
-rw-r--r-- | ldc_2d/cpp/shell.nix | 42 | ||||
-rw-r--r-- | shell.nix (renamed from ldc_2d/opencl/shell.nix) | 8 |
2 files changed, 5 insertions, 45 deletions
diff --git a/ldc_2d/cpp/shell.nix b/ldc_2d/cpp/shell.nix deleted file mode 100644 index 0b9db9f..0000000 --- a/ldc_2d/cpp/shell.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ 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 = pkgs.fetchFromGitHub { - owner = "KnairdA"; - repo = "boltzgen"; - rev = "v0.1.1"; - sha256 = "03fv7krhgc43gfjill8wb4aafr8xi69i2yh9zr68knnmrkrb8vpi"; - }; - - propagatedBuildInputs = with pkgs.python37Packages; [ - sympy - numpy - Mako - ]; - - doCheck = false; - }; - - local-python = pkgs.python3.withPackages (python-packages: with python-packages; [ - boltzgen - ]); - - in [ - local-python - pkgs.gcc9 - pkgs.cmake - ]; - - shellHook = '' - export NIX_SHELL_NAME="${name}" - export PYTHONPATH="$PWD:$PYTHONPATH" - ''; -} diff --git a/ldc_2d/opencl/shell.nix b/shell.nix index 462394e..0ccedfa 100644 --- a/ldc_2d/opencl/shell.nix +++ b/shell.nix @@ -1,7 +1,7 @@ { pkgs ? import <nixpkgs> { }, ... }: pkgs.stdenvNoCC.mkDerivation rec { - name = "pycl-env"; + name = "boltzgen-env"; env = pkgs.buildEnv { name = name; paths = buildInputs; }; buildInputs = let @@ -32,9 +32,11 @@ pkgs.stdenvNoCC.mkDerivation rec { matplotlib ]); - in [ + in with pkgs; [ local-python - pkgs.opencl-info + opencl-info + gcc9 + cmake ]; shellHook = '' |