nixpkgs/pkgs/by-name/gi/gifticlib/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

35 lines
965 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake, expat, nifticlib, zlib }:
stdenv.mkDerivation rec {
pname = "gifticlib";
version = "unstable-2020-07-07";
src = fetchFromGitHub {
owner = "NIFTI-Imaging";
repo = "gifti_clib";
rev = "5eae81ba1e87ef3553df3b6ba585f12dc81a0030";
sha256 = "0gcab06gm0irjnlrkpszzd4wr8z0fi7gx8f7966gywdp2jlxzw19";
};
cmakeFlags = [ "-DUSE_SYSTEM_NIFTI=ON" "-DDOWNLOAD_TEST_DATA=OFF" ];
nativeBuildInputs = [ cmake ];
buildInputs = [ expat nifticlib zlib ];
# without the test data, this is only a few basic tests
doCheck = !stdenv.hostPlatform.isDarwin;
checkPhase = ''
runHook preCheck
ctest -LE 'NEEDS_DATA'
runHook postCheck
'';
meta = with lib; {
homepage = "https://www.nitrc.org/projects/gifti";
description = "Medical imaging geometry format C API";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.unix;
license = licenses.publicDomain;
};
}