summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2023-01-13 12:15:15 +0100
committerVladimír Čunát <v@cunat.cz>2023-01-13 12:15:15 +0100
commit0c942e6ceba1ab887f3c63a3292e903c6b2e51b5 (patch)
treeb555ea533076745604cd754892f428f3f91924aa
parentee3a1bac144742b8cb5a408f357446da8dfaff6b (diff)
parent392d0df157fbab524bee99500f948126638d156c (diff)
Merge #207625: tewisay: unstable-2017-04-14 -> unstable-2022-11-04
-rw-r--r--pkgs/tools/misc/tewisay/default.nix41
-rw-r--r--pkgs/tools/misc/tewisay/deps.nix21
2 files changed, 23 insertions, 39 deletions
diff --git a/pkgs/tools/misc/tewisay/default.nix b/pkgs/tools/misc/tewisay/default.nix
index 3ff7259b9e0a..35b66a093683 100644
--- a/pkgs/tools/misc/tewisay/default.nix
+++ b/pkgs/tools/misc/tewisay/default.nix
@@ -1,35 +1,40 @@
-{ lib, buildGoPackage, fetchFromGitHub, makeWrapper }:
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, unstableGitUpdater
+}:
-buildGoPackage rec {
- pname = "tewisay-unstable";
- version = "2017-04-14";
-
- goPackagePath = "github.com/lucy/tewisay";
+buildGoModule rec {
+ pname = "tewisay";
+ version = "unstable-2022-11-04";
+ # lucy deleted the old repo, this is a fork/mirror
src = fetchFromGitHub {
- owner = "lucy";
+ owner = "raymond-w-ko";
repo = "tewisay";
- rev = "e3fc38737cedb79d93b8cee07207c6c86db4e488";
- sha256 = "1na3xi4z90v8qydcvd3454ia9jg7qhinciy6kvgyz61q837cw5dk";
+ rev = "caa5b0131dda868f656716d2107f02d04d1048d4";
+ hash = "sha256-E492d8P/Bek9xZlJP+k9xvIJEFtA1YrIB/pogvz3wM4=";
};
- nativeBuildInputs = [ makeWrapper ];
+ vendorHash = "sha256-WcpRJ31kqWA255zfjuWDj0honJgSGdm4ONx2yOKk7/g=";
- goDeps = ./deps.nix;
+ # Currently hard-coded, will be fixed by developer
+ postPatch = ''
+ substituteInPlace main.go \
+ --replace "/usr" "$out"
+ '';
postInstall = ''
- install -D -t $out/share/tewisay/cows go/src/${goPackagePath}/cows/*.cow
+ mkdir -p $out/share
+ mv {cows,zsh} $out/share
'';
- preFixup = ''
- wrapProgram $out/bin/tewisay \
- --prefix COWPATH : $out/share/tewisay/cows
- '';
+ passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
- homepage = "https://github.com/lucy/tewisay";
+ homepage = "https://github.com/raymond-w-ko/tewisay";
description = "Cowsay replacement with unicode and partial ansi escape support";
- license = licenses.cc0;
+ license = with licenses; [ cc0 ];
maintainers = with maintainers; [ Madouura ];
};
}
diff --git a/pkgs/tools/misc/tewisay/deps.nix b/pkgs/tools/misc/tewisay/deps.nix
deleted file mode 100644
index b6b1356dcf80..000000000000
--- a/pkgs/tools/misc/tewisay/deps.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
-[
- {
- goPackagePath = "github.com/mattn/go-runewidth";
- fetch = {
- type = "git";
- url = "https://github.com/mattn/go-runewidth";
- rev = "97311d9f7767e3d6f422ea06661bc2c7a19e8a5d";
- sha256 = "0dxlrzn570xl7gb11hjy1v4p3gw3r41yvqhrffgw95ha3q9p50cg";
- };
- }
- {
- goPackagePath = "github.com/ogier/pflag";
- fetch = {
- type = "git";
- url = "https://github.com/ogier/pflag";
- rev = "45c278ab3607870051a2ea9040bb85fcb8557481";
- sha256 = "0620v75wppfd84d95n312wpngcb73cph4q3ivs1h0waljfnsrd5l";
- };
- }
-]