diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2018-11-29 16:58:47 +0100 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2019-01-11 10:42:37 +0100 |
commit | 9c3cb094ce164ae3b2d69a7d29c174329e1e16fe (patch) | |
tree | a817e03c71625ea984508acef734738d69d46204 /pkgs/tools/misc/cht.sh | |
parent | 9ea5b2c0527d1975f6add88d050ef1019a651e1f (diff) | |
download | nixlib-9c3cb094ce164ae3b2d69a7d29c174329e1e16fe.tar nixlib-9c3cb094ce164ae3b2d69a7d29c174329e1e16fe.tar.gz nixlib-9c3cb094ce164ae3b2d69a7d29c174329e1e16fe.tar.bz2 nixlib-9c3cb094ce164ae3b2d69a7d29c174329e1e16fe.tar.lz nixlib-9c3cb094ce164ae3b2d69a7d29c174329e1e16fe.tar.xz nixlib-9c3cb094ce164ae3b2d69a7d29c174329e1e16fe.tar.zst nixlib-9c3cb094ce164ae3b2d69a7d29c174329e1e16fe.zip |
cht-sh: init at unstable-2018-11-02
Diffstat (limited to 'pkgs/tools/misc/cht.sh')
-rw-r--r-- | pkgs/tools/misc/cht.sh/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/misc/cht.sh/default.nix b/pkgs/tools/misc/cht.sh/default.nix new file mode 100644 index 000000000000..837bc0e9ed71 --- /dev/null +++ b/pkgs/tools/misc/cht.sh/default.nix @@ -0,0 +1,39 @@ +{ stdenv +, fetchFromGitHub +, makeWrapper +, curl +, ncurses +, rlwrap +, xsel +}: + +stdenv.mkDerivation rec { + name = "cht.sh-${version}"; + version = "unstable-2018-11-02"; + + nativeBuildInputs = [ makeWrapper ]; + + src = fetchFromGitHub { + owner = "chubin"; + repo = "cheat.sh"; + rev = "9595805ac68b3c096f7c51fa024dcb97a7dfac44"; + sha256 = "11g8say5fksg0zg0bqrgl92rprn4lwp20g9rz1i0r38f0jy3nyrf"; + }; + + # Fix ".cht.sh-wrapped" in the help message + postPatch = "substituteInPlace share/cht.sh.txt --replace '\${0##*/}' cht.sh"; + + installPhase = '' + install -m755 -D share/cht.sh.txt "$out/bin/cht.sh" + wrapProgram "$out/bin/cht.sh" \ + --prefix PATH : "${stdenv.lib.makeBinPath [ curl rlwrap ncurses xsel ]}" + ''; + + meta = with stdenv.lib; { + description = "CLI client for cheat.sh, a community driven cheat sheet"; + license = licenses.mit; + maintainers = with maintainers; [ fgaz ]; + homepage = https://github.com/chubin/cheat.sh; + }; +} + |