prometheus-alertmanager: use installShellFiles
This commit is contained in:
parent
7516cc7226
commit
bd6b2318c3
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, go, buildGoPackage, fetchFromGitHub }:
|
{ stdenv, go, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
pname = "alertmanager";
|
pname = "alertmanager";
|
||||||
@ -24,9 +24,11 @@ buildGoPackage rec {
|
|||||||
-X ${t}.GoVersion=${stdenv.lib.getVersion go}
|
-X ${t}.GoVersion=${stdenv.lib.getVersion go}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $bin/etc/bash_completion.d
|
$bin/bin/amtool --completion-script-bash > amtool.bash
|
||||||
$NIX_BUILD_TOP/go/bin/amtool --completion-script-bash > $bin/etc/bash_completion.d/amtool_completion.sh
|
installShellCompletion amtool.bash
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user