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
substitute: init at 0 #73712
substitute: init at 0 #73712
Conversation
Similar to the colocated `substituteAll` script and derivation, this PR adds nix-level support for `substitute` directly. This is useful, for instance, to be able to easily make tweaks to patch files for an existing derivation's existing patch files.
Any thoughts on this? |
@matthewbauer Any chance you can take a quick look at this? |
or maybe @FRidh even? :) |
Anyone can take a look and/or merge this? |
Hi @virusdave, sorry for the delay. I can try to take a look at this later today. |
We'd also need to document the builder function along with what's in setup.sh. This is a problem we already have for subsituteAll #65252, it draws a lot of confusion. |
Thank you for your contributions.
|
I am going to go ahead and merge this as is since it is something I had wished existed a few times already. The point about documentation is fair, but since the author hasn't addressed the concerns in over 2 years I don't think that is going to happen. We can address documentation for this and substituteAll at a later date. |
@@ -420,6 +420,8 @@ in | |||
|
|||
srcOnly = args: callPackage ../build-support/src-only args; | |||
|
|||
substitute = callPackage ../build-support/substitute/substitute.nix { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not using default.nix as the filename?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, didn't catch that. I can just push a quick fix if you don't mind a direct push
Similar to the colocated
substituteAll
script and derivation, thisPR adds nix-level support for
substitute
directly. This is useful,for instance, to be able to easily make tweaks to patch files for an
existing derivation's existing patch files.
Motivation for this change
Couldn't easily tweak an existing patchfile in an existing derivation.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @worldofpeace