tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
slepc: init at 3.22.2
qbisi
10 months ago
faab78f8
05f78eb5
+127
3 changed files
expand all
collapse all
unified
split
pkgs
by-name
sl
slepc
package.nix
setup-hook.sh
top-level
python-packages.nix
+119
pkgs/by-name/sl/slepc/package.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
stdenv,
4
4
+
fetchFromGitLab,
5
5
+
sowing,
6
6
+
python3,
7
7
+
python3Packages,
8
8
+
arpack-mpi,
9
9
+
petsc,
10
10
+
mpi,
11
11
+
mpiCheckPhaseHook,
12
12
+
pythonSupport ? false,
13
13
+
withExamples ? false,
14
14
+
withArpack ? stdenv.hostPlatform.isLinux,
15
15
+
}:
16
16
+
assert petsc.mpiSupport;
17
17
+
assert pythonSupport -> petsc.pythonSupport;
18
18
+
stdenv.mkDerivation (finalAttrs: {
19
19
+
pname = "slepc";
20
20
+
version = "3.22.2";
21
21
+
22
22
+
src = fetchFromGitLab {
23
23
+
owner = "slepc";
24
24
+
repo = "slepc";
25
25
+
tag = "v${finalAttrs.version}";
26
26
+
hash = "sha256-a5DmsA7NAlhrEaS43TYPk7vtDfhXLEP+5sftu2A9Yt4=";
27
27
+
};
28
28
+
29
29
+
postPatch = ''
30
30
+
# Fix slepc4py install prefix
31
31
+
substituteInPlace config/packages/slepc4py.py \
32
32
+
--replace-fail "slepc.prefixdir,'lib'" \
33
33
+
"slepc.prefixdir,'${python3.sitePackages}'"
34
34
+
35
35
+
patchShebangs lib/slepc/bin
36
36
+
37
37
+
# Use system bfort
38
38
+
substituteInPlace config/packages/sowing.py \
39
39
+
--replace-fail "bfort = os.path.join(archdir,'bin','bfort')" \
40
40
+
"bfort = '${sowing}/bin/bfort'"
41
41
+
'';
42
42
+
43
43
+
# Usually this project is being built as part of a `petsc` build or as part of
44
44
+
# other projects, e.g when `petsc` is `./configure`d with
45
45
+
# `--download-slepc=1`. This instructs the slepc to be built as a standalone
46
46
+
# project.
47
47
+
preConfigure = ''
48
48
+
export SLEPC_DIR=$PWD
49
49
+
'';
50
50
+
51
51
+
nativeBuildInputs =
52
52
+
[
53
53
+
python3
54
54
+
]
55
55
+
++ lib.optionals pythonSupport [
56
56
+
python3Packages.setuptools
57
57
+
python3Packages.cython
58
58
+
];
59
59
+
60
60
+
configureFlags =
61
61
+
lib.optionals withArpack [
62
62
+
"--with-arpack=1"
63
63
+
]
64
64
+
++ lib.optionals pythonSupport [
65
65
+
"--with-slepc4py=1"
66
66
+
];
67
67
+
68
68
+
buildInputs =
69
69
+
[
70
70
+
mpi
71
71
+
]
72
72
+
++ lib.optionals withArpack [
73
73
+
arpack-mpi
74
74
+
];
75
75
+
76
76
+
propagatedBuildInputs = [
77
77
+
petsc
78
78
+
];
79
79
+
80
80
+
enableParallelBuilding = true;
81
81
+
82
82
+
installTargets = [ (if withExamples then "install" else "install-lib") ];
83
83
+
84
84
+
nativeInstallCheckInputs =
85
85
+
[
86
86
+
mpiCheckPhaseHook
87
87
+
]
88
88
+
++ lib.optionals pythonSupport [
89
89
+
python3Packages.pythonImportsCheckHook
90
90
+
python3Packages.unittestCheckHook
91
91
+
];
92
92
+
93
93
+
doInstallCheck = true;
94
94
+
95
95
+
installCheckTarget = [ "check_install" ];
96
96
+
97
97
+
unittestFlagsArray = [
98
98
+
"-s"
99
99
+
"src/binding/slepc4py/test"
100
100
+
"-v"
101
101
+
];
102
102
+
103
103
+
pythonImportsCheck = [ "slepc4py" ];
104
104
+
105
105
+
shellHook = ./setup-hook.sh;
106
106
+
107
107
+
meta = {
108
108
+
description = "Scalable Library for Eigenvalue Problem Computations";
109
109
+
homepage = "https://slepc.upv.es";
110
110
+
changelog = "https://gitlab.com/slepc/slepc/blob/${finalAttrs.src.tag}/CHANGELOG.md";
111
111
+
license = with lib.licenses; [
112
112
+
bsd2
113
113
+
];
114
114
+
platforms = lib.platforms.unix;
115
115
+
maintainers = with lib.maintainers; [ qbisi ];
116
116
+
# Possible error running Fortran src/eps/tests/test7f with 1 MPI process
117
117
+
broken = stdenv.hostPlatform.isDarwin && withArpack;
118
118
+
};
119
119
+
})
+1
pkgs/by-name/sl/slepc/setup-hook.sh
···
1
1
+
export SLEPC_DIR=@out@
+7
pkgs/top-level/python-packages.nix
···
15350
15350
15351
15351
sleepyq = callPackage ../development/python-modules/sleepyq { };
15352
15352
15353
15353
+
slepc4py = toPythonModule (pkgs.slepc.override {
15354
15354
+
pythonSupport = true;
15355
15355
+
python3 = self.python;
15356
15356
+
python3Packages = self;
15357
15357
+
petsc = petsc4py;
15358
15358
+
});
15359
15359
+
15353
15360
sleqp = toPythonModule (pkgs.sleqp.override { pythonSupport = true; python3Packages = self; });
15354
15361
15355
15362
slicedimage = callPackage ../development/python-modules/slicedimage { };