Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blender: cleanup #293514

Merged
merged 10 commits into from
Mar 6, 2024
Merged

blender: cleanup #293514

merged 10 commits into from
Mar 6, 2024

Conversation

amarshall
Copy link
Member

Description of changes

Intention here is no functional changes (though the derivation itself does change due to reordering in lists). Motivation is to make it easier to contribute future changes to blender without having to undergo piecemeal cleanups to align with more modern nixpkgs style, while also producing more compact, obvious diffs.

Incorporated some feedback from stalled draft PR #257780.

Things done

Have verified the only difference between the generated derivations before-and-after is inconsequential reordering (e.g. of buildInputs; as is expected).

nix-diff, etc. output
- /nix/store/2mkq73y45g2laph9sb6adrnhjs8273h1-blender-4.0.2:{out}
+ ./result/:{out}
• The environments do not match:
    - NIX_LDFLAGS=
    buildInputs=''
    /nix/store/jr04j43vj4msihyr04qpzbaxzv81dvqa-alembic-1.8.6-dev /nix/store/6d5sjqmrm93jncsmgzlgb7jqi1gwrgag-boost-1.81.0-dev /nix/store/yglspjlx9g2ggrb14k74d1ic7v85n4sv-ffmpeg-6.1-dev /nix/store/lf16l9l7254q7n2dpdvb7v8sm52ipj58-fftw-double-3.3.10-dev /nix/store/xgkz2q9v4hd88pqzga39xxz0wqssj0ha-fftw-single-3.3.10-dev /nix/store/0bkz0x8vsb92kcr3inkgs0ba2dqlla5a-freetype-2.13.2-dev /nix/store/zd1a9i36yqs6bfamfqa3hbxf7a2si2vq-gettext-0.21.1 /nix/store/q9afqp2563dxlnj11sp1jm1wqqs9qxmv-glew-2.2.0-dev /nix/store/0bkz0x8vsb92kcr3inkgs0ba2dqlla5a-freetype-2.13.2-dev/nix/store/ngn2dcks7bhn1lf6aw3i87vxz57bzzbm-gmp-with-cxx-6.3.0-dev /nix/store/2rh1ria0y4h6axmc7lc4rnf7pmxq9h9g-jemalloc-5.3.0 /nix/store/44crpysa5xmp87kp8f3szkvwzgb3m94j-libepoxy-1.5.10-dev /nix/store/m0hagrpa8qs039xmy3qv9l8b0lfr44bj-libharu-2.4.4 /nix/store/r2z54nm9xkrz7z6cv09a0g3j3am5chaj-libjpeg-turbo-3.0.2-dev /nix/store/831hplq82ppf633fv1qchlrsihhkryz4-libpng-apng-1.6.40-dev /nix/store/mnzw9pdgbp4jwsnrhphg32ksx4szw5bi-libsamplerate-0.1.9-dev /nix/store/i9s5cznrzcm06dlwzy1lff1y36rll1dj-libsndfile-1.2.2-dev /nix/store/b1a4g7a7cxh1sl0y4rzbqyc4nmxhi874-libtiff-4.6.0-dev /nix/store/lbli5mw15jd163vllb2kkh6h1aw2n799-libwebp-1.3.2 /nix/store/kz0bb6n4bwhqigxkny8y8cak5d5656w8-opencolorio-2.3.0 /nix/store/r2mskmdpay21drxzypxqy45vwn9xlf4y-openexr-3.2.2-dev /nix/store/f9snhaffkl80j7biwhawv4jpqwrk1q71-openimageio-2.5.5.0-dev /nix/store/0d9iwk3fvy1sg2ymsyy024n1ac85324k-openjpeg-2.5.0-dev /nix/store/rys6l2skqj995pin7h5221yg0y80xyql-openpgl-0.5.0 /nix/store/zwfs2v6shid5ww6ixj8lv52pbdcn2152-opensubdiv-3.5.1-dev /nix/store/14ar275f6rznjc6vi3v4pm0gj4zl10gy-potrace-1.16 /nix/store/lyk7g1vy6sq3ri8wmlwq930ahpip85gs-pugixml-1.13 /nix/store/9x6kjq8z5dwcg145l7k2r5lvvb24kckp-python3-3.10.13 /nix/store/by6afz91dmy4l9s9rvwjsx32hqxl8wbd-tbb-2020.3-dev /nix/store/hwlm6akqm83lapl79y8r9r2vw741sppd-zlib-1.3.1-dev /nix/store/s88sksxns15dhwr6dp0pwy0qz5sr7gq3-zstd-1.5.5-dev /nix/store/lf16l9l7254q7n2dpdvb7v8sm52ipj58-fftw-double-3.3.10-dev /nix/store/xgkz2q9v4hd88pqzga39xxz0wqssj0ha-fftw-single-3.3.10-dev /nix/store/2rh1ria0y4h6axmc7lc4rnf7pmxq9h9g-jemalloc-5.3.0 /nix/store/jr04j43vj4msihyr04qpzbaxzv81dvqa-alembic-1.8.6-dev /nix/store/zwfs2v6shid5ww6ixj8lv52pbdcn2152-opensubdiv-3.5.1-dev /nix/store/by6afz91dmy4l9s9rvwjsx32hqxl8wbd-tbb-2020.3-dev /nix/store/ngn2dcks7bhn1lf6aw3i87vxz57bzzbm-gmp-with-cxx-6.3.0-dev /nix/store/lyk7g1vy6sq3ri8wmlwq930ahpip85gs-pugixml-1.13 /nix/store/14ar275f6rznjc6vi3v4pm0gj4zl10gy-potrace-1.16 /nix/store/m0hagrpa8qs039xmy3qv9l8b0lfr44bj-libharu-2.4.4 /nix/store/44crpysa5xmp87kp8f3szkvwzgb3m94j-libepoxy-1.5.10-dev /nix/store/rys6l2skqj995pin7h5221yg0y80xyql-openpgl-0.5.0 /nix/store/13ay8131gj00mjz9vmg37ypqyb5pppms-wayland-1.22.0-dev /nix/store/2rnny7gvwn2mdrmiaysb5z5pdgjl4rly-wayland-protocols-1.33 /nix/store/7sg7d748qf9lc8cq0ywhs1y2qbxain3n-libffi-3.4.4-dev /nix/store/v30711i60lvw47fr2760pzf98kqq68d1-libdecor-0.2.2-dev /nix/store/14j5m65bpz50sqczkni59vrma4vlwhd8-libxkbcommon-1.5.0-dev /nix/store/s3gyml9g2x7124zbghvnzrfifbkhyfnq-dbus-1.14.10-dev/nix/store/787fcyzlvydspiidg53cka2f0k549bc1-embree-3.13.5 /nix/store/8rvlxa4gz91nmi68p18abd5qva24w7m6-openimagedenoise-1.4.3 /nix/store/787fcyzlvydspiidg53cka2f0k549bc1-embree-3.13.5/nix/store/477xpc7ffpkds6a20v4gdx9hkq2y08kx-libGL-1.7.0-dev /nix/store/bpq2ax3jks7cam3h3s75xz2jk90ni3f9-libXi-1.8.1-dev/nix/store/cdy1knbqwfy8wd3sj5c8vwj0nnzyjvgk-glu-9.0.3-dev /nix/store/pirdcrf04q6qm2yq8w6w4gam0ax1vlnd-libX11-1.8.7-dev /nix/store/drz4r0b20cl5r4lsw600h9l59jsanvr6-libXext-1.3.6-dev /nix/store/bpq2ax3jks7cam3h3s75xz2jk90ni3f9-libXi-1.8.1-dev /nix/store/13m2njz5m4wwrmf4n74zmfpcczi6kk8s-libXrender-0.9.11-dev /nix/store/cdy1knbqwfy8wd3sj5c8vwj0nnzyjvgk-glu-9.0.3-dev /nix/store/477xpc7ffpkds6a20v4gdx9hkq2y08kx-libGL-1.7.0-dev/nix/store/g96kg0flgdkq9aqyymyhp8vqzlgpdn6x-libXxf86vm-1.1.5-dev /nix/store/dsdfn1k9hnxzdwvzirx2smfinziqc8bz-openal-soft-1.23.1 /nix/store/g96kg0flgdkq9aqyymyhp8vqzlgpdn6x-libXxf86vm-1.1.5-dev/nix/store/7yz6zxzcn5z6rhqxa23cv5767px1p3di-openvdb-11.0.0-dev /nix/store/v0vcw2id0vvprix0jrdr792rg791n726-openxr-loader-1.0.33-dev /nix/store/7yz6zxzcn5z6rhqxa23cv5767px1p3di-openvdb-11.0.0-dev/nix/store/s3gyml9g2x7124zbghvnzrfifbkhyfnq-dbus-1.14.10-dev /nix/store/v30711i60lvw47fr2760pzf98kqq68d1-libdecor-0.2.2-dev /nix/store/7sg7d748qf9lc8cq0ywhs1y2qbxain3n-libffi-3.4.4-dev /nix/store/14j5m65bpz50sqczkni59vrma4vlwhd8-libxkbcommon-1.5.0-dev /nix/store/13ay8131gj00mjz9vmg37ypqyb5pppms-wayland-1.22.0-dev /nix/store/2rnny7gvwn2mdrmiaysb5z5pdgjl4rly-wayland-protocols-1.33 /nix/store/nb93wgvkix9k7q4mcpd3dz00g1k6bdrf-opencollada-1.6.68 /nix/store/x006cp8b1pqpikdllr2rmc8ikywmr7rn-libspnav-0.2.3
''
    cmakeFlags=''
    -DPYTHON_INCLUDE_DIR=/nix/store/9x6kjq8z5dwcg145l7k2r5lvvb24kckp-python3-3.10.13/include/python3.10 -DPYTHON_LIBPATH=/nix/store/9x6kjq8z5dwcg145l7k2r5lvvb24kckp-python3-3.10.13/lib -DPYTHON_LIBRARY=python3.10 -DPYTHON_NUMPY_INCLUDE_DIRS=/nix/store/zikqyh7a8sx211br3zh7zmsgbvg7vqpj-python3.10-numpy-1.26.4/lib/python3.10/site-packages/numpy/core/include -DPYTHON_NUMPY_PATH=/nix/store/zikqyh7a8sx211br3zh7zmsgbvg7vqpj-python3.10-numpy-1.26.4/lib/python3.10/site-packages -DPYTHON_VERSION=3.10 -DWITH_ALEMBIC=ON -DALEMBIC_INCLUDE_DIR=/nix/store/jr04j43vj4msihyr04qpzbaxzv81dvqa-alembic-1.8.6-dev/include -DALEMBIC_LIBRARY=/nix/store/8vh9nfb8mgsdgb3yv6zpj6wcg7905cp2-alembic-1.8.6-lib/lib/libAlembic.so -DWITH_MOD_OCEANSIM=ON -DWITH_CODEC_FFMPEG=ON -DWITH_CODEC_SNDFILE=ON -DWITH_FFTW3=ON -DWITH_IMAGE_OPENJPEG=ON -DWITH_INSTALL_PORTABLE=OFF -DWITH_FFTW3=ON-DWITH_MOD_OCEANSIM=ON -DWITH_SDL=OFF-DWITH_OPENCOLLADA=ON -DWITH_OPENCOLORIO=ON -DWITH_OPENSUBDIV=ON -DPYTHON_LIBRARY=python3.10 -DPYTHON_LIBPATH=/nix/store/9x6kjq8z5dwcg145l7k2r5lvvb24kckp-python3-3.10.13/lib -DPYTHON_INCLUDE_DIR=/nix/store/9x6kjq8z5dwcg145l7k2r5lvvb24kckp-python3-3.10.13/include/python3.10 -DPYTHON_VERSION=3.10-DWITH_OPENVDB=ON -DWITH_PYTHON_INSTALL=OFF -DWITH_PYTHON_INSTALL_NUMPY=OFF -DPYTHON_NUMPY_PATH=/nix/store/zikqyh7a8sx211br3zh7zmsgbvg7vqpj-python3.10-numpy-1.26.4/lib/python3.10/site-packages -DPYTHON_NUMPY_INCLUDE_DIRS=/nix/store/zikqyh7a8sx211br3zh7zmsgbvg7vqpj-python3.10-numpy-1.26.4/lib/python3.10/site-packages/numpy/core/include -DWITH_PYTHON_INSTALL_REQUESTS=OFF -DWITH_OPENVDB=ON-DWITH_SDL=OFF -DWITH_TBB=ON -DWITH_IMAGE_OPENJPEG=ON-DALEMBIC_INCLUDE_DIR=/nix/store/jr04j43vj4msihyr04qpzbaxzv81dvqa-alembic-1.8.6-dev/include -DWITH_OPENCOLLADA=ON-DALEMBIC_LIBRARY=/nix/store/8vh9nfb8mgsdgb3yv6zpj6wcg7905cp2-alembic-1.8.6-lib/lib/libAlembic.so -DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_WAYLAND_DBUS=ON -DWITH_GHOST_WAYLAND_DYNLOAD=OFF -DWITH_GHOST_WAYLAND_LIBDECOR=ON
''
    nativeBuildInputs=''
    /nix/store/paxnwg89pdx4car5fj84mmiprg952459-cmake-3.28.2 /nix/store/mz5rqlnmfyq18dvlqkdzi6dm5l9kjpjp-llvm-16.0.6-dev /nix/store/qyh61bhf3s7jgmczpmdq5ps72xqizsnq-make-shell-wrapper-hook /nix/store/ib8hjl1ya45q4glrix483crc6184qz8f-wrap-python-hook /nix/store/mz5rqlnmfyq18dvlqkdzi6dm5l9kjpjp-llvm-16.0.6-dev /nix/store/492n7ylp2f9zn0k3vghv1snypgkzznc5-pkg-config-wrapper-0.29.2
''
diff -u \
  <(nix derivation show /nix/store/2mkq73y45g2laph9sb6adrnhjs8273h1-blender-4.0.2 | jq -r '.[].env.cmakeFlags' | tr ' ' "\n" | sort) \
  <(nix derivation show ./result | jq -r '.[].env.cmakeFlags' | tr ' ' "\n" | sort)
# empty diff

diff -u \
  <(nix derivation show /nix/store/2mkq73y45g2laph9sb6adrnhjs8273h1-blender-4.0.2 | jq -r '.[].env.buildInputs' | tr ' ' "\n" | sort) \
  <(nix derivation show ./result | jq -r '.[].env.buildInputs' | tr ' ' "\n" | sort)
# empty diff

diff -u \
  <(nix derivation show /nix/store/2mkq73y45g2laph9sb6adrnhjs8273h1-blender-4.0.2 | jq -r '.[].env.nativeBuildInputs' | tr ' ' "\n" | sort) \
  <(nix derivation show ./result | jq -r '.[].env.nativeBuildInputs' | tr ' ' "\n" | sort)
# empty diff
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

- 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
Otherwise all these references have to be updated whenever the Python
version is changed.
This seems to no longer be necessary, I can successfully build with
cudaSupport and perform a CUDA and OptiX render.
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.
@veprbl veprbl merged commit 07b002e into NixOS:master Mar 6, 2024
25 checks passed
@amarshall amarshall deleted the blender-cleanup2 branch March 6, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants