diff options
author | Guilhem Saurel | 2024-08-06 01:38:41 +0200 |
---|---|---|
committer | Guilhem Saurel | 2024-08-08 01:08:11 +0200 |
commit | e006f8483ebec4170f15431df4fcb2d04970efc3 (patch) | |
tree | f1fbb579087329f08c816c9bb1c0bff9b032725c /pkgs/by-name/sp | |
parent | 05fb9b070f5eede965f8b6e867a7ace0eef824ad (diff) |
spral: init at 2024.05.08
Diffstat (limited to 'pkgs/by-name/sp')
-rw-r--r-- | pkgs/by-name/sp/spral/package.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/by-name/sp/spral/package.nix b/pkgs/by-name/sp/spral/package.nix new file mode 100644 index 000000000000..720f0137338b --- /dev/null +++ b/pkgs/by-name/sp/spral/package.nix @@ -0,0 +1,65 @@ +{ + blas, + fetchFromGitHub, + gfortran, + lapack, + lib, + llvmPackages, + meson, + metis, + ninja, + stdenv, +}: + +stdenv.mkDerivation rec { + pname = "spral"; + version = "2024.05.08"; + + src = fetchFromGitHub { + owner = "ralna"; + repo = "spral"; + rev = "v${version}"; + hash = "sha256-1CdRwQ0LQrYcXvoGtGxR9Ug3Q2N4skXq8z+LdNpv8p4="; + }; + + postPatch = + '' + # Skipped test: ssidst + # hwloc/linux: failed to find sysfs cpu topology directory, aborting linux discovery. + substituteInPlace tests/meson.build --replace-fail \ + "subdir('ssids')" \ + "" + '' + + lib.optionalString stdenv.isDarwin '' + # Skipped test: lsmrt, segfault + substituteInPlace tests/meson.build --replace-fail \ + "['lsmrt', files('lsmr.f90')]," \ + "" + ''; + + nativeBuildInputs = [ + gfortran + meson + ninja + ]; + + buildInputs = [ + blas + lapack + metis + ] ++ lib.optionals stdenv.isDarwin [ llvmPackages.openmp ]; + + mesonFlags = [ (lib.mesonBool "tests" true) ]; + + LDFLAGS = lib.optionals stdenv.isDarwin [ "-lomp" ]; + + doCheck = true; + + meta = { + description = "Sparse Parallel Robust Algorithms Library"; + homepage = "https://github.com/ralna/spral"; + changelog = "https://github.com/ralna/spral/blob/${src.rev}/ChangeLog"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ nim65s ]; + }; +} |