mirror of
https://github.com/NixOS/rfcs.git
synced 2025-11-09 03:56:11 +01:00
Make combineWrappersInfo a nix function that returns a shell command
This commit is contained in:
parent
a6123b9251
commit
a65ac77de0
1 changed files with 22 additions and 3 deletions
|
|
@ -333,17 +333,36 @@ so:
|
|||
|
||||
```nix
|
||||
# Propagate GST plugins' path
|
||||
postInstall = ''
|
||||
echo "${builtins.toJSON {
|
||||
postInstall = makeWrapperAuto.combineWrappersInfo {
|
||||
envInfo = {
|
||||
GST_PLUGIN_SYSTEM_PATH_1_0 = [
|
||||
# @out@ should be expanded by `combineWrappersInfo` to what's in `$out`, see:
|
||||
# https://github.com/NixOS/nixpkgs/pull/85103#issuecomment-613071343
|
||||
"@out@/lib/gstreamer-1.0"
|
||||
];
|
||||
}}" | combineWrappersInfo
|
||||
};
|
||||
};
|
||||
'';
|
||||
```
|
||||
|
||||
The above will put a shell command in `postInstall` that's generated by
|
||||
`combineWrappersInfo` that will put the environment information into
|
||||
`wrappers.json`.
|
||||
|
||||
It should be possible to tell `combineWrappersInfo` to use a symlink directory
|
||||
instead of a big environment variable, by using for example:
|
||||
|
||||
Other nix attributes along `envInfo` such as:
|
||||
|
||||
```nix
|
||||
envInfo = {
|
||||
# ...
|
||||
};
|
||||
symlink = {
|
||||
THIS_ENV_VAR = "to/this-directory/in-out";
|
||||
};
|
||||
```
|
||||
|
||||
`wrapQtAppsHook` and `wrapGAppsHook` should be replaced with `makeWrapperAuto`
|
||||
which enables removing frequent workarounds such as:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue