13 version = "unstable-2021-01-31";
15 nativeBuildInputs = [ makeWrapper ];
17 src = fetchFromGitHub {
20 rev = "01e579176981356fb90d4aa58fea2d6c273a45a5";
21 sha256 = "0d98v67ajsc80i962myh0j4ph7bn3csk8y9jf8b5rfqd1zg737hb";
24 # Fix ".cht.sh-wrapped" in the help message
25 postPatch = "substituteInPlace share/cht.sh.txt --replace '\${0##*/}' cht.sh";
28 install -m755 -D share/cht.sh.txt "$out/bin/cht.sh"
30 # install shell completion files
31 mkdir -p $out/share/bash-completion/completions $out/share/zsh/site-functions
32 mv share/bash_completion.txt $out/share/bash-completion/completions/cht.sh
33 cp share/zsh.txt $out/share/zsh/site-functions/_cht
35 wrapProgram "$out/bin/cht.sh" \
36 --prefix PATH : "${lib.makeBinPath [ curl rlwrap ncurses xsel ]}"
39 passthru.updateScript = unstableGitUpdater {
40 url = "https://github.com/chubin/cheat.sh.git";
44 description = "CLI client for cheat.sh, a community driven cheat sheet";
45 license = licenses.mit;
46 maintainers = with maintainers; [ fgaz evanjs ];
47 homepage = "https://github.com/chubin/cheat.sh";