1 { lib, stdenv, fetchurl, perl }:
3 stdenv.mkDerivation rec {
4 version = "3.03+dfsg2";
8 url = "http://http.debian.net/debian/pool/main/c/cowsay/cowsay_${version}.orig.tar.gz";
9 sha256 = "0ghqnkp8njc3wyqx4mlg0qv0v0pc996x2nbyhqhz66bbgmf9d29v";
12 buildInputs = [ perl ];
15 substituteInPlace cowsay --replace "%BANGPERL%" "!${perl}/bin/perl" \
16 --replace "%PREFIX%" "$out"
20 mkdir -p $out/{bin,man/man1,share/cows}
21 install -m755 cowsay $out/bin/cowsay
22 ln -s cowsay $out/bin/cowthink
23 install -m644 cowsay.1 $out/man/man1/cowsay.1
24 ln -s cowsay.1 $out/man/man1/cowthink.1
25 install -m644 cows/* -t $out/share/cows/
29 description = "A program which generates ASCII pictures of a cow with a message";
30 homepage = "https://en.wikipedia.org/wiki/Cowsay";
31 license = licenses.gpl1;
32 platforms = platforms.all;
33 maintainers = [ maintainers.rob ];