diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-06-16 06:56:35 +0000 |
commit | 99fcaeccb89621dd492203ce1f2d551c06f228ed (patch) | |
tree | 41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/libraries/itk | |
parent | 59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff) | |
parent | 75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff) | |
download | nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2 nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/nixos/modules/config/console.nix nixpkgs/nixos/modules/services/mail/mailman.nix nixpkgs/nixos/modules/services/mail/public-inbox.nix nixpkgs/nixos/modules/services/mail/rss2email.nix nixpkgs/nixos/modules/services/networking/ssh/sshd.nix nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix nixpkgs/pkgs/applications/networking/irc/weechat/default.nix nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/interpreters/python/default.nix nixpkgs/pkgs/development/node-packages/overrides.nix nixpkgs/pkgs/development/tools/b4/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix nixpkgs/pkgs/servers/mail/public-inbox/default.nix nixpkgs/pkgs/tools/security/pinentry/default.nix nixpkgs/pkgs/tools/text/unoconv/default.nix nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/itk')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/itk/4.x.nix | 35 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/itk/5.2.x.nix | 5 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/itk/5.x.nix | 5 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/itk/default.nix | 44 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/itk/generic.nix | 87 |
5 files changed, 97 insertions, 79 deletions
diff --git a/nixpkgs/pkgs/development/libraries/itk/4.x.nix b/nixpkgs/pkgs/development/libraries/itk/4.x.nix deleted file mode 100644 index 54a3c33cd017..000000000000 --- a/nixpkgs/pkgs/development/libraries/itk/4.x.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, cmake, libX11, libuuid, xz, vtk_7, Cocoa }: - -stdenv.mkDerivation rec { - pname = "itk"; - version = "4.13.3"; - - src = fetchFromGitHub { - owner = "InsightSoftwareConsortium"; - repo = "ITK"; - rev = "v${version}"; - sha256 = "067vkh39jxcvyvn69qjh4vi3wa7vdvm9m6qsg3jmnmm7gzw0kjlm"; - }; - - cmakeFlags = [ - "-DBUILD_TESTING=OFF" - "-DBUILD_EXAMPLES=OFF" - "-DBUILD_SHARED_LIBS=ON" - "-DModule_ITKMINC=ON" - "-DModule_ITKIOMINC=ON" - "-DModule_ITKIOTransformMINC=ON" - "-DModule_ITKVtkGlue=ON" - "-DModule_ITKReview=ON" - ]; - - nativeBuildInputs = [ cmake xz ]; - buildInputs = [ libX11 libuuid vtk_7 ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; - - meta = { - description = "Insight Segmentation and Registration Toolkit"; - homepage = "https://www.itk.org/"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [viric]; - platforms = with lib.platforms; linux ++ darwin; - }; -} diff --git a/nixpkgs/pkgs/development/libraries/itk/5.2.x.nix b/nixpkgs/pkgs/development/libraries/itk/5.2.x.nix new file mode 100644 index 000000000000..e50f2bbca494 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/itk/5.2.x.nix @@ -0,0 +1,5 @@ +import ./generic.nix rec { + version = "5.2.1"; + rev = "v${version}"; + sourceSha256 = "sha256-KaVe9FMGm4ZVMpwAT12fA67T0qZS3ZueiI8z85+xSwE="; +} diff --git a/nixpkgs/pkgs/development/libraries/itk/5.x.nix b/nixpkgs/pkgs/development/libraries/itk/5.x.nix new file mode 100644 index 000000000000..765b464e46a1 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/itk/5.x.nix @@ -0,0 +1,5 @@ +import ./generic.nix rec { + version = "5.3.0"; + rev = "v${version}"; + sourceSha256 = "sha256-+qCd8Jzpl5fEPTUpLyjjFBkfgCn3+Lf4pi8QnjCwofs="; +} diff --git a/nixpkgs/pkgs/development/libraries/itk/default.nix b/nixpkgs/pkgs/development/libraries/itk/default.nix deleted file mode 100644 index 08971c4c81c1..000000000000 --- a/nixpkgs/pkgs/development/libraries/itk/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper -, pkg-config, libX11, libuuid, xz, vtk, Cocoa }: - -stdenv.mkDerivation rec { - pname = "itk"; - version = "5.2.1"; - - src = fetchFromGitHub { - owner = "InsightSoftwareConsortium"; - repo = "ITK"; - rev = "v${version}"; - sha256 = "sha256-KaVe9FMGm4ZVMpwAT12fA67T0qZS3ZueiI8z85+xSwE="; - }; - - postPatch = '' - substituteInPlace CMake/ITKSetStandardCompilerFlags.cmake \ - --replace "-march=corei7" "" \ - --replace "-mtune=native" "" - ''; - - cmakeFlags = [ - "-DBUILD_EXAMPLES=OFF" - "-DBUILD_SHARED_LIBS=ON" - "-DModule_ITKMINC=ON" - "-DModule_ITKIOMINC=ON" - "-DModule_ITKIOTransformMINC=ON" - "-DModule_ITKVtkGlue=ON" - "-DModule_ITKReview=ON" - ]; - - nativeBuildInputs = [ cmake xz makeWrapper ]; - buildInputs = [ libX11 libuuid vtk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; - - postInstall = '' - wrapProgram "$out/bin/h5c++" --prefix PATH ":" "${pkg-config}/bin" - ''; - - meta = { - description = "Insight Segmentation and Registration Toolkit"; - homepage = "https://www.itk.org/"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [viric]; - }; -} diff --git a/nixpkgs/pkgs/development/libraries/itk/generic.nix b/nixpkgs/pkgs/development/libraries/itk/generic.nix new file mode 100644 index 000000000000..3a6b2afee0d9 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/itk/generic.nix @@ -0,0 +1,87 @@ +{ version, rev, sourceSha256 }: + +{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper +, pkg-config, libX11, libuuid, xz, vtk, Cocoa }: + +let + itkGenericLabelInterpolatorSrc = fetchFromGitHub { + owner = "InsightSoftwareConsortium"; + repo = "ITKGenericLabelInterpolator"; + rev = "2f3768110ffe160c00c533a1450a49a16f4452d9"; + hash = "sha256-Cm3jg14MMnbr/sP+gqR2Rh25xJjoRvpmY/jP/DKH978="; + }; + + itkAdaptiveDenoisingSrc = fetchFromGitHub { + owner = "ntustison"; + repo = "ITKAdaptiveDenoising"; + rev = "24825c8d246e941334f47968553f0ae388851f0c"; + hash = "sha256-deJbza36c0Ohf9oKpO2T4po37pkyI+2wCSeGL4r17Go="; + }; + + itkSimpleITKFiltersSrc = fetchFromGitHub { + owner = "InsightSoftwareConsortium"; + repo = "ITKSimpleITKFilters"; + rev = "bb896868fc6480835495d0da4356d5db009592a6"; + hash = "sha256-MfaIA0xxA/pzUBSwnAevr17iR23Bo5iQO2cSyknS3o4="; + }; +in + +stdenv.mkDerivation { + pname = "itk"; + inherit version; + + src = fetchFromGitHub { + owner = "InsightSoftwareConsortium"; + repo = "ITK"; + inherit rev; + sha256 = sourceSha256; + }; + + postPatch = '' + substituteInPlace CMake/ITKSetStandardCompilerFlags.cmake \ + --replace "-march=corei7" "" \ + --replace "-mtune=native" "" + substituteInPlace Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/libopenjp2.pc.cmake.in \ + --replace "@OPENJPEG_INSTALL_LIB_DIR@" "@OPENJPEG_INSTALL_FULL_LIB_DIR@" + ln -sr ${itkGenericLabelInterpolatorSrc} Modules/External/ITKGenericLabelInterpolator + ln -sr ${itkAdaptiveDenoisingSrc} Modules/External/ITKAdaptiveDenoising + ln -sr ${itkSimpleITKFiltersSrc} Modules/External/ITKSimpleITKFilters + ''; + + cmakeFlags = [ + "-DBUILD_EXAMPLES=OFF" + "-DBUILD_SHARED_LIBS=ON" + "-DITK_FORBID_DOWNLOADS=ON" + "-DModule_ITKMINC=ON" + "-DModule_ITKIOMINC=ON" + "-DModule_ITKIOTransformMINC=ON" + "-DModule_SimpleITKFilters=ON" + "-DModule_ITKVtkGlue=ON" + "-DModule_ITKReview=ON" + "-DModule_MGHIO=ON" + "-DModule_AdaptiveDenoising=ON" + "-DModule_GenericLabelInterpolator=ON" + ]; + + nativeBuildInputs = [ cmake xz makeWrapper ]; + buildInputs = [ libX11 libuuid vtk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; + # Due to ITKVtkGlue=ON and the additional dependencies needed to configure VTK 9 + # (specifically libGL and libX11 on Linux), + # it's now seemingly necessary for packages that configure ITK to + # also include configuration deps of VTK, even if VTK is not required or available. + # These deps were propagated from VTK 9 in https://github.com/NixOS/nixpkgs/pull/206935, + # so we simply propagate them again from ITK. + # This admittedly is a hack and seems like an issue with VTK 9's CMake configuration. + propagatedBuildInputs = vtk.propagatedBuildInputs; + + postInstall = '' + wrapProgram "$out/bin/h5c++" --prefix PATH ":" "${pkg-config}/bin" + ''; + + meta = { + description = "Insight Segmentation and Registration Toolkit"; + homepage = "https://www.itk.org"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [viric]; + }; +} |