Commit Graph

224 Commits

Author SHA1 Message Date
Andrew Marshall
6faf3cb673 blender: build with strict options to prevent unexpected missing libs
Blender build will, by default, warn for most missing libs and silently
disable the feature. This can cause unexpected behavior, so instead flip
its option to turn those warnings into errors. This, for example, would
have caught at build time (rather than runtime) the previously-missing
wayland-scanner dependency that caused crashes.

As a result, adjust existing build config to reflect reality and fix the
“new” errors.
2024-09-06 17:14:00 -04:00
Andrew Marshall
1b93140f68 blender: formatting 2024-09-06 10:06:04 -04:00
Andrew Marshall
0b3130d064 blender: fix runtime crash by adding missing wayland-scanner
Without this, it crashes on launch or render when using (at least)
Nvidia GPUs. Blender build needs this, but currently only warns during
build.

See also:
https://github.com/NixOS/nixpkgs/pull/214906
https://github.com/NixOS/nixpkgs/issues/340080
2024-09-06 10:06:04 -04:00
Andrew Marshall
9218a080e9 blender: add myself as maintainer
Have done quite a few commits to this package, and most of the recent
bumps, so I suppose it makes sense, especially given only one
maintainer currently.
2024-08-25 01:01:29 -04:00
Andrew Marshall
d1938c997c blender: 4.2.0 -> 4.2.1
Changelog: https://www.blender.org/download/lts/4-2/
2024-08-25 01:01:19 -04:00
Martin Weinelt
93f4195fe0
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/applications/graphics/seamly2d/default.nix
2024-07-26 18:05:04 +02:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
github-actions[bot]
7208220b63
Merge master into staging-next 2024-07-24 18:01:18 +00:00
Ivan Trubach
90fbf71333 treewide: remove maintainer goibhniu
Inactive in Nixpkgs since 2018 (and a single PR in 2022).
https://github.com/NixOS/nixpkgs/issues?q=author%3Acillianderoiste
2024-07-24 13:38:22 +03:00
github-actions[bot]
4c086d8ee0
Merge staging-next into staging 2024-07-17 00:03:16 +00:00
Andrew Marshall
a5139cf271 blender: 4.1.1 -> 4.2.0
Changelog: https://developer.blender.org/docs/release_notes/4.2/

- Since we are using `srcs` instead of `src`, now need to use `fetchzip`
  instead of `fetchurl`
- Bundled assets are no longer included in source tarball, but they are
  in the built-release tarball, so fetch them and move them into place.
- fetchpatch-ed commit is now included
- clew is removed upstream, so no need to patch it
- EEVEE is replaced by EEVEE Next
- Addons have been relocated
2024-07-16 11:40:11 -04:00
Vladimír Čunát
211398c03e
Merge branch 'staging-next' into staging 2024-07-14 08:35:35 +02:00
éclairevoyant
0926bdbf98
treewide: fix uses of finalAttrs.pname in source urls 2024-07-12 20:23:39 -04:00
github-actions[bot]
b66506a79e
Merge staging-next into staging 2024-07-12 12:01:44 +00:00
Andrew Marshall
36757e284c blender: verify expected Python version during build
Upstream builds and tests with a specific Python version. Further, the
Blender addon ecosystem generally expects that version to be used, so
ensure that the correct version is used when upstream changes. Python
often makes backwards-incompatible changes in “minor” releases.

To quote upstream source code:

> Blender only supports a single Python version at the moment.

Perform the check during preConfigure since we can check it then and so
it avoids wasting time configuring+building and then failing.
2024-07-11 10:15:22 -04:00
Martin Weinelt
176a56c40f
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/applications/misc/blender/default.nix
- pkgs/development/web/nodejs/nodejs.nix
2024-07-11 01:06:28 +02:00
Andrew Marshall
c47cca3634
blender: use materialx with correct Python version
The top-level materialx is with the default `python3`, we want to use
the version matching the Python we are using here.
2024-07-10 12:02:38 +02:00
Florian Brandes
4dbf1080fd
blender: format
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2024-07-08 08:29:06 +02:00
Florian Brandes
46861969d7
blender: fix build
- fetch upstream patch
- update to python3.12

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2024-07-08 08:28:53 +02:00
Sefa Eyeoglu
416ba8804b
treewide: use addDriverRunpath
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2024-06-30 15:01:01 -04:00
Martin Weinelt
d50a1e97b1
Merge remote-tracking branch 'origin/master' into staging-next 2024-06-27 16:16:01 +02:00
Someone Serge
79a7186f1c cudaPackages: updated convention for gpu/runtime checks
Runtime tests (derivations asking for a relaxed sandbox) are now
expected at p.gpuCheck, p.gpuChecks.<name>, or at
p.tests.<name>.gpuCheck.
2024-06-26 16:00:29 +00:00
Someone Serge
ebeb6b9d1d nix-required-mounts: nixfmt 2024-06-26 00:35:45 +00:00
Someone Serge
da430f4872 blender.gpuChecks: add unwrapped
An unwrapped check for `nix run`-ing on the host platform,
instead of `nix build`-ing in the sandbox

E.g.:

```
❯ nix run -f ./. --arg config '{ cudaSupport = true; cudaCapabilities = [ "8.6" ]; cudaEnableForwardCompat = false; allowUnfree = true; }' -L blender.gpuChecks.cudaAvailable.unwrapped
Blender 4.0.1
Read prefs: "/home/user/.config/blender/4.0/config/userpref.blend"
CUDA is available
Blender quit
❯ nix build -f ./. --arg config '{ cudaSupport = true; cudaCapabilities = [ "8.6" ]; cudaEnableForwardCompat = false; allowUnfree = true; }' -L blender.gpuChecks
blender> Blender 4.0.1
blender> could not get a list of mounted file-systems
blender> CUDA is available
blender> Blender quit
```
2024-06-26 00:35:45 +00:00
Someone Serge
efd64b5f0b cudaPackages: move cuda tests from passthru.tests
Otherwise we crash Ofborg
2024-06-26 00:35:45 +00:00
Someone Serge
b9299696ab blender: add CUDA discovery test 2024-06-26 00:35:42 +00:00
K900
b0a82fe902 mesa: add llvmpipeHook for software rendering setup 2024-06-15 11:07:15 +03:00
Florian Brandes
442860880f
blender: add materialx
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2024-05-07 21:32:34 +02:00
Florian Brandes
b9ca769194
blender: un-break darwin
currently builds on aarch64-darwin, but not on x86_64-darwin.

Blender (specifically the ghost window library) depends on "metal" on
apple devices.
(For details see source/intern/ghost/intern/GHOST_System.cc line 416ff)

It cannot build without it. Metal support should be
introduced by apple sdk 11_1 (?) onward. Once this has been updated in
nixpkgs, this derivation can be revised.

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
Co-authored-by: Alexis Hildebrandt <afh@surryhill.net>
2024-05-07 21:32:26 +02:00
Andrew Marshall
b291233983 blender: 4.1.0 -> 4.1.1 2024-04-19 14:58:56 -04:00
Andrew Marshall
b8354622d6 blender: 4.0.2 -> 4.1.0
Changelog: https://www.blender.org/download/releases/4-1/

Library updates: https://projects.blender.org/blender/blender/issues/113157

Blender now supports [GPU-accelerated OpenImageDenoise on select
GPUs][1]. Enabled it for CUDA only for now as Blender 4.1.0 considers
HIP (AMD) support unstable, and I don’t have any hardware for the SYCL
(Intel) support, and it’s for very limited GPUs anyway (Xe-HPG
datacenter).

[1]: https://developer.blender.org/docs/release_notes/4.1/cycles/#supported-gpus
2024-03-26 20:21:33 -04:00
Dmitry Kalinkin
127f03b7ad
Merge pull request #296016 from amarshall/blender-usd
blender: enable USD support; openusd: cleanup
2024-03-16 18:42:01 -04:00
Andrew Marshall
5050e36376 blender: build with USD support
We build openusd without OSL support as we don’t build Blender with OSL
support normally, and so seems unnecessary and adds significantly to the
closure size due to (as noted in Blender drv comments) the inclusion of
LLVM.
2024-03-14 19:31:57 -04:00
Andrew Marshall
caa0d575c8 blender: fix incompat with OpenImageIO 2.5+ causing incorrect renders
See linked issue in comment.
2024-03-12 12:40:44 -04:00
Andrew Marshall
c92e91b9f6 blender: rename local python{,Packages} -> python3{,Packages}
This makes them match what the fn param names *would* be, making it
easier to refactor e.g. to `{ python3Packages, ... }: mkDerivation …` in
the future if desired. It also potentially reduces first-glance
confusion that it might be Python 2 in-use.

Leave the passthru names as-is to preserve backwards-compatibility, but
also as there appears to be some precedent for naming them like this.
2024-03-05 09:49:18 -05:00
Andrew Marshall
e65fdfa217 blender: use SRI hash for OptiX, clarify source 2024-03-05 09:49:18 -05:00
Andrew Marshall
3605bfff9a blender: remove unnecessary fallback for cudaPackages
It’s always defined.
2024-03-05 08:46:45 -05:00
Andrew Marshall
3369061e8e blender: inline single-use vars when defining withPackages 2024-03-05 08:46:45 -05:00
Andrew Marshall
6d234d9d5e blender: remove unnecessary explicit libstdc addition to rpath
This seems to no longer be necessary, I can successfully build with
cudaSupport and perform a CUDA and OptiX render.
2024-03-05 08:46:45 -05:00
Andrew Marshall
13e7acb2e7 blender: add comment for why pythonPackages over python.pkgs 2024-03-05 08:46:45 -05:00
Andrew Marshall
3a3758db32 blender: reduce usage of with
When used, ensure the scope is narrow.
https://nix.dev/guides/best-practices#with-scopes
2024-03-05 08:46:45 -05:00
Andrew Marshall
98cecd5f7d blender: prefer finalAttrs over rec 2024-03-05 08:46:44 -05:00
Andrew Marshall
bd78a3bfa5 blender: prefer using alias for desired pythonPackages
Otherwise all these references have to be updated whenever the Python
version is changed.
2024-03-05 08:46:44 -05:00
Andrew Marshall
f8ceab72ff blender: formatting
- Format to draft RFC 0166 style (via nixfmt-rfc-style)
- Alphabetize lists unless there is a somewhat-apparent reason not to
- Reorder attrs based roughly on the order they are used by the builder
2024-03-05 08:46:28 -05:00
Vladimír Čunát
f7b6bf2863
blender: patch build after cmake update
https://hydra.nixos.org/build/250783520/nixlog/1/tail
2024-02-25 11:35:26 +01:00
Yureka
46f1dbf40d blender: build with openexr 3 2024-01-23 12:35:06 +01:00
Dominik Ritter
e1892d240a
blender: 4.0.1 -> 4.0.2 (#272559) 2023-12-11 15:23:56 -05:00
Someone Serge
2381384173
blender: drop cudatoolkit.runfile 2023-12-04 20:24:32 +00:00
Andrew Marshall
aa6db6ac9d
blender: 3.6.5 -> 4.0.1 (#267511)
As noted in comment, Blender is now using private libdecor APIs not in
the headers, so need to patch to build against it. I think it probably
works when Blender does dynamic loading at runtime since it uses the fn
defs it defines in that case, but we don’t want to do that, it seems (as
we already set `-DWITH_GHOST_WAYLAND_DYNLOAD=OFF`).
2023-11-17 20:45:35 -05:00
the-furry-hubofeverything
fe4c776ae9 blender: allow functional declaration within withPackages
Based on #257780, separated since it introduces significant changes.

bpycv: update passthru.tests.render

blender-with-packages: deprecated
it is still backwards compatible, but no longer preferred.
2023-11-02 23:03:34 -07:00