Skip to content

Commit

Permalink
itk: Adds RTK remote crate
Browse files Browse the repository at this point in the history
  • Loading branch information
purepani committed Nov 1, 2024
1 parent b7995be commit d90c9b9
Showing 1 changed file with 41 additions and 32 deletions.
73 changes: 41 additions & 32 deletions pkgs/development/libraries/itk/generic.nix
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
version,
rev,
sourceSha256,
{ version
, rev
, sourceSha256
,
}:

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
castxml,
swig,
expat,
eigen,
fftw,
gdcm,
hdf5-cpp,
libjpeg,
libminc,
libtiff,
libpng,
libX11,
libuuid,
patchelf,
python ? null,
numpy ? null,
xz,
vtk,
which,
zlib,
Cocoa,
enablePython ? false,
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, castxml
, swig
, expat
, eigen
, fftw
, gdcm
, hdf5-cpp
, libjpeg
, libminc
, libtiff
, libpng
, libX11
, libuuid
, patchelf
, python ? null
, numpy ? null
, xz
, vtk
, which
, zlib
, Cocoa
, enablePython ? false
,
}:

let
Expand Down Expand Up @@ -59,6 +59,13 @@ let
hash = "sha256-MfaIA0xxA/pzUBSwnAevr17iR23Bo5iQO2cSyknS3o4=";
};

rtkSrc = fetchFromGitHub {
owner = "RTKConsortium";
repo = "RTK";
rev = "583288b1898dedcfb5e4d602e31020b452971383";
hash = "sha256-1ItsLCRwRzGDSRe4xUDg09Hksu1nKichbWuM0YSVkbM=";
};

# remove after next swig update:
swigUnstable = swig.overrideAttrs ({
version = "4.2.1-unstable-2024-08-19";
Expand Down Expand Up @@ -99,6 +106,7 @@ stdenv.mkDerivation {
ln -sr ${itkGenericLabelInterpolatorSrc} Modules/External/ITKGenericLabelInterpolator
ln -sr ${itkAdaptiveDenoisingSrc} Modules/External/ITKAdaptiveDenoising
ln -sr ${itkSimpleITKFiltersSrc} Modules/External/ITKSimpleITKFilters
ln -sr ${rtkSrc} Modules/Remote/RTK
'';

cmakeFlags =
Expand All @@ -121,6 +129,7 @@ stdenv.mkDerivation {
"-DModule_MGHIO=ON"
"-DModule_AdaptiveDenoising=ON"
"-DModule_GenericLabelInterpolator=ON"
"-DModule_RTK=ON"
]
++ lib.optionals enablePython [
"-DITK_WRAP_PYTHON=ON"
Expand Down

0 comments on commit d90c9b9

Please sign in to comment.