1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00

Merge pull request #21068 from offlinehacker/pkgs/completions/add

Add bash completions for a few packages
This commit is contained in:
Jaka Hudoklin 2016-12-17 15:37:27 +01:00 committed by GitHub
commit 8a85fc9531
6 changed files with 34 additions and 2 deletions

View file

@ -14,6 +14,11 @@ buildGoPackage rec {
sha256 = "0l4a5bqfw8i8wrl5yzkqy848r7vdx6hw8p5m3z3vzabvsmsjjwy7";
};
postInstall = ''
mkdir -p $bin/share/bash-completion/completions/
cp go/src/github.com/docker/machine/contrib/completion/bash/* $bin/share/bash-completion/completions/
'';
postFixup = ''
mv $bin/bin/cmd $bin/bin/docker-machine
'';

View file

@ -47,11 +47,13 @@ stdenv.mkDerivation rec {
'';
installPhase = ''
mkdir -p "$out/bin" "$man/share/man" "$pause/bin"
mkdir -p "$out/bin" "$out/share/bash-completion/completions" "$man/share/man" "$pause/bin"
cp _output/local/go/bin/* "$out/bin/"
cp build/pause/pause "$pause/bin/pause"
cp -R docs/man/man1 "$man/share/man"
$out/bin/kubectl completion bash > $out/share/bash-completion/completions/kubectl
'';
preFixup = ''

View file

@ -30,6 +30,9 @@ stdenv.mkDerivation rec {
installPhase = ''
cp $src $out/bin/${pname}
chmod +x $out/bin/${pname}
mkdir -p $out/share/bash-completion/completions/
HOME=$(pwd) $out/bin/minikube completion bash > $out/share/bash-completion/completions/minikube
'';
meta = with stdenv.lib; {

View file

@ -58,6 +58,11 @@ in
postInstall = ''
paxmark m $out/bin/node
PATH=$out/bin:$PATH patchShebangs $out
${optionalString enableNpm ''
mkdir -p $out/share/bash-completion/completions/
$out/bin/npm completion > $out/share/bash-completion/completions/npm
''}
'';
meta = {

View file

@ -1,6 +1,13 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
let
vaultBashCompletions = fetchFromGitHub {
owner = "iljaweis";
repo = "vault-bash-completion";
rev = "62c142e20929f930c893ebe3366350d735e81fbd";
sha256 = "0nfv10ykjq9751ijdyq728gjlgldm1lxvrar8kf6nz6rdfnnl2n5";
};
in buildGoPackage rec {
name = "vault-${version}";
version = "0.6.3";
@ -18,6 +25,11 @@ buildGoPackage rec {
-X github.com/hashicorp/vault/version.GitCommit=${version}
'';
postInstall = ''
mkdir -p $bin/share/bash-completion/completions/
cp ${vaultBashCompletions}/vault-bash-completion.sh $bin/share/bash-completion/completions/vault
'';
meta = with stdenv.lib; {
homepage = https://www.vaultproject.io;
description = "A tool for managing secrets";

View file

@ -10962,6 +10962,11 @@ in {
sed -i "s/'requests >= 2.6.1, < 2.8'/'requests'/" setup.py
'';
postInstall = ''
mkdir -p $out/share/bash-completion/completions/
cp contrib/completion/bash/docker-compose $out/share/bash-completion/completions/docker-compose
'';
meta = {
homepage = "https://docs.docker.com/compose/";
description = "Multi-container orchestration for Docker";