2023-01-23 23:14:30 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2016-02-25 16:32:08 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "gti";
|
2023-11-28 11:23:24 +00:00
|
|
|
version = "1.9.1";
|
2016-02-25 16:32:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rwos";
|
|
|
|
repo = "gti";
|
2017-08-12 09:05:14 +00:00
|
|
|
rev = "v${version}";
|
2023-11-28 11:23:24 +00:00
|
|
|
sha256 = "sha256-DUDCFcaB38Xkp3lLfEhjGC0j430dphXFBVhGzm7/Bp0=";
|
2016-02-25 16:32:08 +00:00
|
|
|
};
|
|
|
|
|
2021-03-05 01:27:20 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile --replace 'CC=cc' 'CC=${stdenv.cc.targetPrefix}cc'
|
|
|
|
'';
|
|
|
|
|
2023-01-23 23:14:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
|
2016-02-25 16:32:08 +00:00
|
|
|
installPhase = ''
|
2023-01-23 23:14:30 +00:00
|
|
|
install -D gti $out/bin/gti
|
|
|
|
installManPage gti.6
|
|
|
|
installShellCompletion --cmd gti \
|
|
|
|
--bash completions/gti.bash \
|
|
|
|
--zsh completions/gti.zsh
|
2016-02-25 16:32:08 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-03-05 01:27:20 +00:00
|
|
|
homepage = "https://r-wos.org/hacks/gti";
|
2016-02-25 16:32:08 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
description = "Humorous typo-based git runner; drives a car over the terminal";
|
|
|
|
maintainers = with maintainers; [ fadenb ];
|
|
|
|
platforms = platforms.unix;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "gti";
|
2016-02-25 16:32:08 +00:00
|
|
|
};
|
|
|
|
}
|