mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 21:18:28 +03:00
Merge pull request #176886 from hyperfekt/nonderivation_fish-completion
This commit is contained in:
commit
87ee3c4fdf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user