mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 10:14:09 +00:00
Merge pull request #222582 from bcdarwin/python3-simpleitk
python310Packages.simpleitk: init at 2.2.1
This commit is contained in:
commit
f8dd50d295
@ -3,10 +3,7 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper
|
||||
, pkg-config, libX11, libuuid, xz, vtk, Cocoa }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "itk";
|
||||
inherit version;
|
||||
|
||||
let
|
||||
itkGenericLabelInterpolatorSrc = fetchFromGitHub {
|
||||
owner = "InsightSoftwareConsortium";
|
||||
repo = "ITKGenericLabelInterpolator";
|
||||
@ -21,6 +18,18 @@ stdenv.mkDerivation rec {
|
||||
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";
|
||||
@ -36,6 +45,7 @@ stdenv.mkDerivation rec {
|
||||
--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 = [
|
||||
@ -45,6 +55,7 @@ stdenv.mkDerivation rec {
|
||||
"-DModule_ITKMINC=ON"
|
||||
"-DModule_ITKIOMINC=ON"
|
||||
"-DModule_ITKIOTransformMINC=ON"
|
||||
"-DModule_SimpleITKFilters=ON"
|
||||
"-DModule_ITKVtkGlue=ON"
|
||||
"-DModule_ITKReview=ON"
|
||||
"-DModule_MGHIO=ON"
|
||||
@ -69,7 +80,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = {
|
||||
description = "Insight Segmentation and Registration Toolkit";
|
||||
homepage = "https://www.itk.org/";
|
||||
homepage = "https://www.itk.org";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
};
|
||||
|
@ -4,12 +4,10 @@ stdenv.mkDerivation rec {
|
||||
pname = "simpleitk";
|
||||
version = "2.2.1";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "SimpleITK";
|
||||
repo = "SimpleITK";
|
||||
rev = "v${version}";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-0YxmixUTXpjegZQv7DDCNTWFTH8QEWqQQszee7aQ5EI=";
|
||||
};
|
||||
|
||||
|
27
pkgs/development/python-modules/simpleitk/default.nix
Normal file
27
pkgs/development/python-modules/simpleitk/default.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, swig4
|
||||
, itk
|
||||
, numpy
|
||||
, simpleitk
|
||||
, scikit-build
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
inherit (simpleitk) pname version src meta;
|
||||
format = "pyproject";
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
sourceRoot = "source/Wrapping/Python";
|
||||
preBuild = ''
|
||||
make
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake swig4 scikit-build ];
|
||||
propagatedBuildInputs = [ itk simpleitk numpy ];
|
||||
|
||||
pythonImportsCheck = [ "SimpleITK" ];
|
||||
}
|
@ -10828,6 +10828,10 @@ self: super: with self; {
|
||||
|
||||
simplehound = callPackage ../development/python-modules/simplehound { };
|
||||
|
||||
simpleitk = callPackage ../development/python-modules/simpleitk {
|
||||
inherit (pkgs) simpleitk;
|
||||
};
|
||||
|
||||
simplejson = callPackage ../development/python-modules/simplejson { };
|
||||
|
||||
simplekml = callPackage ../development/python-modules/simplekml { };
|
||||
|
Loading…
Reference in New Issue
Block a user