Merge pull request #176886 from hyperfekt/nonderivation_fish-completion

This commit is contained in:
Artturi 2023-09-23 06:28:23 +03:00 committed by GitHub
commit 87ee3c4fdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -258,16 +258,13 @@ in
preferLocalBuild = true;
allowSubstitutes = false;
};
generateCompletions = package: pkgs.runCommand
"${package.name}_fish-completions"
(
{
inherit package;
preferLocalBuild = true;
allowSubstitutes = false;
}
// optionalAttrs (package ? meta.priority) { meta.priority = package.meta.priority; }
)
generateCompletions = package: pkgs.runCommandLocal
( with lib.strings; let
storeLength = stringLength storeDir + 34; # Nix' StorePath::HashLen + 2 for the separating slash and dash
pathName = substring storeLength (stringLength package - storeLength) package;
in (package.name or pathName) + "_fish-completions")
( { inherit package; } //
optionalAttrs (package ? meta.priority) { meta.priority = package.meta.priority; })
''
mkdir -p $out
if [ -d $package/share/man ]; then