Unverified Commit 61c6a191 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #212901 from bcdarwin/itk-ants-unpin-vtk

itk, ants: unpin vtk
parents 13645205 b2783880
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, itk, vtk_8, Cocoa }:
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, itk, vtk, Cocoa }:

stdenv.mkDerivation rec {
  pname = "ANTs";
@@ -7,12 +7,12 @@ stdenv.mkDerivation rec {
  src = fetchFromGitHub {
    owner  = "ANTsX";
    repo   = "ANTs";
    rev    = "v${version}";
    rev    = "refs/tags/v${version}";
    sha256 = "sha256-S4HYhsqof27UXEYjKvbod8N7PkZDmwLdwcEAvJD0W5g=";
  };

  nativeBuildInputs = [ cmake makeWrapper ];
  buildInputs = [ itk vtk_8 ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
  buildInputs = [ itk vtk ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];

  cmakeFlags = [ "-DANTS_SUPERBUILD=FALSE" "-DUSE_VTK=TRUE" ];

+10 −2
Original line number Diff line number Diff line
{ version, rev, sourceSha256 }:

{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper
, pkg-config, libX11, libuuid, xz, vtk_8, Cocoa }:
, pkg-config, libX11, libuuid, xz, vtk, Cocoa }:

stdenv.mkDerivation rec {
  pname = "itk";
@@ -53,7 +53,15 @@ stdenv.mkDerivation rec {
  ];

  nativeBuildInputs = [ cmake xz makeWrapper ];
  buildInputs = [ libX11 libuuid vtk_8 ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
  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"