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

lib: ensure directories of linkFarm links exist #45628

Merged
merged 1 commit into from Sep 1, 2018

Conversation

alyssais
Copy link
Member

There's no reason linkFarm can't be used for symlinks in subdirectories, except that currently it doesn't ensure the directory of the link exists. This backwards-compatible change expands the utility of the function.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

There's no reason `linkFarm` can't be used for symlinks in
subdirectories, except that currently it doesn't ensure the directory
of the link exists. This backwards-compatible change expands the utility
of the function.
@xeji
Copy link
Contributor

xeji commented Sep 1, 2018

@GrahamcOfBorg build yarn2nix python27Packages.pytorchWithCuda python36Packages.pytorchWithCuda

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: yarn2nix

The following builds were skipped because they don't evaluate on aarch64-linux: python27Packages.pytorchWithCuda, python36Packages.pytorchWithCuda

Partial log (click to expand)

Processing  yarn2nix
Linked yarn2nix
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/jvrbw44gwyn39gs5cqnsklj4m3vzcyf0-yarn2nix-1.0.0
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/jvrbw44gwyn39gs5cqnsklj4m3vzcyf0-yarn2nix-1.0.0/bin
patching script interpreter paths in /nix/store/jvrbw44gwyn39gs5cqnsklj4m3vzcyf0-yarn2nix-1.0.0
/nix/store/jvrbw44gwyn39gs5cqnsklj4m3vzcyf0-yarn2nix-1.0.0/node_modules/yarn2nix/bin/yarn2nix.js: interpreter directive changed from "/usr/bin/env node" to "/nix/store/050f4m5bpdr5mskg8132d7bbxzr4hy0x-nodejs-8.11.4/bin/node"
checking for references to /build in /nix/store/jvrbw44gwyn39gs5cqnsklj4m3vzcyf0-yarn2nix-1.0.0...
/nix/store/jvrbw44gwyn39gs5cqnsklj4m3vzcyf0-yarn2nix-1.0.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: yarn2nix

The following builds were skipped because they don't evaluate on x86_64-linux: python27Packages.pytorchWithCuda, python36Packages.pytorchWithCuda

Partial log (click to expand)

Processing  yarn2nix
Linked yarn2nix
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/p36jwhxhbmivn0diyvsyv4b0ss9c0k6k-yarn2nix-1.0.0
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/p36jwhxhbmivn0diyvsyv4b0ss9c0k6k-yarn2nix-1.0.0/bin
patching script interpreter paths in /nix/store/p36jwhxhbmivn0diyvsyv4b0ss9c0k6k-yarn2nix-1.0.0
/nix/store/p36jwhxhbmivn0diyvsyv4b0ss9c0k6k-yarn2nix-1.0.0/node_modules/yarn2nix/bin/yarn2nix.js: interpreter directive changed from "/usr/bin/env node" to "/nix/store/9108j75r764a57vc83rag5wm6jk15ab8-nodejs-8.11.4/bin/node"
checking for references to /build in /nix/store/p36jwhxhbmivn0diyvsyv4b0ss9c0k6k-yarn2nix-1.0.0...
/nix/store/p36jwhxhbmivn0diyvsyv4b0ss9c0k6k-yarn2nix-1.0.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: yarn2nix

The following builds were skipped because they don't evaluate on x86_64-darwin: python27Packages.pytorchWithCuda, python36Packages.pytorchWithCuda

Partial log (click to expand)

no Makefile, doing nothing
installing
Processing  yarn2nix
Linked yarn2nix
post-installation fixup
strip is /nix/store/df6k4mgdjxciy0f637lryp7c9ln7n1m3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/x01hmskvk18101mh3rzjk58zjvp4gxr1-yarn2nix-1.0.0/bin
patching script interpreter paths in /nix/store/x01hmskvk18101mh3rzjk58zjvp4gxr1-yarn2nix-1.0.0
/nix/store/x01hmskvk18101mh3rzjk58zjvp4gxr1-yarn2nix-1.0.0/node_modules/yarn2nix/bin/yarn2nix.js: interpreter directive changed from "/usr/bin/env node" to "/nix/store/39461zkm26fm6j0iab4agaxahi502sy4-nodejs-8.11.4/bin/node"
/nix/store/x01hmskvk18101mh3rzjk58zjvp4gxr1-yarn2nix-1.0.0

@xeji xeji merged commit 4af7278 into NixOS:master Sep 1, 2018
alyssais added a commit to alyssais/nixpkgs that referenced this pull request Sep 1, 2018
There's no reason `linkFarm` can't be used for symlinks in
subdirectories, except that currently it doesn't ensure the directory
of the link exists. This backwards-compatible change expands the utility
of the function.
@alyssais alyssais deleted the linkFarm-dir branch September 4, 2018 10:09
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.

None yet

3 participants