-
Notifications
You must be signed in to change notification settings - Fork 5
/
default.nix
46 lines (44 loc) · 1.08 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
let ourNixpkgs =
builtins.fetchGit {
# Descriptive name to make the store path easier to identify
name = "nixos-22.05";
url = "https://github.com/nixos/nixpkgs";
# `git ls-remote https://github.com/nixos/nixpkgs nixos-22.05`
ref = "refs/heads/nixos-22.05";
rev = "f21492b413295ab60f538d5e1812ab908e3e3292";
};
in
{ blasProvider ? "openblasCompat"
, pkgs ? import ourNixpkgs {
config.allowUnfree = blasProvider == "mkl";
overlays = [
(self: super: {
lapack = super.lapack.override {
lapackProvider = super.${blasProvider};
};
blas = super.blas.override {
blasProvider = super.${blasProvider};
};
})]; }
, pythonPackageName ? "python310"
, python ? pkgs.${pythonPackageName}}:
rec {
pythonDependencies = (python.withPackages
(ps: [
ps.numpy
ps.scipy
ps.pandas
ps.scikitlearn
ps.pytest
ps.pytest_xdist
ps.pytestcov
]));
shell = pkgs.mkShell {
buildInputs = with pkgs; [
pythonDependencies
python.pkgs.sphinx
python.pkgs.sphinxcontrib-jsmath
poetry
];
};
}