Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions pkgs/applications/misc/blender/draco.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
cudaSupport ? config.cudaSupport,
dbus,
embree,
fetchgit,
fetchpatch2,
fetchzip,
ffmpeg,
fftw,
Expand Down Expand Up @@ -56,7 +54,7 @@
makeWrapper,
mesa,
openal,
opencollada,
opencollada-blender,
opencolorio,
openexr,
openimagedenoise,
Expand Down Expand Up @@ -114,42 +112,15 @@ in

stdenv'.mkDerivation (finalAttrs: {
pname = "blender";
version = "4.3.2";
version = "4.4.0";

srcs = [
(fetchzip {
name = "source";
url = "https://download.blender.org/source/blender-${finalAttrs.version}.tar.xz";
hash = "sha256-LCU2JpQbvQ+W/jC+H8J2suh+X5sTLOG9TcE2EeHqVh4=";
})
(fetchgit {
name = "assets";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe my crash and glitch came from missing some assets?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s in the commit message, but the assets are now bundled in the release tarball. The only difference is the release tarball doesn’t have Git-specific files like .gitattributes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, missed that.

url = "https://projects.blender.org/blender/blender-assets.git";
rev = "v${finalAttrs.version}";
fetchLFS = true;
hash = "sha256-B/UibETNBEUAO1pLCY6wR/Mmdk2o9YyNs6z6pV8dBJI=";
})
];

postUnpack = ''
chmod -R u+w *
rm -r assets/working
mv assets --target-directory source/release/datafiles/
'';

sourceRoot = "source";
srcs = fetchzip {
name = "source";
url = "https://download.blender.org/source/blender-${finalAttrs.version}.tar.xz";
hash = "sha256-pAzOayAPyRYgTixAyg2prkUtI70uFulRuBYhgU9ZNw4=";
};

patches = [
./draco.patch
(fetchpatch2 {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/blender/-/raw/4b6214600e11851d7793256e2f6846a594e6f223/ffmpeg-7-1.patch";
hash = "sha256-YXXqP/+79y3f41n3cJ3A1RBzgdoYqfKZD/REqmWYdgQ=";
})
(fetchpatch2 {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/blender/-/raw/4b6214600e11851d7793256e2f6846a594e6f223/ffmpeg-7-2.patch";
hash = "sha256-mF6IA/dbHdNEkBN5XXCRcLIZ/8kXoirNwq7RDuLRAjw=";
})
] ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin.patch;
patches = [ ] ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin.patch;

postPatch =
(lib.optionalString stdenv.hostPlatform.isDarwin ''
Expand Down Expand Up @@ -201,6 +172,7 @@ stdenv'.mkDerivation (finalAttrs: {
"-DWITH_OPENIMAGEDENOISE=${if openImageDenoiseSupport then "ON" else "OFF"}"
"-DWITH_OPENSUBDIV=ON"
"-DWITH_OPENVDB=ON"
"-DWITH_PIPEWIRE=OFF"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific reason, why we want no pipewire?
Or could we make this optional, same as jack?

Copy link
Contributor

@VuiMuich VuiMuich Mar 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw your note in the commit message, sorry for not looking there first.

Still an option might be nice to have, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally don’t really want to support something that upstream doesn’t support (src). It’s an outstanding todo item, IMO, to more properly consume Blender’s own release config in our packaging so we make fewer deviations.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, with that It sure makes to wait for upstream defaulting to ON.

"-DWITH_PULSEAUDIO=OFF"
"-DWITH_PYTHON_INSTALL=OFF"
"-DWITH_PYTHON_INSTALL_NUMPY=OFF"
Expand Down Expand Up @@ -330,7 +302,7 @@ stdenv'.mkDerivation (finalAttrs: {
wayland
wayland-protocols
]
++ lib.optional colladaSupport opencollada
++ lib.optional colladaSupport opencollada-blender
++ lib.optional jackaudioSupport libjack2
++ lib.optional spaceNavSupport libspnav
++ lib.optionals vulkanSupport [
Expand Down Expand Up @@ -365,9 +337,6 @@ stdenv'.mkDerivation (finalAttrs: {
mkdir $out/Applications
mv $out/Blender.app $out/Applications
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
mv $out/share/blender/${lib.versions.majorMinor finalAttrs.version}/python{,-ext}
''
+ ''
buildPythonPath "$pythonPath"
wrapProgram $blenderExecutable \
Expand Down
39 changes: 39 additions & 0 deletions pkgs/by-name/op/opencollada-blender/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
cmake,
fetchFromGitHub,
lib,
libxml2,
pcre,
pkg-config,
stdenv,
}:

stdenv.mkDerivation {
pname = "opencollada";
version = "unstable-2025-01-30";

src = fetchFromGitHub {
owner = "aras-p";
repo = "OpenCOLLADA";
rev = "4526eb8aaa6462c71fbedd23103976c151a01c50";
sha256 = "sha256-ctr+GjDzxOJxBfaMwjwayPkAOcF+FMsP1X72QCOwvTY=";
};

nativeBuildInputs = [
cmake
pkg-config
];

propagatedBuildInputs = [
libxml2
pcre
];

meta = {
description = "Library for handling the COLLADA file format";
homepage = "https://github.com/KhronosGroup/OpenCOLLADA/";
maintainers = [ lib.maintainers.amarshall ];
platforms = lib.platforms.unix;
license = lib.licenses.mit;
};
}
33 changes: 14 additions & 19 deletions pkgs/by-name/op/opencollada/package.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
lib,
stdenv,
cmake,
fetchFromGitHub,
fetchurl,
cmake,
pkg-config,
lib,
libxml2,
pcre,
darwin,
pkg-config,
stdenv,
}:

stdenv.mkDerivation rec {
pname = "opencollada";

version = "1.6.68";

src = fetchFromGitHub {
Expand All @@ -32,19 +30,6 @@ stdenv.mkDerivation rec {
})
];

nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks; [ AGL ]
);

propagatedBuildInputs = [
libxml2
pcre
];

postPatch =
''
# Drop blanket -Werror as it tends to fail on newer toolchain for
Expand All @@ -56,6 +41,16 @@ stdenv.mkDerivation rec {
--replace math.h cmath
'';

nativeBuildInputs = [
cmake
pkg-config
];

propagatedBuildInputs = [
libxml2
pcre
];

meta = {
description = "Library for handling the COLLADA file format";
homepage = "https://github.com/KhronosGroup/OpenCOLLADA/";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12624,7 +12624,7 @@ with pkgs;
pinentry = pinentry-curses;
};

blender = callPackage ../applications/misc/blender {
blender = callPackage ../by-name/bl/blender/package.nix {
openexr = openexr_3;
python3Packages = python311Packages;
inherit (darwin.apple_sdk.frameworks) Cocoa CoreGraphics ForceFeedback OpenAL OpenGL;
Expand Down