nixpkgs/pkgs/development/libraries/science/biology/elastix/default.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, fetchpatch, cmake, itk, python3 }:
2017-05-23 15:12:23 -07:00
stdenv.mkDerivation rec {
2018-04-10 10:34:29 -07:00
pname = "elastix";
version = "5.0.0";
2017-05-23 15:12:23 -07:00
src = fetchFromGitHub {
owner = "SuperElastix";
repo = pname;
rev = version;
sha256 = "1zrl7rz4lwsx88b2shnl985f3a97lmp4ksbd437h9y0hfjq8l0lj";
2017-05-23 15:12:23 -07:00
};
2020-03-13 08:16:34 -07:00
patches = [
(fetchpatch {
name = "itk-5.1-compat.patch";
url = "https://github.com/SuperElastix/elastix/commit/402e9a26f22f805b8f2db00c00e59f75fa1783ad.patch";
sha256 = "1il6gc1lgy78i0w6gkkppr61nh6g0yjspbfk19hcz20778m5jhz9";
})
(fetchpatch {
name = "fix-osx-build.patch";
url = "https://github.com/SuperElastix/elastix/commit/52e1dc3928046f9fbb85d4b2ecd0d5175fa9695d.patch";
sha256 = "1hf7kgx1jv497pf0x5wj79sy1wncxcvhrkix9w086lcr8zwxvn9q";
})
];
2020-03-13 08:15:57 -07:00
nativeBuildInputs = [ cmake python3 ];
2017-05-23 15:12:23 -07:00
buildInputs = [ itk ];
doCheck = !stdenv.isDarwin; # usual dynamic linker issues
2020-03-13 08:16:34 -07:00
preCheck = "
export LD_LIBRARY_PATH=$(pwd)/bin
";
2017-05-23 15:12:23 -07:00
meta = with stdenv.lib; {
homepage = "http://elastix.isi.uu.nl/";
2017-05-23 15:12:23 -07:00
description = "Image registration toolkit based on ITK";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.x86_64; # libitkpng linker issues with ITK 5.1
2017-05-23 15:12:23 -07:00
license = licenses.asl20;
};
}