Merge pull request #86142 from bcdarwin/itk-5.1.0

Itk: 5.0.1 -> 5.1.0
This commit is contained in:
Dmitry Kalinkin 2020-05-09 15:03:28 -04:00 committed by GitHub
commit e80302dc7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 21 deletions

View file

@ -1,18 +1,18 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, libminc, bicpl, itk, fftwFloat, gsl }:
{ stdenv, fetchFromGitHub, cmake, pkgconfig, libminc, bicpl, itk4, fftwFloat, gsl }:
stdenv.mkDerivation rec {
pname = "EZminc";
name = "${pname}-unstable-2019-07-25";
name = "${pname}-unstable-2019-03-12";
src = fetchFromGitHub {
owner = "BIC-MNI";
repo = pname;
rev = "9591edd5389a5bda2c1f606816c7cdb35c065adf";
sha256 = "02k87qbpx0f48l2lbcjmlqx82py684z3sfi29va5icfg3hjd6j7b";
rev = "5e3333ee356f914d34d66d33ea8df809c7f7fa51";
sha256 = "0wy8cppf5xpgfqvgb3mqs1cjh81n6qzkk6zxv29wvng8nar9wsy4";
};
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ itk libminc bicpl fftwFloat gsl ];
buildInputs = [ itk4 libminc bicpl fftwFloat gsl ];
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/"
"-DEZMINC_BUILD_TOOLS=TRUE"

View file

@ -1,14 +1,15 @@
{ stdenv, fetchFromGitHub, cmake, libX11, libuuid, xz, vtk, darwin }:
{ stdenv, fetchFromGitHub, cmake, makeWrapper
, pkgconfig, libX11, libuuid, xz, vtk, Cocoa }:
stdenv.mkDerivation rec {
pname = "itk";
version = "5.0.1";
version = "5.1.0";
src = fetchFromGitHub {
owner = "InsightSoftwareConsortium";
repo = "ITK";
rev = "v${version}";
sha256 = "0dcjsn5frjnrphfgw8alnd2ahrvicpx2a2ngb5ixaa9anaicz9z1";
sha256 = "0rvkp00xj1js60021jv2ydyl74wvbyb205gm9d7hf8gy2q456hgl";
};
cmakeFlags = [
@ -23,12 +24,16 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
nativeBuildInputs = [ cmake xz ];
buildInputs = [ libX11 libuuid vtk ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ];
nativeBuildInputs = [ cmake xz makeWrapper ];
buildInputs = [ libX11 libuuid vtk ] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa ];
postInstall = ''
wrapProgram "$out/bin/h5c++" --prefix PATH ":" "${pkgconfig}/bin"
'';
meta = {
description = "Insight Segmentation and Registration Toolkit";
homepage = "http://www.itk.org/";
homepage = "https://www.itk.org/";
license = stdenv.lib.licenses.asl20;
maintainers = with stdenv.lib.maintainers; [viric];
};

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, itk, python3 }:
{ stdenv, fetchFromGitHub, fetchpatch, cmake, itk, python3 }:
stdenv.mkDerivation rec {
pname = "elastix";
@ -11,10 +11,24 @@ stdenv.mkDerivation rec {
sha256 = "1zrl7rz4lwsx88b2shnl985f3a97lmp4ksbd437h9y0hfjq8l0lj";
};
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";
})
];
nativeBuildInputs = [ cmake python3 ];
buildInputs = [ itk ];
doCheck = true;
doCheck = !stdenv.isDarwin; # usual dynamic linker issues
preCheck = "
export LD_LIBRARY_PATH=$(pwd)/bin
@ -24,7 +38,7 @@ stdenv.mkDerivation rec {
homepage = "http://elastix.isi.uu.nl/";
description = "Image registration toolkit based on ITK";
maintainers = with maintainers; [ bcdarwin ];
platforms = platforms.linux;
platforms = platforms.x86_64; # libitkpng linker issues with ITK 5.1
license = licenses.asl20;
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, git, swig, lua, itk, tcl, tk }:
{ stdenv, fetchFromGitHub, cmake, git, swig, lua, itk4, tcl, tk }:
stdenv.mkDerivation rec {
pname = "simpleitk";
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cmake git swig ];
buildInputs = [ lua itk ];
buildInputs = [ lua itk4 ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_CXX_FLAGS='-Wno-attributes'" ];

View file

@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
++ optional enablePython [ "-DVTK_WRAP_PYTHON:BOOL=ON" ];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-7.0|' ./Parallel/Core/CMakeLists.txt
sed -i 's|COMMAND vtkHashSource|COMMAND "DYLD_LIBRARY_PATH=''${VTK_BINARY_DIR}/lib" ''${VTK_BINARY_DIR}/bin/vtkHashSource-${majorVersion}|' ./Parallel/Core/CMakeLists.txt
sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/' ./ThirdParty/libxml2/vtklibxml2/xmlschemas.c
sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/g' ./ThirdParty/libxml2/vtklibxml2/xpath.c
'';

View file

@ -12304,7 +12304,7 @@ in
itk4 = callPackage ../development/libraries/itk/4.x.nix { stdenv = gcc8Stdenv; };
itk = callPackage ../development/libraries/itk {
stdenv = gcc8Stdenv;
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
jasper = callPackage ../development/libraries/jasper { };
@ -14438,7 +14438,10 @@ in
simp_le = callPackage ../tools/admin/simp_le { };
simpleitk = callPackage ../development/libraries/simpleitk { lua = lua51Packages.lua; };
simpleitk = callPackage ../development/libraries/simpleitk {
lua = lua51Packages.lua;
stdenv = gcc8Stdenv;
};
sfml = callPackage ../development/libraries/sfml {
inherit (darwin.apple_sdk.frameworks) IOKit Foundation AppKit OpenAL;
@ -14869,7 +14872,7 @@ in
vte_290 = callPackage ../development/libraries/vte/2.90.nix { };
vtk = callPackage ../development/libraries/vtk {
stdenv = gcc8Stdenv;
stdenv = if stdenv.isDarwin then stdenv else gcc8Stdenv;
inherit (darwin) libobjc;
inherit (darwin.apple_sdk.libs) xpc;
inherit (darwin.apple_sdk.frameworks) Cocoa CoreServices DiskArbitration
@ -24354,7 +24357,7 @@ in
est-sfs = callPackage ../applications/science/biology/est-sfs { };
ezminc = callPackage ../applications/science/biology/EZminc { };
ezminc = callPackage ../applications/science/biology/EZminc { stdenv = gcc8Stdenv; };
exonerate = callPackage ../applications/science/biology/exonerate { };