mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 10:12:58 +00:00
c510d1e646
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
42 lines
900 B
Nix
42 lines
900 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gti";
|
|
version = "1.8.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rwos";
|
|
repo = "gti";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-x6ncvnZPPrVcQYwtwkSenW+ri0L6FpuDa7U7uYUqiyk=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace Makefile --replace 'CC=cc' 'CC=${stdenv.cc.targetPrefix}cc'
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
installPhase = ''
|
|
install -D gti $out/bin/gti
|
|
installManPage gti.6
|
|
installShellCompletion --cmd gti \
|
|
--bash completions/gti.bash \
|
|
--zsh completions/gti.zsh
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://r-wos.org/hacks/gti";
|
|
license = licenses.mit;
|
|
description = "Humorous typo-based git runner; drives a car over the terminal";
|
|
maintainers = with maintainers; [ fadenb ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|