slepc: init at 3.22.2

qbisi faab78f8 05f78eb5

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