docker-machine: use installShellFiles

This commit is contained in:
zowoq 2020-04-26 13:16:50 +10:00
parent c1facd193e
commit 7a40eb5763

View File

@ -1,5 +1,5 @@
# This file was generated by go2nix.
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoPackage, fetchFromGitHub, installShellFiles }:
buildGoPackage rec {
pname = "machine";
@ -14,13 +14,13 @@ buildGoPackage rec {
sha256 = "0xxzxi5v7ji9j2k7kxhi0ah91lfa7b9rg3nywgx0lkv8dlgp8kmy";
};
postInstall = ''
mkdir -p \
$bin/share/bash-completion/completions/ \
$bin/share/zsh/site-functions/
nativeBuildInputs = [ installShellFiles ];
cp go/src/github.com/docker/machine/contrib/completion/bash/* $bin/share/bash-completion/completions/
cp go/src/github.com/docker/machine/contrib/completion/zsh/* $bin/share/zsh/site-functions/
postInstall = ''
pushd go/src/${goPackagePath}/contrib/completion
installShellCompletion --bash bash/*
installShellCompletion --zsh zsh/*
popd
'';
meta = with stdenv.lib; {