aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-11-12 22:59:03 +0100
committerAdrian Kummerlaender2019-11-12 22:59:03 +0100
commit2dba6db0c94ccb260f3e9345b25146ce75ccea9a (patch)
treefaa6fc942905f05f082cef3dbe82b98f71b8d472
parent155c630827bae820412d663e1579929a2832d24b (diff)
downloadboltzgen_examples-2dba6db0c94ccb260f3e9345b25146ce75ccea9a.tar
boltzgen_examples-2dba6db0c94ccb260f3e9345b25146ce75ccea9a.tar.gz
boltzgen_examples-2dba6db0c94ccb260f3e9345b25146ce75ccea9a.tar.bz2
boltzgen_examples-2dba6db0c94ccb260f3e9345b25146ce75ccea9a.tar.lz
boltzgen_examples-2dba6db0c94ccb260f3e9345b25146ce75ccea9a.tar.xz
boltzgen_examples-2dba6db0c94ccb260f3e9345b25146ce75ccea9a.tar.zst
boltzgen_examples-2dba6db0c94ccb260f3e9345b25146ce75ccea9a.zip
Share boltzgen version between expressions
-rw-r--r--boltzgen.nix21
-rw-r--r--lid_driven_cavity/cpp/shell.nix18
-rw-r--r--lid_driven_cavity/cuda/shell.nix18
-rw-r--r--lid_driven_cavity/opencl/shell.nix18
-rw-r--r--lid_driven_cavity/opencl_gl_interop/shell.nix18
5 files changed, 25 insertions, 68 deletions
diff --git a/boltzgen.nix b/boltzgen.nix
new file mode 100644
index 0000000..74ba512
--- /dev/null
+++ b/boltzgen.nix
@@ -0,0 +1,21 @@
+{ pkgs ? import <nixpkgs> { }, ... }:
+
+let in {
+ boltzgen = python : python.pkgs.buildPythonPackage rec {
+ pname = "boltzgen";
+ version = "0.1";
+
+ src = builtins.fetchGit {
+ url = "https://code.kummerlaender.eu/boltzgen/";
+ rev = "aa509dd4ebbb9d1d8ad6ebfe05111228fd9ae7c0";
+ };
+
+ propagatedBuildInputs = with pkgs.python37Packages; [
+ sympy
+ numpy
+ Mako
+ ];
+
+ doCheck = false;
+ };
+}
diff --git a/lid_driven_cavity/cpp/shell.nix b/lid_driven_cavity/cpp/shell.nix
index d2d157d..b441484 100644
--- a/lid_driven_cavity/cpp/shell.nix
+++ b/lid_driven_cavity/cpp/shell.nix
@@ -5,23 +5,7 @@ pkgs.stdenvNoCC.mkDerivation rec {
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;
- };
+ boltzgen = (import ../../boltzgen.nix { }).boltzgen pkgs.python3;
local-python = pkgs.python3.withPackages (python-packages: with python-packages; [
boltzgen
diff --git a/lid_driven_cavity/cuda/shell.nix b/lid_driven_cavity/cuda/shell.nix
index 86f707f..77d7bdf 100644
--- a/lid_driven_cavity/cuda/shell.nix
+++ b/lid_driven_cavity/cuda/shell.nix
@@ -5,23 +5,7 @@ pkgs.stdenvNoCC.mkDerivation rec {
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;
- };
+ boltzgen = (import ../../boltzgen.nix { }).boltzgen pkgs.python3;
local-python = pkgs.python3.withPackages (python-packages: with python-packages; [
boltzgen
diff --git a/lid_driven_cavity/opencl/shell.nix b/lid_driven_cavity/opencl/shell.nix
index de9d59f..4187983 100644
--- a/lid_driven_cavity/opencl/shell.nix
+++ b/lid_driven_cavity/opencl/shell.nix
@@ -5,23 +5,7 @@ pkgs.stdenvNoCC.mkDerivation rec {
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;
- };
+ boltzgen = (import ../../boltzgen.nix { }).boltzgen pkgs.python3;
local-python = pkgs.python3.withPackages (python-packages: with python-packages; [
boltzgen
diff --git a/lid_driven_cavity/opencl_gl_interop/shell.nix b/lid_driven_cavity/opencl_gl_interop/shell.nix
index 42feaaf..4e64875 100644
--- a/lid_driven_cavity/opencl_gl_interop/shell.nix
+++ b/lid_driven_cavity/opencl_gl_interop/shell.nix
@@ -21,23 +21,7 @@ pkgs.stdenvNoCC.mkDerivation rec {
};
in pkgs.python3.override { inherit packageOverrides; };
- 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;
- };
+ boltzgen = (import ../../boltzgen.nix { }).boltzgen custom-python;
local-python = custom-python.withPackages (python-packages: with python-packages; [
boltzgen