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

doc: mention symlinkJoin in multiple-outputs section #36886

Merged
merged 1 commit into from
Mar 31, 2019

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Mar 12, 2018

Motivation for this change

Provide an additional exposure for symlinkJoin function by mentioning it in the documentation.

Fixes #36883

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@GrahamcOfBorg GrahamcOfBorg added 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Mar 12, 2018
@veprbl veprbl force-pushed the symlinkJoin_doc branch from 28267ba to ac63ca1 Compare May 27, 2018 05:59
@strager
Copy link
Contributor

strager commented Mar 31, 2019

This documentation would have saved me a handful of minutes! Can we merge this PR?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@veprbl veprbl merged commit c6a8b56 into NixOS:master Mar 31, 2019
@harryaskham
Copy link
Contributor

In case anyone finds this issue before they find the paragraph mentioned here, this worked for me for combining multiple small scripts into a utility package. For example a pkgs/my-scripts.nix

{pkgs, ...}: 

pkgs.symlinkJoin {                                                                                                                                                                                                                                                                                                                                                                                                           
  name = "my-scripts";                                                                                                                                                                                                                                                                                                                                                                                                
  paths = [
    (pkgs.writeShellScriptBin "script1" '' ... '');
    (pkgs.writers.writePython3Bin "script2" {} '' ... '');
    ...
  ];                                                                                                                                                                                                                                              
}

Which installs to make script1, script2 available on the PATH. An example like that would've helped me, will open a PR

harryaskham added a commit to harryaskham/nixpkgs that referenced this pull request Oct 18, 2024
Per NixOS#36886, would have saved me some time today to have this example
@harryaskham
Copy link
Contributor

harryaskham added a commit to harryaskham/nixpkgs that referenced this pull request Oct 18, 2024
Per NixOS#36886, would have saved me some time today to have this example
harryaskham added a commit to harryaskham/nixpkgs that referenced this pull request Oct 18, 2024
Per NixOS#36886, would have saved me some time today to have the trivial
builder more visible.
bjornfor pushed a commit that referenced this pull request Oct 18, 2024
Per #36886, would have saved me some time today to have the trivial
builder more visible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A derivation to merge multiple outputs
5 participants