diff options
author | Peder Bergebakken Sundt <pbsds@hotmail.com> | 2022-10-24 21:22:45 +0200 |
---|---|---|
committer | Peder Bergebakken Sundt <pbsds@hotmail.com> | 2022-10-28 17:57:28 +0200 |
commit | 7bd0044abd5f703a015c256adb6c55925cf1c528 (patch) | |
tree | 398f375ca404f3fcc952d3699586b085cd5f9455 /pkgs/tools/misc/pokemonsay | |
parent | 7b0122aede0382ec215b8d455d821d7134515979 (diff) | |
download | nixpkgs-7bd0044abd5f703a015c256adb6c55925cf1c528.tar nixpkgs-7bd0044abd5f703a015c256adb6c55925cf1c528.tar.gz nixpkgs-7bd0044abd5f703a015c256adb6c55925cf1c528.tar.bz2 nixpkgs-7bd0044abd5f703a015c256adb6c55925cf1c528.tar.lz nixpkgs-7bd0044abd5f703a015c256adb6c55925cf1c528.tar.xz nixpkgs-7bd0044abd5f703a015c256adb6c55925cf1c528.tar.zst nixpkgs-7bd0044abd5f703a015c256adb6c55925cf1c528.zip |
pokemonsay: unstable-2021-10-05 -> 1.0.0, fix tests, apply word-wrap patch
Only the version tag changes, as the same rev got tagged as v1.0.0 as of https://github.com/HRKings/pokemonsay-newgenerations/issues/4
Diffstat (limited to 'pkgs/tools/misc/pokemonsay')
-rw-r--r-- | pkgs/tools/misc/pokemonsay/default.nix | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/tools/misc/pokemonsay/default.nix b/pkgs/tools/misc/pokemonsay/default.nix index f61b93a874f..7053e4ba807 100644 --- a/pkgs/tools/misc/pokemonsay/default.nix +++ b/pkgs/tools/misc/pokemonsay/default.nix @@ -1,6 +1,7 @@ { lib , stdenvNoCC , fetchFromGitHub +, fetchpatch , cowsay , coreutils , findutils @@ -8,15 +9,23 @@ stdenvNoCC.mkDerivation rec { pname = "pokemonsay"; - version = "unstable-2021-10-05"; + version = "1.0.0"; src = fetchFromGitHub { owner = "HRKings"; repo = "pokemonsay-newgenerations"; - rev = "baccc6d2fe1897c48f60d82ff9c4d4c018f5b594"; + rev = "v${version}"; hash = "sha256-IDTAZmOzkUg0kLUM0oWuVbi8EwE4sEpLWrNAtq/he+g="; }; + patches = [ + (fetchpatch { # https://github.com/HRKings/pokemonsay-newgenerations/pull/5 + name = "word-wrap-fix.patch"; + url = "https://github.com/pbsds/pokemonsay-newgenerations/commit/7056d7ba689479a8e6c14ec000be1dfcd83afeb0.patch"; + hash = "sha256-aqUJkyJDWArLjChxLZ4BbC6XAB53LAqARzTvEAxrFCI="; + }) + ]; + postPatch = '' substituteInPlace pokemonsay.sh \ --replace \ @@ -51,8 +60,11 @@ stdenvNoCC.mkDerivation rec { cp pokemons/*.cow $out/share/pokemonsay ''; - checkPhase = '' - $out/bin/pokemonsay --list-pokemon + doInstallCheck = true; + installCheckPhase = '' + (set -x + test "$($out/bin/pokemonsay --list | wc -l)" -ge 891 + ) ''; meta = with lib; { |