aboutsummaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..5f57bc8
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,26 @@
+{ pkgs ? import <nixpkgs> { }, ... }:
+
+pkgs.stdenvNoCC.mkDerivation rec {
+ name = "pycl-env";
+ env = pkgs.buildEnv { name = name; paths = buildInputs; };
+
+ buildInputs = let
+ local-python = pkgs.python3.withPackages (python-packages: with python-packages; [
+ numpy
+ sympy
+ pyopencl setuptools
+ matplotlib
+ ]);
+
+ in [
+ local-python
+ pkgs.opencl-info
+ pkgs.universal-ctags
+ ];
+
+ shellHook = ''
+ export NIX_SHELL_NAME="${name}"
+ export PYOPENCL_COMPILER_OUTPUT=1
+ export PYTHONPATH="$PWD:$PYTHONPATH"
+ '';
+}