From 36f35bd78a93d6abf918c899c69050a4cacd26ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 30 Oct 2019 13:40:01 +0000 Subject: [PATCH 1/2] cheat: 2.5.1 -> 3.0.3 --- pkgs/applications/misc/cheat/default.nix | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/misc/cheat/default.nix b/pkgs/applications/misc/cheat/default.nix index 357dd9bcb8a..f26d2ba125d 100644 --- a/pkgs/applications/misc/cheat/default.nix +++ b/pkgs/applications/misc/cheat/default.nix @@ -1,31 +1,19 @@ -{ stdenv, python3, fetchFromGitHub }: +{ stdenv, fetchFromGitHub, buildGoModule }: -with python3.pkgs; -buildPythonApplication rec { +buildGoModule rec { pname = "cheat"; - version = "2.5.1"; - - propagatedBuildInputs = [ docopt pygments termcolor ]; + version = "3.0.3"; src = fetchFromGitHub { owner = "chrisallenlane"; repo = "cheat"; rev = version; - sha256 = "1i543hvg1yizamfd83bawflfcb500hvc72i59ikck8j1hjk50hsl"; + sha256 = "19w1admdcgld9vlc4fsyc5d9bi6rmwhr2x2ji43za2vjlk34hnnx"; }; - # no tests available - doCheck = false; - postInstall = '' - install -D man1/cheat.1.gz $out/share/man/man1/cheat.1.gz - mv $out/${python3.sitePackages}/etc $out/ - mv $out/${python3.sitePackages}/usr/share/* $out/share/ - rm -r $out/${python3.sitePackages}/usr - ''; + subPackages = [ "cmd/cheat" ]; - makeWrapperArgs = [ - "--suffix" "CHEAT_PATH" ":" "$out/share/cheat" - ]; + modSha256 = "189cqnfl403f4lk7g9v68mwk93ciglqli639dk4x9091lvn5gq5q"; meta = with stdenv.lib; { description = "cheat allows you to create and view interactive cheatsheets on the command-line"; From 20367c22f186a35129e5f6e762b86fa5c511b606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 30 Oct 2019 16:03:22 +0000 Subject: [PATCH 2/2] cheat: adapt meta to the conventions --- pkgs/applications/misc/cheat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/cheat/default.nix b/pkgs/applications/misc/cheat/default.nix index f26d2ba125d..a86c1e8bc05 100644 --- a/pkgs/applications/misc/cheat/default.nix +++ b/pkgs/applications/misc/cheat/default.nix @@ -16,9 +16,9 @@ buildGoModule rec { modSha256 = "189cqnfl403f4lk7g9v68mwk93ciglqli639dk4x9091lvn5gq5q"; meta = with stdenv.lib; { - description = "cheat allows you to create and view interactive cheatsheets on the command-line"; + description = "Create and view interactive cheatsheets on the command-line"; maintainers = with maintainers; [ mic92 ]; license = with licenses; [ gpl3 mit ]; - homepage = https://github.com/chrisallenlane/cheat; + homepage = "https://github.com/chrisallenlane/cheat"; }; }