itk: enable SimpleITKFilters; minor refactor
This is needed for the SimpleITK Python package to import successfully rather than throw an error due to missing symbols.
This commit is contained in:
parent
120a484726
commit
39fb426da5
|
@ -3,10 +3,7 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper
|
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper
|
||||||
, pkg-config, libX11, libuuid, xz, vtk, Cocoa }:
|
, pkg-config, libX11, libuuid, xz, vtk, Cocoa }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
pname = "itk";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
itkGenericLabelInterpolatorSrc = fetchFromGitHub {
|
itkGenericLabelInterpolatorSrc = fetchFromGitHub {
|
||||||
owner = "InsightSoftwareConsortium";
|
owner = "InsightSoftwareConsortium";
|
||||||
repo = "ITKGenericLabelInterpolator";
|
repo = "ITKGenericLabelInterpolator";
|
||||||
|
@ -21,6 +18,18 @@ stdenv.mkDerivation rec {
|
||||||
hash = "sha256-deJbza36c0Ohf9oKpO2T4po37pkyI+2wCSeGL4r17Go=";
|
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 {
|
src = fetchFromGitHub {
|
||||||
owner = "InsightSoftwareConsortium";
|
owner = "InsightSoftwareConsortium";
|
||||||
repo = "ITK";
|
repo = "ITK";
|
||||||
|
@ -36,6 +45,7 @@ stdenv.mkDerivation rec {
|
||||||
--replace "@OPENJPEG_INSTALL_LIB_DIR@" "@OPENJPEG_INSTALL_FULL_LIB_DIR@"
|
--replace "@OPENJPEG_INSTALL_LIB_DIR@" "@OPENJPEG_INSTALL_FULL_LIB_DIR@"
|
||||||
ln -sr ${itkGenericLabelInterpolatorSrc} Modules/External/ITKGenericLabelInterpolator
|
ln -sr ${itkGenericLabelInterpolatorSrc} Modules/External/ITKGenericLabelInterpolator
|
||||||
ln -sr ${itkAdaptiveDenoisingSrc} Modules/External/ITKAdaptiveDenoising
|
ln -sr ${itkAdaptiveDenoisingSrc} Modules/External/ITKAdaptiveDenoising
|
||||||
|
ln -sr ${itkSimpleITKFiltersSrc} Modules/External/ITKSimpleITKFilters
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
@ -45,6 +55,7 @@ stdenv.mkDerivation rec {
|
||||||
"-DModule_ITKMINC=ON"
|
"-DModule_ITKMINC=ON"
|
||||||
"-DModule_ITKIOMINC=ON"
|
"-DModule_ITKIOMINC=ON"
|
||||||
"-DModule_ITKIOTransformMINC=ON"
|
"-DModule_ITKIOTransformMINC=ON"
|
||||||
|
"-DModule_SimpleITKFilters=ON"
|
||||||
"-DModule_ITKVtkGlue=ON"
|
"-DModule_ITKVtkGlue=ON"
|
||||||
"-DModule_ITKReview=ON"
|
"-DModule_ITKReview=ON"
|
||||||
"-DModule_MGHIO=ON"
|
"-DModule_MGHIO=ON"
|
||||||
|
@ -69,7 +80,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Insight Segmentation and Registration Toolkit";
|
description = "Insight Segmentation and Registration Toolkit";
|
||||||
homepage = "https://www.itk.org/";
|
homepage = "https://www.itk.org";
|
||||||
license = lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
maintainers = with lib.maintainers; [viric];
|
maintainers = with lib.maintainers; [viric];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue