mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
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 {
|
||||
pname = "alertmanager";
|
||||
@ -24,9 +24,11 @@ buildGoPackage rec {
|
||||
-X ${t}.GoVersion=${stdenv.lib.getVersion go}
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $bin/etc/bash_completion.d
|
||||
$NIX_BUILD_TOP/go/bin/amtool --completion-script-bash > $bin/etc/bash_completion.d/amtool_completion.sh
|
||||
$bin/bin/amtool --completion-script-bash > amtool.bash
|
||||
installShellCompletion amtool.bash
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user