python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / pokemonsay / default.nix
blobf61b93a874f225c26ddc051850e5f5eddb29796a
1 { lib
2 , stdenvNoCC
3 , fetchFromGitHub
4 , cowsay
5 , coreutils
6 , findutils
7 }:
9 stdenvNoCC.mkDerivation rec {
10   pname = "pokemonsay";
11   version = "unstable-2021-10-05";
13   src = fetchFromGitHub {
14     owner = "HRKings";
15     repo = "pokemonsay-newgenerations";
16     rev = "baccc6d2fe1897c48f60d82ff9c4d4c018f5b594";
17     hash = "sha256-IDTAZmOzkUg0kLUM0oWuVbi8EwE4sEpLWrNAtq/he+g=";
18   };
20   postPatch = ''
21     substituteInPlace pokemonsay.sh \
22       --replace \
23         'INSTALL_PATH=''${HOME}/.bin/pokemonsay' \
24         "" \
25       --replace \
26         'POKEMON_PATH=''${INSTALL_PATH}/pokemons' \
27         'POKEMON_PATH=${placeholder "out"}/share/pokemonsay' \
28       --replace \
29         '$(find ' \
30         '$(${findutils}/bin/find ' \
31       --replace \
32         '$(basename ' \
33         '$(${coreutils}/bin/basename ' \
34       --replace \
35         'cowsay -f ' \
36         '${cowsay}/bin/cowsay -f ' \
37       --replace \
38         'cowthink -f ' \
39         '${cowsay}/bin/cowthink -f '
41     substituteInPlace pokemonthink.sh \
42       --replace \
43         './pokemonsay.sh' \
44         "${placeholder "out"}/bin/pokemonsay"
45   '';
47   installPhase = ''
48     mkdir -p $out/{bin,share/pokemonsay}
49     cp pokemonsay.sh $out/bin/pokemonsay
50     cp pokemonthink.sh $out/bin/pokemonthink
51     cp pokemons/*.cow $out/share/pokemonsay
52   '';
54   checkPhase = ''
55     $out/bin/pokemonsay --list-pokemon
56   '';
58   meta = with lib; {
59     description = "Print pokemon in the CLI! An adaptation of the classic cowsay";
60     homepage = "https://github.com/HRKings/pokemonsay-newgenerations";
61     license = licenses.mit;
62     platforms = platforms.all;
63     maintainers = with maintainers; [ pbsds ];
64   };