gti: refactor installation, install completion (#210682)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
7115ead0f2
commit
c510d1e646
|
@ -1,4 +1,8 @@
|
||||||
{ lib, stdenv, fetchFromGitHub }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, installShellFiles
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gti";
|
pname = "gti";
|
||||||
|
@ -15,10 +19,16 @@ stdenv.mkDerivation rec {
|
||||||
substituteInPlace Makefile --replace 'CC=cc' 'CC=${stdenv.cc.targetPrefix}cc'
|
substituteInPlace Makefile --replace 'CC=cc' 'CC=${stdenv.cc.targetPrefix}cc'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/share/man/man6
|
install -D gti $out/bin/gti
|
||||||
cp gti $out/bin
|
installManPage gti.6
|
||||||
cp gti.6 $out/share/man/man6
|
installShellCompletion --cmd gti \
|
||||||
|
--bash completions/gti.bash \
|
||||||
|
--zsh completions/gti.zsh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue