python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / cowsay / default.nix
blob095c8bab48f58950735f1f3438391b3fbafcecfd
1 { lib, stdenv, perl, installShellFiles, fetchFromGitHub }:
3 stdenv.mkDerivation rec {
4   pname = "cowsay";
5   version = "3.04";
7   src = fetchFromGitHub {
8     owner = "tnalpgge";
9     repo = "rank-amateur-cowsay";
10     rev = "cowsay-${version}";
11     sha256 = "sha256-9jCaQ6Um6Nl9j0/urrMCRcsGeubRN3VWD3jDM/AshRg=";
12   };
14   buildInputs = [ perl ];
16   nativeBuildInputs = [ installShellFiles ];
18   # overriding buildPhase because we don't want to use the install.sh script
19   buildPhase = ''
20     runHook preBuild;
21     substituteInPlace cowsay --replace "%BANGPERL%" "!${perl}/bin/perl" \
22       --replace "%PREFIX%" "$out"
23     runHook postBuild;
24   '';
26   installPhase = ''
27     runHook preInstall
28     install -Dm755 cowsay $out/bin/cowsay
29     ln -s $out/bin/cowsay $out/bin/cowthink
31     installManPage cowsay.1
32     ln -s $man/share/man/man1/cowsay.1.gz $man/share/man/man1/cowthink.1.gz
34     install -Dm644 cows/* -t $out/share/cows/
35     runHook postInstall
36   '';
38   outputs = [ "out" "man" ];
40   meta = with lib; {
41     description = "A program which generates ASCII pictures of a cow with a message";
42     homepage = "https://github.com/tnalpgge/rank-amateur-cowsay";
43     license = licenses.gpl3Only;
44     platforms = platforms.all;
45     maintainers = [ maintainers.rob ];
46   };