master-thesis/python/shell.nix

92 lines
2.1 KiB
Nix
Raw Normal View History

2021-10-18 18:41:49 +02:00
{ pkgs ? import <nixpkgs> {} }:
2021-10-11 10:27:11 +02:00
let
mach-nix = import (builtins.fetchGit {
url = "https://github.com/DavHau/mach-nix";
2021-11-05 10:18:03 +01:00
ref = "master";
2021-10-11 10:27:11 +02:00
}) {
2021-10-18 18:41:49 +02:00
python = "python39Full";
2021-10-11 10:27:11 +02:00
};
fcSpline = (mach-nix.buildPythonPackage
2021-10-22 18:00:55 +02:00
{src=/home/hiro/src/fcSpline;
2021-10-11 10:27:11 +02:00
pname="fcSpline";
version="0.1";
requirements=''
numpy
cython
setuptools
scipy
'';
});
2021-10-18 18:41:49 +02:00
pyEnv = mach-nix.mkPython rec {
packagesExtra = [
fcSpline
(mach-nix.buildPythonPackage
2021-11-05 10:18:03 +01:00
{src=./energy_flow_proper/hops/submodules/stocproc;
2021-10-18 18:41:49 +02:00
pname="stocproc";
packagesExtra = [fcSpline];
# buildInputs.add = [fcSpline];
2021-11-05 10:18:03 +01:00
version = "1.0.1";
2021-10-18 18:41:49 +02:00
requirements = ''
2021-10-11 10:27:11 +02:00
numpy
cython
setuptools
mpmath
scipy
'';
2021-10-18 18:41:49 +02:00
})
2021-11-05 10:18:03 +01:00
(mach-nix.buildPythonPackage
{
src=./energy_flow_proper/hops/submodules/binfootprint;
pname="binfootpriont";
})
(mach-nix.buildPythonPackage
{
src=./energy_flow_proper/hops/submodules/jobmanager;
pname="jobmanager";
})
(mach-nix.buildPythonPackage
{
src=./energy_flow_proper/hops/submodules/progression;
pname="progression";
})
2021-10-18 18:41:49 +02:00
];
_.stocproc.buildInputs.add = [fcSpline];
2021-10-22 18:00:55 +02:00
#_.stocproc.patches = [./stocproc.patch];
2021-10-18 18:41:49 +02:00
requirements = ''
2021-11-05 10:18:03 +01:00
numpy >= 1.20
data-science-types
mypy
# jupyter-spaces
2021-10-11 10:27:11 +02:00
ptpython
jedi
black
flake8
matplotlib
2021-11-05 10:18:03 +01:00
scipy >= 1.6
2021-10-11 10:27:11 +02:00
jupyter
2021-10-15 16:18:03 +02:00
h5py
sqlitedict
2021-10-18 18:41:49 +02:00
pycairo
pygobject
2021-10-26 11:42:39 +02:00
lmfit
2021-11-05 10:18:03 +01:00
qutip
2021-10-11 10:27:11 +02:00
'';
2021-10-18 18:41:49 +02:00
ignoreCollisions = true;
providers.tk = "nixpkgs";
2021-11-05 10:18:03 +01:00
_.jupyter.postInstall = ''
rm $out/lib/python*/site-packages/__pycache__/jupyter.cpython-39.pyc
rm $out/lib/python*/site-packages/jupyter.py
'';
2021-10-18 18:41:49 +02:00
};
in
pkgs.mkShell {
2021-11-05 10:18:03 +01:00
buildInputs = [pyEnv pkgs.cairo pkgs.openblas];
BLAS = "${pkgs.lib.strings.makeLibraryPath [pkgs.openblas]}";
shellHook = ''
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BLAS
'';
2021-10-11 10:27:11 +02:00
}