nixpkgs/pkgs/by-name/qr/qrupdate/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

61 lines
1.5 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, cmake
, lapack
, which
, gfortran
, blas
}:
stdenv.mkDerivation (finalAttrs: {
pname = "qrupdate";
version = "1.1.5";
src = fetchFromGitHub {
owner = "mpimd-csc";
repo = "qrupdate-ng";
rev = "v${finalAttrs.version}";
hash = "sha256-dHxLPrN00wwozagY2JyfZkD3sKUD2+BcnbjNgZepzFg=";
};
cmakeFlags = assert (blas.isILP64 == lapack.isILP64); [
"-DCMAKE_Fortran_FLAGS=${toString ([
"-std=legacy"
] ++ lib.optionals blas.isILP64 [
# If another application intends to use qrupdate compiled with blas with
# 64 bit support, it should add this to it's FFLAGS as well. See (e.g):
# https://savannah.gnu.org/bugs/?50339
"-fdefault-integer-8"
])}"
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
# prevent cmake from using Accelerate, which causes all tests to segfault
"-DBLA_VENDOR=Generic"
];
# https://github.com/mpimd-csc/qrupdate-ng/issues/4
patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
./disable-zch1dn-test.patch
];
doCheck = true;
nativeBuildInputs = [
cmake
which
gfortran
];
buildInputs = [
blas
lapack
];
meta = with lib; {
description = "Library for fast updating of qr and cholesky decompositions";
homepage = "https://github.com/mpimd-csc/qrupdate-ng";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.unix;
};
})