mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Merge pull request #163441 from maralorn/nom-zsh-completion
This commit is contained in:
commit
f262cec4ab
@ -16,6 +16,7 @@
|
||||
filepath,
|
||||
generic-optics,
|
||||
HUnit,
|
||||
installShellFiles,
|
||||
lib,
|
||||
lock-file,
|
||||
MemoTrie,
|
||||
@ -140,11 +141,18 @@ mkDerivation {
|
||||
maintainers = with lib.maintainers; [maralorn];
|
||||
passthru.updateScript = ./update.sh;
|
||||
testTarget = "unit-tests";
|
||||
buildTools = [installShellFiles];
|
||||
postInstall = ''
|
||||
cat > $out/bin/nom-build << EOF
|
||||
#!${runtimeShell}
|
||||
${expect}/bin/unbuffer nix-build "\$@" 2>&1 | exec $out/bin/nom
|
||||
EOF
|
||||
chmod a+x $out/bin/nom-build
|
||||
installShellCompletion --zsh --name _nom-build ${
|
||||
builtins.toFile "completion.zsh" ''
|
||||
#compdef nom-build
|
||||
compdef nom-build=nix-build
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
@ -21,16 +21,29 @@ cat > "$derivation_file" << EOF
|
||||
# This file has been autogenerate with cabal2nix.
|
||||
# Update via ./update.sh"
|
||||
EOF
|
||||
cabal2nix --extra-arguments expect --extra-arguments runtimeShell --maintainer maralorn "https://github.com/maralorn/nix-output-monitor/archive/refs/tags/${new_version}.tar.gz" | head -n-1 >> "$derivation_file"
|
||||
|
||||
cabal2nix \
|
||||
--extra-arguments expect \
|
||||
--extra-arguments runtimeShell\
|
||||
--extra-arguments installShellFiles\
|
||||
--maintainer maralorn \
|
||||
"https://github.com/maralorn/nix-output-monitor/archive/refs/tags/${new_version}.tar.gz" \
|
||||
| head -n-1 >> "$derivation_file"
|
||||
|
||||
cat >> "$derivation_file" << EOF
|
||||
passthru.updateScript = ./update.sh;
|
||||
testTarget = "unit-tests";
|
||||
buildTools = [ installShellFiles ];
|
||||
postInstall = ''
|
||||
cat > \$out/bin/nom-build << EOF
|
||||
#!\${runtimeShell}
|
||||
\${expect}/bin/unbuffer nix-build "\\\$@" 2>&1 | exec \$out/bin/nom
|
||||
EOF
|
||||
chmod a+x \$out/bin/nom-build
|
||||
installShellCompletion --zsh --name _nom-build \${builtins.toFile "completion.zsh" ''
|
||||
#compdef nom-build
|
||||
compdef nom-build=nix-build
|
||||
''}
|
||||
'';
|
||||
}
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user