nixpkgs/pkgs/applications/misc/cheat/default.nix
2020-07-31 18:52:25 +00:00

33 lines
744 B
Nix

{ stdenv, fetchFromGitHub
, buildGoModule, installShellFiles }:
buildGoModule rec {
pname = "cheat";
version = "4.0.2";
src = fetchFromGitHub {
owner = "cheat";
repo = "cheat";
rev = version;
sha256 = "06dqwjyk7pmfxvkscn06sc307pxvyjqc6myighfsh3f5x83pg1nc";
};
subPackages = [ "cmd/cheat" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installManPage doc/cheat.1
installShellCompletion scripts/cheat.{bash,fish,zsh}
'';
vendorSha256 = null;
meta = with stdenv.lib; {
description = "Create and view interactive cheatsheets on the command-line";
maintainers = with maintainers; [ mic92 ];
license = with licenses; [ gpl3 mit ];
inherit (src.meta) homepage;
};
}