aboutsummaryrefslogtreecommitdiff
path: root/lid_driven_cavity/cpp
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-11-11 13:41:46 +0100
committerAdrian Kummerlaender2019-11-11 13:41:46 +0100
commit336d20eed737445f3b2aa7d875c90ccc64a97213 (patch)
treece17ece45910d92fe10473a7632aa0ae4f057c6e /lid_driven_cavity/cpp
parent988818c224197eb506ac2f42edef13d7bd1cc11a (diff)
downloadboltzgen_examples-336d20eed737445f3b2aa7d875c90ccc64a97213.tar
boltzgen_examples-336d20eed737445f3b2aa7d875c90ccc64a97213.tar.gz
boltzgen_examples-336d20eed737445f3b2aa7d875c90ccc64a97213.tar.bz2
boltzgen_examples-336d20eed737445f3b2aa7d875c90ccc64a97213.tar.lz
boltzgen_examples-336d20eed737445f3b2aa7d875c90ccc64a97213.tar.xz
boltzgen_examples-336d20eed737445f3b2aa7d875c90ccc64a97213.tar.zst
boltzgen_examples-336d20eed737445f3b2aa7d875c90ccc64a97213.zip
Use separate Nix environments for each target
Diffstat (limited to 'lid_driven_cavity/cpp')
-rw-r--r--lid_driven_cavity/cpp/shell.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/lid_driven_cavity/cpp/shell.nix b/lid_driven_cavity/cpp/shell.nix
new file mode 100644
index 0000000..d2d157d
--- /dev/null
+++ b/lid_driven_cavity/cpp/shell.nix
@@ -0,0 +1,40 @@
+{ 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
+ gcc9
+ cmake
+ ];
+
+ shellHook = ''
+ export NIX_SHELL_NAME="${name}"
+ export PYTHONPATH="$PWD:$PYTHONPATH"
+ '';
+}