Unverified Commit 9e7786c3 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin Committed by GitHub
Browse files

Merge pull request #255928 from bcdarwin/remove-vtk_8

vtk_8: remove
parents c5c36404 f110cccd
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, mpi, blas, liblapack, pkg-config, libGL, libGLU, opencascade, libsForQt5, tbb, vtkWithQt5 }:
{ lib, stdenv, fetchFromGitHub, cmake, git, gfortran, mpi, blas, liblapack, pkg-config, libGL, libGLU, opencascade-occt, libsForQt5, tbb, vtkWithQt5 }:

stdenv.mkDerivation rec {
  pname = "elmerfem";
  version = "unstable-2023-02-03";
  version = "unstable-2023-09-18";

  src = fetchFromGitHub {
    owner = "elmercsc";
    repo = pname;
    rev = "39c8784b6e4543a6bf560b5d597e0eec1eb06343";
    hash = "sha256-yyxgFvlS+I4PouDL6eD4ZrXuONTDejCSYKq2AwQ0Iug=";
    rev = "0fcced06f91c93f44557efd6a5f10b2da5c7066c";
    hash = "sha256-UuARDYW7D3a4dB6I86s2Ed5ecQxc+Y/es3YIeF2VyTc=";
  };

  hardeningDisable = [ "format" ];
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
    libsForQt5.qwt
    libGL
    libGLU
    opencascade
    opencascade-occt
    tbb
    vtkWithQt5
  ];
+0 −65
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, fetchpatch, libGL, libGLU, libXmu, cmake, ninja,
  pkg-config, fontconfig, freetype, expat, freeimage, vtk_8, gl2ps, tbb,
  OpenCL, Cocoa
}:

stdenv.mkDerivation rec {
  pname = "opencascade-oce";
  version = "0.18.3";

  src = fetchFromGitHub {
    owner = "tpaviot";
    repo = "oce";
    rev = "OCE-${version}";
    sha256 = "17wy8dcf44vqisishv1jjf3cmcxyygqq29y9c3wjdj983qi2hsig";
  };

  nativeBuildInputs = [ cmake ninja pkg-config ];
  buildInputs = [
    libGL libGLU libXmu freetype fontconfig expat freeimage vtk_8
    gl2ps tbb
  ]
    ++ lib.optionals stdenv.isDarwin [OpenCL Cocoa]
  ;

  cmakeFlags = [
    "-DOCE_INSTALL_PREFIX=${placeholder "out"}"
    "-DOCE_WITH_FREEIMAGE=ON"
    "-DOCE_WITH_VTK=ON"
    "-DOCE_WITH_GL2PS=ON"
    "-DOCE_MULTITHREAD_LIBRARY=TBB"
  ]
  ++ lib.optionals stdenv.isDarwin ["-DOCE_OSX_USE_COCOA=ON" "-DOCE_WITH_OPENCL=ON"];

  patches = [
    # Use fontconfig instead of hardcoded directory list
    # https://github.com/tpaviot/oce/pull/714
    (fetchpatch {
      url = "https://github.com/tpaviot/oce/commit/9643432b27fec8974ca0ee15c3c372f5fe8fc069.patch";
      sha256 = "1wd940rszmh5apcpk5fv6126h8mcjcy4rjifrql5d4ac90v06v4c";
    })
    # Fix for glibc 2.26
    (fetchpatch {
      url = "https://github.com/tpaviot/oce/commit/3b44656e93270d782009b06ec4be84d2a13f8126.patch";
      sha256 = "1ccakkcwy5g0184m23x0mnh22i0lk45xm8kgiv5z3pl7nh35dh8k";
    })
    (fetchpatch {
      url = "https://github.com/tpaviot/oce/commit/cf50d078cd5fac03a48fd204938bd240930a08dc.patch";
      sha256 = "1xv94hcvggmb1c8vqwic1aiw9jw1sxk8mqbaak9xs9ycfqdvgdyc";
    })
  ];

  postPatch = ''
    # make sure the installed cmake file uses absolute paths for fontconfig
    substituteInPlace adm/cmake/TKService/CMakeLists.txt \
      --replace FONTCONFIG_LIBRARIES FONTCONFIG_LINK_LIBRARIES
  '';

  meta = with lib; {
    description = "Open CASCADE Technology, libraries for 3D modeling and numerical simulation";
    homepage = "https://github.com/tpaviot/oce";
    maintainers = [ maintainers.viric ];
    platforms = platforms.unix;
    license = licenses.lgpl21;
  };
}
+0 −2
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
, enablePython    ? false, pythonPackages ? null
, enableGtk2      ? false, gtk2
, enableGtk3      ? false, gtk3
, enableVtk       ? false, vtk_8
, enableFfmpeg    ? false, ffmpeg
, enableGStreamer ? false, gst_all_1
, enableTesseract ? false, tesseract, leptonica
@@ -191,7 +190,6 @@ stdenv.mkDerivation {
    ++ lib.optional enablePython pythonPackages.python
    ++ lib.optional enableGtk2 gtk2
    ++ lib.optional enableGtk3 gtk3
    ++ lib.optional enableVtk vtk_8
    ++ lib.optional enableJPEG libjpeg
    ++ lib.optional enablePNG libpng
    ++ lib.optional enableTIFF libtiff
+12 −4
Original line number Diff line number Diff line
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, doxygen,
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, doxygen,
  libX11, libXinerama, libXrandr, libGLU, libGL,
  glib, ilmbase, libxml2, pcre, zlib,
  AGL, Accelerate, Carbon, Cocoa, Foundation,
@@ -11,7 +11,7 @@
  gdalSupport ? false, gdal,
  curlSupport ? true, curl,
  colladaSupport ? false, collada-dom,
  opencascadeSupport ? false, opencascade,
  opencascadeSupport ? false, opencascade-occt,
  ffmpegSupport ? false, ffmpeg,
  nvttSupport ? false, nvidia-texture-tools,
  freetypeSupport ? true, freetype,
@@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
    ++ lib.optional gdalSupport gdal
    ++ lib.optional curlSupport curl
    ++ lib.optional colladaSupport collada-dom
    ++ lib.optional opencascadeSupport opencascade
    ++ lib.optional opencascadeSupport opencascade-occt
    ++ lib.optional ffmpegSupport ffmpeg
    ++ lib.optional nvttSupport nvidia-texture-tools
    ++ lib.optional freetypeSupport freetype
@@ -68,6 +68,14 @@ stdenv.mkDerivation rec {
    ++ lib.optional (restSupport || colladaSupport) boost
    ;

  patches = [
    (fetchpatch {
      name = "opencascade-api-patch";
      url = "https://github.com/openscenegraph/OpenSceneGraph/commit/bc2daf9b3239c42d7e51ecd7947d31a92a7dc82b.patch";
      hash = "sha256-VR8YKOV/YihB5eEGZOGaIfJNrig1EPS/PJmpKsK284c=";
    })
  ];

  cmakeFlags = lib.optional (!withApps) "-DBUILD_OSG_APPLICATIONS=OFF" ++ lib.optional withExamples "-DBUILD_OSG_EXAMPLES=ON";

  meta = with lib; {
+39 −13
Original line number Diff line number Diff line
{ lib, stdenv, gtest, fetchFromGitHub, cmake, boost, eigen, python3, vtk_8, zlib, tbb }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
, python3
, boost
, eigen
, libGLU
, fltk
, itk
, vtk
, zlib
, tbb
}:

stdenv.mkDerivation rec {
  version = "2.0.0";
  pname = "mirtk";
  version = "unstable-2022-07-22";

  src = fetchFromGitHub {
    owner = "BioMedIA";
    repo = "MIRTK";
    rev = "v${version}";
    sha256 = "0i2v97m66ir5myvi5b123r7zcagwy551b73s984gk7lksl5yiqxk";
    rev = "973ce2fe3f9508dec68892dbf97cca39067aa3d6";
    hash = "sha256-vKgkDrbyGOcbaYlxys1duC8ZNG0Y2nqh3TtSQ06Ox0Q=";
    fetchSubmodules = true;
  };

@@ -16,23 +29,36 @@ stdenv.mkDerivation rec {
    "-DWITH_VTK=ON"
    "-DBUILD_ALL_MODULES=ON"
    "-DWITH_TBB=ON"
    "-DWITH_ITK=ON"
    "-DWITH_GIFTICLIB=ON"
    "-DWITH_NIFTILIB=ON"
  ];

  doCheck = true;

  checkPhase = ''
    ctest -E '(Polynomial|ConvolutionFunction|Downsampling|EdgeTable|InterpolateExtrapolateImage)'
  # tries to download data during configuration
  postPatch = ''
    substituteInPlace Packages/DrawEM/CMakeLists.txt --replace "include(Atlases.cmake)" ""
  '';
  # testPolynomial - segfaults for some reason
  # testConvolutionFunction, testDownsampling - main not called correctly
  # testEdgeTable, testInterpolateExtrapolateImageFunction - setup fails

  # tests don't seem to be maintained and gtest fails to link with BUILD_TESTING=ON;
  # unclear if specific to Nixpkgs
  doCheck = false;

  postInstall = ''
    install -Dm644 -t "$out/share/bash-completion/completions/mirtk" share/completion/bash/mirtk
  '';

  nativeBuildInputs = [ cmake gtest ];
  buildInputs = [ boost eigen python3 vtk_8 zlib tbb ];
  nativeBuildInputs = [ cmake ];
  buildInputs = [
    boost
    eigen
    fltk
    itk
    libGLU.dev
    python3
    tbb
    vtk
    zlib
  ];

  meta = with lib; {
    homepage = "https://github.com/BioMedIA/MIRTK";
Loading