2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, itk, python3, Cocoa }:
|
2017-05-23 22:12:23 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-04-10 17:34:29 +00:00
|
|
|
pname = "elastix";
|
2020-10-05 18:28:46 +00:00
|
|
|
version = "5.0.1";
|
2017-05-23 22:12:23 +00:00
|
|
|
|
2019-10-22 19:24:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SuperElastix";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-10-05 18:28:46 +00:00
|
|
|
sha256 = "1mx8kkak2d3ibfrxrh8jkmh2zkdlgl9h578wiw3617zcwaa97bxw";
|
2017-05-23 22:12:23 +00:00
|
|
|
};
|
2020-03-13 15:16:34 +00:00
|
|
|
|
2020-04-27 19:04:43 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2020-10-05 18:28:46 +00:00
|
|
|
name = "install-executables.patch"; # https://github.com/SuperElastix/elastix/issues/305
|
|
|
|
url = "https://github.com/SuperElastix/elastix/commit/8e26cdc0d66f6030c7be085fdc424d84d4fc7546.patch";
|
|
|
|
sha256 = "12y9wbpi9jlarnw6fk4iby97jxvx5g4daq9zqblbcmn51r134bj5";
|
2020-04-27 19:04:43 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-03-13 15:15:57 +00:00
|
|
|
nativeBuildInputs = [ cmake python3 ];
|
2021-01-21 17:00:13 +00:00
|
|
|
buildInputs = [ itk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
|
2017-05-23 22:12:23 +00:00
|
|
|
|
2020-04-27 19:04:43 +00:00
|
|
|
doCheck = !stdenv.isDarwin; # usual dynamic linker issues
|
2020-03-13 15:16:34 +00:00
|
|
|
|
|
|
|
preCheck = "
|
|
|
|
export LD_LIBRARY_PATH=$(pwd)/bin
|
|
|
|
";
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://elastix.isi.uu.nl/";
|
2017-05-23 22:12:23 +00:00
|
|
|
description = "Image registration toolkit based on ITK";
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
2020-04-27 19:04:43 +00:00
|
|
|
platforms = platforms.x86_64; # libitkpng linker issues with ITK 5.1
|
2017-05-23 22:12:23 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|