Merge pull request #299259 from amarshall/blender-4.1
blender: 4.0.2 -> 4.1.0
This commit is contained in:
commit
568583f99a
|
@ -16,7 +16,6 @@
|
|||
cudaSupport ? config.cudaSupport,
|
||||
dbus,
|
||||
embree,
|
||||
fetchpatch,
|
||||
fetchurl,
|
||||
fetchzip,
|
||||
ffmpeg,
|
||||
|
@ -68,7 +67,7 @@
|
|||
pkg-config,
|
||||
potrace,
|
||||
pugixml,
|
||||
python310Packages, # must use instead of python3.pkgs, see https://github.com/NixOS/nixpkgs/issues/211340
|
||||
python311Packages, # must use instead of python3.pkgs, see https://github.com/NixOS/nixpkgs/issues/211340
|
||||
rocmPackages, # comes with a significantly larger closure size
|
||||
runCommand,
|
||||
spaceNavSupport ? stdenv.isLinux,
|
||||
|
@ -82,7 +81,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
python3Packages = python310Packages;
|
||||
python3Packages = python311Packages;
|
||||
python3 = python3Packages.python;
|
||||
pyPkgsOpenusd = python3Packages.openusd.override { withOsl = false; };
|
||||
|
||||
|
@ -100,25 +99,14 @@ in
|
|||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "blender";
|
||||
version = "4.0.2";
|
||||
version = "4.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.blender.org/source/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-qqDnKdp1kc+/RXcq92NFl32qp7EaCvNdmPkxPiRgd6M=";
|
||||
hash = "sha256-3AAtguPDQMk4VcZoRzDQGAG2aaKbHMa3XuuZC6aecj8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./draco.patch
|
||||
(fetchpatch {
|
||||
url = "https://projects.blender.org/blender/blender/commit/cf4365e555a759d5b3225bce77858374cb07faad.diff";
|
||||
hash = "sha256-Nypd04yFSHYa7RBa8kNmoApqJrU4qpaOle3tkj44d4g=";
|
||||
})
|
||||
(fetchpatch {
|
||||
# https://projects.blender.org/blender/blender/issues/117145
|
||||
url = "https://projects.blender.org/blender/blender/commit/eb99895c972b6c713294f68a34798aa51d36034a.patch";
|
||||
hash = "sha256-95nG5mW408lhKJ2BppgaUwBMMeXeGyBqho6mCfB53GI=";
|
||||
})
|
||||
] ++ lib.optional stdenv.isDarwin ./darwin.patch;
|
||||
patches = [ ./draco.patch ] ++ lib.optional stdenv.isDarwin ./darwin.patch;
|
||||
|
||||
postPatch =
|
||||
(
|
||||
|
@ -247,7 +235,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
]
|
||||
++ lib.optionals (!stdenv.isAarch64) [
|
||||
embree
|
||||
openimagedenoise
|
||||
(openimagedenoise.override { inherit cudaSupport; })
|
||||
]
|
||||
++ (
|
||||
if (!stdenv.isDarwin) then
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
Remove upstream workarounds for CMake "limitations" that do not appear to exist
|
||||
in nixpkgs build environment, but rather break the build, presumably because
|
||||
CMAKE_INSTALL_{BIN,LIB}DIR is an absolute path in our build so
|
||||
CMAKE_INSTALL_PREFIX has no effect.
|
||||
|
||||
diff --git a/devices/CMakeLists.txt b/devices/CMakeLists.txt
|
||||
index d5111cd..43986ad 100644
|
||||
--- a/devices/CMakeLists.txt
|
||||
+++ b/devices/CMakeLists.txt
|
||||
@@ -53,7 +53,6 @@ if(OIDN_DEVICE_CUDA)
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=${_host_compiler}
|
||||
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${CMAKE_TOOLCHAIN_FILE}
|
||||
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
||||
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/cuda/preinstall
|
||||
-DCMAKE_INSTALL_BINDIR:PATH=${CMAKE_INSTALL_BINDIR}
|
||||
-DCMAKE_INSTALL_LIBDIR:PATH=${CMAKE_INSTALL_LIBDIR}
|
||||
-DCUDAToolkit_ROOT:PATH=${CUDAToolkit_ROOT}
|
||||
@@ -69,14 +68,6 @@ if(OIDN_DEVICE_CUDA)
|
||||
DEPENDS
|
||||
OpenImageDenoise_core
|
||||
)
|
||||
-
|
||||
- # Due to limitations of CMake, the module is pre-installed at build time to a temporary location,
|
||||
- # and then copied to the real install location at install time.
|
||||
- install(DIRECTORY
|
||||
- ${CMAKE_CURRENT_BINARY_DIR}/cuda/preinstall/
|
||||
- DESTINATION "."
|
||||
- USE_SOURCE_PERMISSIONS
|
||||
- )
|
||||
endif()
|
||||
|
||||
if(OIDN_DEVICE_HIP)
|
|
@ -1,21 +1,45 @@
|
|||
{ lib, stdenv, fetchzip, cmake, tbb, python3, ispc }:
|
||||
{
|
||||
cmake,
|
||||
config,
|
||||
cudaPackages,
|
||||
cudaSupport ? config.cudaSupport,
|
||||
fetchzip,
|
||||
ispc,
|
||||
lib,
|
||||
python3,
|
||||
stdenv,
|
||||
tbb,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openimagedenoise";
|
||||
version = "1.4.3";
|
||||
version = "2.2.2";
|
||||
|
||||
# The release tarballs include pretrained weights, which would otherwise need to be fetched with git-lfs
|
||||
src = fetchzip {
|
||||
url = "https://github.com/OpenImageDenoise/oidn/releases/download/v${version}/oidn-${version}.src.tar.gz";
|
||||
sha256 = "sha256-i73w/Vkr5TPLB1ulPbPU4OVGwdNlky1brfarueD7akE=";
|
||||
sha256 = "sha256-ZIrs4oEb+PzdMh2x2BUFXKyu/HBlFb3CJX24ciEHy3Q=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake python3 ispc ];
|
||||
buildInputs = [ tbb ];
|
||||
patches = lib.optional cudaSupport ./cuda.patch;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
python3
|
||||
ispc
|
||||
] ++ lib.optional cudaSupport cudaPackages.cuda_nvcc;
|
||||
|
||||
buildInputs =
|
||||
[ tbb ]
|
||||
++ lib.optionals cudaSupport [
|
||||
cudaPackages.cuda_cudart
|
||||
cudaPackages.cuda_cccl
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DTBB_ROOT=${tbb}"
|
||||
"-DTBB_INCLUDE_DIR=${tbb.dev}/include"
|
||||
(lib.cmakeBool "OIDN_DEVICE_CUDA" cudaSupport)
|
||||
(lib.cmakeFeature "TBB_INCLUDE_DIR" "${tbb.dev}/include")
|
||||
(lib.cmakeFeature "TBB_ROOT" "${tbb}")
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "opensubdiv";
|
||||
version = "3.5.1";
|
||||
version = "3.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PixarAnimationStudios";
|
||||
repo = "OpenSubdiv";
|
||||
rev = "v${lib.replaceStrings ["."] ["_"] version}";
|
||||
sha256 = "sha256-uDKCT0Uoa5WQekMUFm2iZmzm+oWAZ6IWMwfpchkUZY0=";
|
||||
sha256 = "sha256-liy6pQyWMk7rw0usrCoLGzZLO7RAg0z2pV/GF2NnOkE=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "static" ];
|
||||
|
|
Loading…
Reference in New Issue