-
Notifications
You must be signed in to change notification settings - Fork 20
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
gitignoreSource: ensure Nix store path determinism #11
Conversation
This ensures that, when used in situations like `gitignoreSource ./.`, both Hydra and local checkout will have the exact same Nix path.
Wow, thank you for the fast merge! :) |
I support having this in here. Actually, I think
My old workaround for this problem, which is composable with other cleanSource's: let
toConstantSource = name: src: if src ? _isLibCleanSourceWith then builtins.path {
inherit name;
inherit (src) filter;
path = src.origSrc;
} else builtins.path { inherit name; path = src; };
constGitIgnore = name: path: toConstantSource name (gitignoreSource path); |
For the record, Which implies that majority of Nixpkgs stdenv derivations have
True. And that was listed as a feature: https://github.com/hercules-ci/gitignore/blob/ec5dd0536a5e4c3a99c797b86180f7261197c124/README.md#features However, it's still possible to compose with |
@yorickvP: Also, your workaround doesn't seem to work for me as of Nix 2.2.2. When I try to build a derivation that uses
Seems to me that's because |
@yegortimoshenko yeah, it terminates composability, but can still be used as the end to a composed set of cleanSource's. Regarding (1), having package names in the nix store path may be a mistake altogether. |
This ensures that, when used in situations like
gitignoreSource ./.
, both Hydra and local checkout will have the exact same Nix path, which is important for reproducibility and being able to leverage binary cache.