nixpkgs/pkgs/by-name/li/libminc/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

49 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, zlib, netcdf, nifticlib, hdf5 }:
stdenv.mkDerivation (finalAttrs: {
pname = "libminc";
version = "2.4.06";
src = fetchFromGitHub {
owner = "BIC-MNI";
repo = "libminc";
rev = "refs/tags/release-${finalAttrs.version}";
hash = "sha256-HTt3y0AFM9pkEkWPb9cDmvUz4iBQWfpX7wLF9Vlg8hc=";
};
postPatch = ''
patchShebangs .
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
zlib
nifticlib
];
propagatedBuildInputs = [
netcdf
hdf5
];
cmakeFlags = [
"-DLIBMINC_MINC1_SUPPORT=ON"
"-DLIBMINC_BUILD_SHARED_LIBS=ON"
"-DLIBMINC_USE_NIFTI=ON"
"-DLIBMINC_USE_SYSTEM_NIFTI=ON"
];
doCheck = !stdenv.hostPlatform.isDarwin;
# -j1: see https://github.com/BIC-MNI/libminc/issues/110
checkPhase = ''
ctest -j1 --output-on-failure
'';
meta = with lib; {
homepage = "https://github.com/BIC-MNI/libminc";
description = "Medical imaging library based on HDF5";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.unix;
license = licenses.free;
};
})