Merge pull request #86035 from zowoq/go-fixes

This commit is contained in:
Jörg Thalheim
2020-04-27 10:03:52 +01:00
committed by GitHub
13 changed files with 65 additions and 60 deletions

View File

@@ -5,6 +5,7 @@
, writeShellScriptBin, apparmor-profiles, apparmor-parser
, criu
, bash
, installShellFiles
}:
buildGoPackage rec {
@@ -39,11 +40,10 @@ buildGoPackage rec {
'')
]}
mkdir -p "$bin/share/bash-completion/completions/"
cp -av go/src/github.com/lxc/lxd/scripts/bash/lxd-client "$bin/share/bash-completion/completions/lxc"
installShellCompletion --bash go/src/github.com/lxc/lxd/scripts/bash/lxd-client
'';
nativeBuildInputs = [ pkgconfig makeWrapper ];
nativeBuildInputs = [ installShellFiles pkgconfig makeWrapper ];
buildInputs = [ lxc acl libcap libco-canonical.dev dqlite.dev
raft-canonical.dev sqlite-replication udev.dev ];

View File

@@ -1,4 +1,4 @@
{ stdenv, buildGoPackage, fetchFromGitHub, git, gnupg, xclip, wl-clipboard, makeWrapper }:
{ stdenv, buildGoPackage, fetchFromGitHub, git, gnupg, xclip, wl-clipboard, installShellFiles, makeWrapper }:
buildGoPackage rec {
pname = "gopass";
@@ -6,7 +6,7 @@ buildGoPackage rec {
goPackagePath = "github.com/gopasspw/gopass";
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ installShellFiles makeWrapper ];
src = fetchFromGitHub {
owner = "gopasspw";
@@ -22,13 +22,10 @@ buildGoPackage rec {
] ++ stdenv.lib.optional stdenv.isLinux wl-clipboard);
postInstall = ''
mkdir -p \
$bin/share/bash-completion/completions \
$bin/share/zsh/site-functions \
$bin/share/fish/vendor_completions.d
$bin/bin/gopass completion bash > $bin/share/bash-completion/completions/_gopass
$bin/bin/gopass completion zsh > $bin/share/zsh/site-functions/_gopass
$bin/bin/gopass completion fish > $bin/share/fish/vendor_completions.d/gopass.fish
for shell in bash fish zsh; do
$bin/bin/gopass completion $shell > gopass.$shell
installShellCompletion gopass.$shell
done
'';
postFixup = ''

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, buildGoPackage }:
{ stdenv, fetchFromGitHub, buildGoPackage, installShellFiles }:
buildGoPackage rec {
pname = "vault";
@@ -15,14 +15,16 @@ buildGoPackage rec {
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
buildFlagsArray = [
"-tags='vault'"
"-ldflags=\"-X github.com/hashicorp/vault/sdk/version.GitCommit='v${version}'\""
];
postInstall = ''
mkdir -p $bin/share/bash-completion/completions
echo "complete -C $bin/bin/vault vault" > $bin/share/bash-completion/completions/vault
echo "complete -C $bin/bin/vault vault" > vault.bash
installShellCompletion vault.bash
'';
meta = with stdenv.lib; {