1 { lib, stdenv, perl, installShellFiles, fetchFromGitHub }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
9 repo = "rank-amateur-cowsay";
10 rev = "cowsay-${version}";
11 sha256 = "sha256-9jCaQ6Um6Nl9j0/urrMCRcsGeubRN3VWD3jDM/AshRg=";
14 buildInputs = [ perl ];
16 nativeBuildInputs = [ installShellFiles ];
18 # overriding buildPhase because we don't want to use the install.sh script
21 substituteInPlace cowsay --replace "%BANGPERL%" "!${perl}/bin/perl" \
22 --replace "%PREFIX%" "$out"
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/
38 outputs = [ "out" "man" ];
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 ];