nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 57 lines 1.1 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5 installShellFiles, 6}: 7 8buildGoModule rec { 9 pname = "cheat"; 10 version = "4.4.2"; 11 12 src = fetchFromGitHub { 13 owner = "cheat"; 14 repo = "cheat"; 15 tag = version; 16 sha256 = "sha256-GUU6VWfTmNS6ny12HnMr3uQmS7HI86Oupcmqx0MVAvE="; 17 }; 18 19 subPackages = [ "cmd/cheat" ]; 20 21 nativeBuildInputs = [ installShellFiles ]; 22 23 patches = [ 24 (builtins.toFile "fix-zsh-completion.patch" '' 25 diff --git a/scripts/cheat.zsh b/scripts/cheat.zsh 26 index befe1b2..675c9f8 100755 27 --- a/scripts/cheat.zsh 28 +++ b/scripts/cheat.zsh 29 @@ -62,4 +62,4 @@ _cheat() { 30 esac 31 } 32 33 -compdef _cheat cheat 34 +_cheat "$@" 35 '') 36 ]; 37 38 postInstall = '' 39 installManPage doc/cheat.1 40 installShellCompletion scripts/cheat.{bash,fish,zsh} 41 ''; 42 43 vendorHash = null; 44 45 doCheck = false; 46 47 meta = { 48 description = "Create and view interactive cheatsheets on the command-line"; 49 maintainers = with lib.maintainers; [ mic92 ]; 50 license = with lib.licenses; [ 51 gpl3 52 mit 53 ]; 54 inherit (src.meta) homepage; 55 mainProgram = "cheat"; 56 }; 57}