-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Function for transforming store path contents #264541
Copy link
Copy link
Open
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: libThe Nixpkgs function libraryThe Nixpkgs function library
Description
Issue description
I've been working on the new file set library in recent months, which allows selecting local eval-time paths to add to the store. Notably this library does not support handling of store paths, see #264537 for why not.
However, it would be very doable to have a simple function for doing arbitrary transformations over store paths with a command. I can imagine an interface like this:
pkgs.transformStorePath {
path = pkgs.hello;
command = ''
rm -rf share
mv $out/bin/{hello,hallo}
'';
}I can also imagine there being alternate more convenient approaches, suggestions welcome.
Ping @roberth @fricklerhandwerk
This issue is sponsored by Antithesis ✨
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: libThe Nixpkgs function libraryThe Nixpkgs function library
Fields
Give feedbackNo fields configured for issues without a type.