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

buildEnv: support force-creating all directories and symlinking only files #4621

Closed
abbradar opened this issue Oct 22, 2014 · 10 comments
Closed
Assignees
Labels
0.kind: enhancement 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@abbradar
Copy link
Member

This would simplify, for example, #4577 expression (or maybe there is just another, better way?). Another (more grained) approach would be to add a list argument which specifies directories that should be created and not symlinked.

@abbradar
Copy link
Member Author

This also would be good for abbradar@4ecc6d5 . buildEnv is actually a very good and clean way to create such wrappers in my opinion, apart from this issue.

@peti
Copy link
Member

peti commented Oct 22, 2014

👍 This would be useful, indeed.

@lucabrunox
Copy link
Contributor

I'd go for listing directories that shall not be symlinked.

@peti
Copy link
Member

peti commented Nov 3, 2014

My use-case required all directories to be created for real, because I don't know ahead of time the names of those directories.

@abbradar
Copy link
Member Author

For recent examples of workarounds see https://github.com/NixOS/nixpkgs/blob/master/pkgs/games/dwarf-fortress/wrapper/default.nix#L23. I have quite a bit of those scattered across nixpkgs now.

@vcunat
Copy link
Member

vcunat commented Jan 27, 2016

Dealing with NixOS/nix#341 will (probably) include implementing buildEnv in C++. After that I assume nixpkgs will just directly use buildEnv from nix. (For now it isn't really important how exactly.)

Hopefully the issue won't be stranded for too long anymore.

@rasendubi
Copy link
Member

I've opened a PR that creates directories for all pathsToLink (#16828). While it not exactly follows this proposal, it may fix the issue when names are known ahead of time (pathsToLink = [ "/" "/real/directory" ]).

@vcunat
Copy link
Member

vcunat commented Jul 14, 2016

Note that we also have symlinkJoin function which is a thin wrapper around the lndir command.

@Profpatsch
Copy link
Member

So between @rasendubi’s comment and @vcunat’s comment, can this issue be considered fixed?

@stale
Copy link

stale bot commented Jun 4, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

7 participants