mirror of
https://github.com/vale981/master-thesis
synced 2025-03-10 05:06:38 -04:00
60 lines
1.9 KiB
Nix
60 lines
1.9 KiB
Nix
|
{
|
||
|
description = "Calculating open system bath energy changes with HOPS and analytically.";
|
||
|
|
||
|
inputs = {
|
||
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||
|
mach-nix.url = "github:DavHau/mach-nix";
|
||
|
flake-utils.url = "github:numtide/flake-utils";
|
||
|
fcSpline.url = "github:vale981/fcSpline";
|
||
|
stocproc.url = "github:vale981/stocproc";
|
||
|
hopsflow.url = "github:vale981/hopsflow";
|
||
|
};
|
||
|
|
||
|
outputs = { self, nixpkgs, flake-utils, mach-nix, fcSpline, stocproc }:
|
||
|
let
|
||
|
python = "python39";
|
||
|
pypiDataRev = "master";
|
||
|
pypiDataSha256 = "041rpjrwwa43hap167jy8blnxvpvbfil0ail4y4mar1q5f0q57xx";
|
||
|
devShell = pkgs:
|
||
|
pkgs.mkShell {
|
||
|
buildInputs = [
|
||
|
(pkgs.${python}.withPackages
|
||
|
(ps: with ps; [ black mypy ]))
|
||
|
pkgs.nodePackages.pyright
|
||
|
];
|
||
|
};
|
||
|
|
||
|
in flake-utils.lib.eachSystem ["x86_64-linux"] (system:
|
||
|
let
|
||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||
|
mach-nix-wrapper = import mach-nix { inherit pkgs python pypiDataRev pypiDataSha256; };
|
||
|
|
||
|
fcSplinePkg = fcSpline.defaultPackage.${system};
|
||
|
stocprocPkg = stocproc.defaultPackage.${system};
|
||
|
hopsflowPkg = hopsflow.defaultPackage.${system};
|
||
|
|
||
|
pythonShell = mach-nix-wrapper.mkPythonShell {
|
||
|
requirements = ''
|
||
|
numba
|
||
|
quadpy
|
||
|
idesolver
|
||
|
ptpython
|
||
|
matplotlib
|
||
|
jupyter
|
||
|
h5py
|
||
|
qutip
|
||
|
'';
|
||
|
packagesExtra = [hopsflowPkg stocprocPkg fcSplinePkg];
|
||
|
};
|
||
|
|
||
|
mergeEnvs = envs:
|
||
|
pkgs.mkShell (builtins.foldl' (a: v: {
|
||
|
buildInputs = a.buildInputs ++ v.buildInputs;
|
||
|
nativeBuildInputs = a.nativeBuildInputs ++ v.nativeBuildInputs;
|
||
|
}) (pkgs.mkShell { }) envs);
|
||
|
|
||
|
in {
|
||
|
devShell = mergeEnvs [ (devShell pkgs) pythonShell ];
|
||
|
});
|
||
|
}
|