2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildGoModule, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "cheat";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "4.4.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cheat";
|
|
|
|
repo = "cheat";
|
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-GUU6VWfTmNS6ny12HnMr3uQmS7HI86Oupcmqx0MVAvE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
subPackages = [ "cmd/cheat" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
patches = [
|
|
|
|
(builtins.toFile "fix-zsh-completion.patch" ''
|
|
|
|
diff --git a/scripts/cheat.zsh b/scripts/cheat.zsh
|
|
|
|
index befe1b2..675c9f8 100755
|
|
|
|
--- a/scripts/cheat.zsh
|
|
|
|
+++ b/scripts/cheat.zsh
|
|
|
|
@@ -62,4 +62,4 @@ _cheat() {
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
-compdef _cheat cheat
|
|
|
|
+_cheat "$@"
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2020-05-29 06:06:01 +00:00
|
|
|
installManPage doc/cheat.1
|
2020-04-24 23:36:52 +00:00
|
|
|
installShellCompletion scripts/cheat.{bash,fish,zsh}
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Create and view interactive cheatsheets on the command-line";
|
|
|
|
maintainers = with maintainers; [ mic92 ];
|
|
|
|
license = with licenses; [ gpl3 mit ];
|
|
|
|
inherit (src.meta) homepage;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "cheat";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|