1 { lib, stdenv, fetchFromGitHub, fetchpatch, cmake, itk, python3, Cocoa }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
8 owner = "SuperElastix";
11 sha256 = "1mx8kkak2d3ibfrxrh8jkmh2zkdlgl9h578wiw3617zcwaa97bxw";
16 name = "install-executables.patch"; # https://github.com/SuperElastix/elastix/issues/305
17 url = "https://github.com/SuperElastix/elastix/commit/8e26cdc0d66f6030c7be085fdc424d84d4fc7546.patch";
18 sha256 = "12y9wbpi9jlarnw6fk4iby97jxvx5g4daq9zqblbcmn51r134bj5";
22 nativeBuildInputs = [ cmake python3 ];
23 buildInputs = [ itk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
25 doCheck = !stdenv.isDarwin; # usual dynamic linker issues
28 export LD_LIBRARY_PATH=$(pwd)/bin
32 homepage = "http://elastix.isi.uu.nl/";
33 description = "Image registration toolkit based on ITK";
34 maintainers = with maintainers; [ bcdarwin ];
35 platforms = platforms.x86_64; # libitkpng linker issues with ITK 5.1
36 license = licenses.asl20;