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

python3Packages: torch-bin and friends should move to autoPatchelfHook and autoAddOpenGLRunpathHook #222473

Open
ConnorBaker opened this issue Mar 22, 2023 · 1 comment

Comments

@ConnorBaker
Copy link
Contributor

Describe the bug

What

The following packages should move to using autoPatchelfHook and autoAddOpenGLRunpathHook:

Why

In addition to autoPatchelfHook being the preferred way to package binaries (https://nixos.wiki/wiki/Packaging/Binaries#Using_AutoPatchelfHook), the autoAddOpenGLRunpathHook should allow us to remove boilerplate phases like:

postFixup = let
rpath = lib.makeLibraryPath [ stdenv.cc.cc.lib ];
in ''
find $out/${python.sitePackages}/torch/lib -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do
echo "setting rpath for $lib..."
patchelf --set-rpath "${rpath}:$out/${python.sitePackages}/torch/lib" "$lib"
addOpenGLRunpath "$lib"
done
'';

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-46/26872/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔮 Roadmap
Development

No branches or pull requests

2 participants