Commit 72addac9 authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

openimagedenoise: minor cleanup

parent 31c1182b
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -19,10 +19,14 @@ stdenv.mkDerivation (finalAttrs: {
  # The release tarballs include pretrained weights, which would otherwise need to be fetched with git-lfs
  src = fetchzip {
    url = "https://github.com/RenderKit/oidn/releases/download/v${finalAttrs.version}/oidn-${finalAttrs.version}.src.tar.gz";
    sha256 = "sha256-SM0Bn4qgeqRJAXr2MMjNjfWJVTcciERZxMHiyx4Z1hA=";
    hash = "sha256-SM0Bn4qgeqRJAXr2MMjNjfWJVTcciERZxMHiyx4Z1hA=";
  };

  patches = lib.optional cudaSupport ./cuda.patch;
  strictDeps = true;

  patches = lib.optionals cudaSupport [
    ./cuda.patch
  ];

  postPatch = ''
    # fix build failure with GCC14
@@ -35,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
    python3
    ispc
  ]
  ++ lib.optional cudaSupport cudaPackages.cuda_nvcc
  ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodebuild ];

  buildInputs = [
@@ -49,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {

  cmakeFlags = [
    (lib.cmakeBool "OIDN_DEVICE_CUDA" cudaSupport)
    (lib.cmakeFeature "TBB_INCLUDE_DIR" "${onetbb.dev}/include")
    (lib.cmakeFeature "TBB_INCLUDE_DIR" "${lib.getDev onetbb}/include")
    (lib.cmakeFeature "TBB_ROOT" "${onetbb}")
  ];