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: wrap in separate derivation, fixes #97250 #97388

Open
wants to merge 1 commit into
base: master
from

Conversation

@FRidh
Copy link
Member

@FRidh FRidh commented Sep 7, 2020

  • to make it possible to add additional python packages for plugins
  • set other wrapper arguments
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@FRidh
Copy link
Member Author

@FRidh FRidh commented Sep 7, 2020

Downside of using a wrapper derivation is that you can no longer easily override the unwrapped derivation. Unless a separate top-level attribute is used, like is done with some other packages.

- to make it possible to add additional python packages for plugins
- set other wrapper arguments
Copy link
Member

@veprbl veprbl left a comment

I don't know if this is a useful change. I would say that the solution proposed in #97250 (comment) is more than appropriate given that we don't allow for plugins themselves to be installed declaratively. I would like to also propose to simply add pythonPackages.requests to blender wrapper unconditionally.

isELF "$program" || continue
addOpenGLRunpath "$program"
done
} # --python-expr is used to workaround https://developer.blender.org/T74304

This comment has been minimized.

@veprbl

veprbl Sep 8, 2020
Member

This comment is outdated, can be removed.

done
} # --python-expr is used to workaround https://developer.blender.org/T74304
''
makeWrapper "${unwrapped}/${blenderExecutable}" "$out/${blenderExecutable}" \

This comment has been minimized.

@veprbl

veprbl Sep 8, 2020
Member

Suggested change
makeWrapper "${unwrapped}/${blenderExecutable}" "$out/${blenderExecutable}" \
makeWrapper "$unwrapped/${blenderExecutable}" "$out/${blenderExecutable}" \

This should allow to override the unwrapped blender.

@FRidh
Copy link
Member Author

@FRidh FRidh commented Sep 8, 2020

appropriate given that we don't allow for plugins themselves to be installed declaratively

That is a good remark.

In principle, one could even wrap blender themselves with a Python path like I did here.

@gebner
Copy link
Member

@gebner gebner commented Sep 9, 2020

This should be split into two top-level derivations to allow overriding (and nix-prefetch-url -A blender-unwrapped.src).

I think it's a good idea to have the wrapper in nixpkgs. Writing wrappers for desktop applications is hard to do right, you need to change the desktop files, pick the right python version, make sure that you've got all executables, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.