nix-module-wrapper-manager-fds/lib/utils.nix

32 lines
866 B
Nix
Raw Permalink Normal View History

2024-07-31 13:51:40 +00:00
{
pkgs,
lib,
self,
}:
rec {
/*
Given a list of derivations, return a list of the store path with the `bin`
output (or at least with "/bin" in each of the paths).
*/
2024-07-31 13:51:40 +00:00
getBin = drvs: builtins.map (v: lib.getBin v) drvs;
/*
Given a list of derivations, return a list of the store paths with the
`libexec` appended.
*/
2024-07-31 13:51:40 +00:00
getLibexec = drvs: builtins.map (v: "${v}/libexec") drvs;
/*
Given a list of derivations, return a list of the store paths appended with
`/etc/xdg` suitable as part of the XDG_CONFIG_DIRS environment variable.
*/
2024-07-31 13:51:40 +00:00
getXdgConfigDirs = drvs: builtins.map (v: "${v}/etc/xdg") drvs;
/*
Given a list of derivations, return a list of store paths appended with
`/share` suitable as part of the XDG_DATA_DIRS environment variable.
*/
2024-07-31 13:51:40 +00:00
getXdgDataDirs = drvs: builtins.map (v: "${v}/share") drvs;
}