3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/cheat/default.nix

37 lines
996 B
Nix
Raw Normal View History

2019-01-29 11:57:36 +00:00
{ stdenv, python3, fetchFromGitHub }:
2016-09-13 11:36:00 +01:00
2019-01-29 11:57:36 +00:00
with python3.pkgs;
2017-09-12 09:37:57 +01:00
buildPythonApplication rec {
pname = "cheat";
2019-01-29 11:57:36 +00:00
version = "2.5.1";
2016-09-13 11:36:00 +01:00
2019-01-29 11:57:36 +00:00
propagatedBuildInputs = [ docopt pygments termcolor ];
2016-09-13 11:36:00 +01:00
2017-11-27 09:34:23 +00:00
src = fetchFromGitHub {
owner = "chrisallenlane";
repo = "cheat";
rev = version;
2019-01-29 11:57:36 +00:00
sha256 = "1i543hvg1yizamfd83bawflfcb500hvc72i59ikck8j1hjk50hsl";
2016-09-13 11:36:00 +01:00
};
2016-11-30 20:05:01 +00:00
# no tests available
doCheck = false;
2016-09-13 11:36:00 +01:00
2017-11-27 09:34:23 +00:00
postInstall = ''
install -D man1/cheat.1.gz $out/share/man/man1/cheat.1.gz
2019-01-29 11:57:36 +00:00
mv $out/${python3.sitePackages}/etc $out/
mv $out/${python3.sitePackages}/usr/share/* $out/share/
rm -r $out/${python3.sitePackages}/usr
2017-11-27 09:34:23 +00:00
'';
2019-01-29 11:57:36 +00:00
makeWrapperArgs = [
"--suffix" "CHEAT_PATH" ":" "$out/share/cheat"
];
2017-09-12 09:37:57 +01:00
meta = with stdenv.lib; {
2016-09-13 11:36:00 +01:00
description = "cheat allows you to create and view interactive cheatsheets on the command-line";
2017-09-12 09:37:57 +01:00
maintainers = with maintainers; [ mic92 ];
2019-01-29 11:57:36 +00:00
license = with licenses; [ gpl3 mit ];
homepage = https://github.com/chrisallenlane/cheat;
2016-09-13 11:36:00 +01:00
};
}