3
0
Fork 0
forked from mirrors/nixpkgs

pokemonsay: init at unstable-2021-10-05

This commit is contained in:
Peder Bergebakken Sundt 2022-10-16 13:27:23 +02:00 committed by ehmry
parent 8527fb88b5
commit 37447aa7af
2 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,65 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, cowsay
, coreutils
, findutils
}:
stdenvNoCC.mkDerivation rec {
pname = "pokemonsay";
version = "unstable-2021-10-05";
src = fetchFromGitHub {
owner = "HRKings";
repo = "pokemonsay-newgenerations";
rev = "baccc6d2fe1897c48f60d82ff9c4d4c018f5b594";
hash = "sha256-IDTAZmOzkUg0kLUM0oWuVbi8EwE4sEpLWrNAtq/he+g=";
};
postPatch = ''
substituteInPlace pokemonsay.sh \
--replace \
'INSTALL_PATH=''${HOME}/.bin/pokemonsay' \
"" \
--replace \
'POKEMON_PATH=''${INSTALL_PATH}/pokemons' \
'POKEMON_PATH=${placeholder "out"}/share/pokemonsay' \
--replace \
'$(find ' \
'$(${findutils}/bin/find ' \
--replace \
'$(basename ' \
'$(${coreutils}/bin/basename ' \
--replace \
'cowsay -f ' \
'${cowsay}/bin/cowsay -f ' \
--replace \
'cowthink -f ' \
'${cowsay}/bin/cowthink -f '
substituteInPlace pokemonthink.sh \
--replace \
'./pokemonsay.sh' \
"${placeholder "out"}/bin/pokemonsay"
'';
installPhase = ''
mkdir -p $out/{bin,share/pokemonsay}
cp pokemonsay.sh $out/bin/pokemonsay
cp pokemonthink.sh $out/bin/pokemonthink
cp pokemons/*.cow $out/share/pokemonsay
'';
checkPhase = ''
$out/bin/pokemonsay --list-pokemon
'';
meta = with lib; {
description = "Print pokemon in the CLI! An adaptation of the classic cowsay";
homepage = "https://github.com/HRKings/pokemonsay-newgenerations";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ pbsds ];
};
}

View file

@ -30952,6 +30952,8 @@ with pkgs;
poke = callPackage ../applications/editors/poke { };
pokemonsay = callPackage ../tools/misc/pokemonsay { };
polar-bookshelf = callPackage ../applications/misc/polar-bookshelf { };
poezio = python3Packages.poezio;