Commit Graph

193 Commits

Author SHA1 Message Date
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
Hubble the Wolverine
a0961ec2b7
blender: 3.6.4 -> 3.6.5 (#262198) 2023-10-20 14:38:46 -04:00
Madoura
e6f88a9a82
rocm-related: fixup for ROCm 5.7.0
blender: fixup for ROCm 5.7.0

opensycl: fixup for ROCm 5.7.0

magma: fixup for ROCm 5.7.0

torch: fixup for ROCm 5.7.0

cp2k: fixup for ROCm 5.7.0

sirius: fixup for ROCm 5.7.0

spfft: fixup for ROCm 5.7.0

spla: fixup for ROCm 5.7.0
2023-10-09 17:03:19 -05:00
Andrew Marshall
0c4a07bf9f blender: enable path guiding support
https://wiki.blender.org/wiki/Reference/Release_Notes/3.4/Cycles#Path_Guiding
2023-09-28 18:27:38 -04:00
Andrew Marshall
e4fc97efb1
blender: 3.6.3 -> 3.6.4 (#257543) 2023-09-28 13:33:27 -04:00
Andrew Marshall
0c101e7a04
blender: Add pkg test for rendering (#245613)
Basic headless render test for Eevee and Cycles CPU. Did this because I
got a bit tired of testing render manually for both renderers (though
it’s not that much work).

Note that `render.threads` config is used only by Cycles. Using 1 thread
chosen because it’s not meaningfully slower than more for this render,
and it simplifies things to just pick 1 instead of making it dynamic.

Have chosen 32 samples since it’s not meaningfully slower than 1 (even
with `--cores 1`), and it’s not so small that maybe it’s not
representative, and too-low a number and there are artifacts that may
make it appear like something is broken.

Cycles denoising needs openimagedenoise and is not currently included in
aarch64 build.
2023-09-27 00:13:56 -04:00
Andrew Marshall
1da531b50d
blender: 3.6.2 -> 3.6.3 (#256729) 2023-09-25 15:56:55 -04:00
Michal Sojka
3445fd3b8b blender: add zstandard python module
This module is needed by Flamenco addon. Without it, submitting jobs
to Flamenco manager [1] fails with:

    Error performing BAT pack: File is compressed with ZStandard,
    install the `zstandard` module to support this.

Binary Blender releases already contain this module as can be seen by
running:

    curl https://mirrors.dotsrc.org/blender/release/Blender3.6/blender-3.6.2-linux-x64.tar.xz | tar tJ | grep zstandard

[1]: https://flamenco.blender.org/
2023-09-17 01:48:17 +02:00
Andrew Marshall
231801e729
blender: 3.6.0 -> 3.6.2 (#245539) 2023-08-19 16:14:14 -04:00
Austin Horstman
f61284a19f
treewide: add meta.mainProgram to misc 2023-08-04 14:10:05 -05:00
Andrew Marshall
f1468a9946
blender: Build with Draco support (#245535)
See https://github.com/NixOS/nixpkgs/issues/217921

Blender sets WITH_DRACO=OFF if WITH_PYTHON_INSTALL=OFF, however that’s
not totally necessary. Removing that forced-set then builds with
WITH_DRACO=ON, however Blender fails to launch because this creates
e.g. `share/blender/3.6/python`, and Blender then sets this as Python’s
home dir, so Python fails to init since it expects Python core to be
there (and it’s not). I couldn’t figure out how Blender sets Python’s
home dir, and explicitly setting PYTHONHOME in the env didn’t have any
effect. So instead just rename that dir to python-ext to avoid this
behavior. All that is left then is to adjust where Blender is looking
for the Draco lib.

This functionality may be verified by:

1. Visiting File → Export → glTF 2.0
2. In the right side panel (press the gear icon in top-right if not
   visible), expanding “Data”
3. Enabling “Compression”
4. Press “Export glTF 2.0”
5. Verify:
   - Blender stdout+stderr shows “Draco mesh compression is available”
   - no error or warning message
   - exported file exists
2023-07-29 01:34:33 -04:00
Someone Serge
471dbe9bcf
treewide: consume config.cudaSupport as required
Eliminate uses of `config.cudaSupport or false` and alike, since the
option is now declared in config.nix with a default value

fd .nix -t f -x sed 's/config\.cudaSupport or false, cudaPackages [?] [{][}]/config.cudaSupport, cudaPackages ? { }/' '{}' -i
fd .nix -t f -x sed 's/config\.cudaSupport or false/config.cudaSupport/' '{}' -i
fd .nix -t f -x sed 's/cudaSupport = pkgs.config.cudaSupport/inherit (pkgs.config) cudaSupport/' '{}' -i
fd .nix -t f -x sed 's/cudaSupport = config.cudaSupport/inherit (config) cudaSupport/' '{}' -i
2023-07-20 18:08:19 +03:00
Andrew Marshall
db9ff9eb8a blender: 3.5.1 -> 3.6.0
Without removing the `rm … FindEmbree`, compilation fails due to various
macros depending on the version of embree. The nixpkgs history provides
no indication of why this patch is done (it has been present since the
addition of embree as a dep in
6b74f99abd), and the build succeeds
without them, so remove.
2023-07-10 11:31:22 -04:00
Andrew Marshall
f5911e4068
blender: Add Python to passthru for use in addon drvs (#230884)
Blender addons that have native extensions need to be built against the
same Python that Blender was built with. This makes it easier to write
such addon derivations.
2023-05-22 17:06:34 -04:00
yakrobat
01a31b8c2d
blender: enable wayland 2023-05-14 00:31:22 +03:00
lucasew
fd34bc39e4 blender-with-packages: refactor
Signed-off-by: lucasew <lucas59356@gmail.com>
2023-05-10 21:49:56 -03:00
Pauan
8c32a5b2ce
blender 3.4.1 -> 3.5.1 (#229570) 2023-05-04 02:02:14 -04:00
Andrew Marshall
3c4933f090 blender: mark broken on darwin
Has been broken likely since edcd3849a6.

First failing Hydra: https://hydra.nixos.org/build/211894618

Notes from attempt to fix:

- The initial breakage may be easy to fix, but the upgrade to 3.4 added
  a lot more hurdles
- The patch fails to apply, but is trivially naïvely fixable
- At least some of the existing darwin-specific substituteInPlace no
  longer find anything
- When building with naïve fix for patch, fails with:
   > Could NOT find USD (missing: USD_LIBRARY USD_INCLUDE_DIR)
  for reasons that are not clear to me

The package has been broken for two months and no open issues, so
marking as broken as it’s not going to fix itself and if there is will
to fix it, someone can. For now, leaving the darwin conditionals in
place so not as to make a would-be-fixer’s job harder.
2023-05-02 20:01:13 -04:00
Sandro Jäckel
0313eb4795
blender: patch removed numpy attribute 2023-04-23 20:08:58 +02:00
Artturin
eac28f38d6 treewide: fix lints
Arg to lib.optional is a list

build time tool in buildInputs

*Flags not a list

https://github.com/nix-community/nixpkgs-lint
2023-04-18 20:20:56 +03:00
Matthew Croughan
c0615e86d1
blender: allow dynamically linked embree (#225168) 2023-04-07 16:24:54 -04:00
Matthew Croughan
da6f3042c9
blender: add aarch64-linux support (#224771) 2023-04-05 15:44:24 -04:00
Pauan
92f28daede
blender: 3.3.1 -> 3.4.1 (#223478) 2023-03-28 17:45:26 -04:00
Tobias Markus
edcd3849a6 blender: Fix build after changes in Alembic package 2023-03-09 23:59:44 +01:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Felix Buehler
cdb39a86e0 treewide: use optionalString 2023-02-13 21:52:34 +01:00
Shawn8901
0a1dd3ced1 treewide: remove global with lib; in pkgs/{misc,networking} 2023-01-24 17:29:20 +01:00
Robert Scott
a1deb65b09 openimageio: default to openimageio2, rename 1.x to openimageio_1
keep a couple of packages "using" openimageio_1 - both are broken
anyway, but as such we have no evidence that they work with 2.x.
all are liable to get removed in the near future anyway.
2023-01-05 20:26:49 +00:00
yvt
1f8dd05e72
blender: add libwebp to buildInputs (#208201)
Enables the WebP image format support in Blender. It has been [supported](https://developer.blender.org/rB4fd0a69d7ba) since Blender 3.2 but was disabled due to libwebp missing from the build inputs.

    $ nix build nixpkgs#blender
    $ nix log (realpath result)
    ...
    -- Could NOT find WebP (missing: _webp_LIBRARIES WEBP_INCLUDE_DIR)
    CMake Warning at build_files/cmake/platform/platform_unix.cmake:407 (message):
      WebP not found, disabling WITH_IMAGE_WEBP
    Call Stack (most recent call first):
      CMakeLists.txt:1058 (include)
2022-12-30 19:38:54 -05:00
Dmitry Kalinkin
bb498e0202
blender: fix on darwin (#200185) 2022-11-28 17:09:31 -05:00
Infinidoge
d09843bf11 blender: 3.3.0 -> 3.3.1 2022-10-30 11:22:53 +01:00
Artturin
7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00