cowsay: 3.03+dfsg2 -> 3.0.
This commit is contained in:
parent
15a4732733
commit
472dad9d2e
|
@ -1,34 +1,46 @@
|
||||||
{ lib, stdenv, fetchurl, perl }:
|
{ lib, stdenv, perl, installShellFiles, fetchFromGitHub }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "3.03+dfsg2";
|
|
||||||
pname = "cowsay";
|
pname = "cowsay";
|
||||||
|
version = "3.04";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "http://http.debian.net/debian/pool/main/c/cowsay/cowsay_${version}.orig.tar.gz";
|
owner = "tnalpgge";
|
||||||
sha256 = "0ghqnkp8njc3wyqx4mlg0qv0v0pc996x2nbyhqhz66bbgmf9d29v";
|
repo = "rank-amateur-cowsay";
|
||||||
|
rev = "cowsay-${version}";
|
||||||
|
sha256 = "sha256-9jCaQ6Um6Nl9j0/urrMCRcsGeubRN3VWD3jDM/AshRg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ perl ];
|
buildInputs = [ perl ];
|
||||||
|
|
||||||
postBuild = ''
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
|
# overriding buildPhase because we don't want to use the install.sh script
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild;
|
||||||
substituteInPlace cowsay --replace "%BANGPERL%" "!${perl}/bin/perl" \
|
substituteInPlace cowsay --replace "%BANGPERL%" "!${perl}/bin/perl" \
|
||||||
--replace "%PREFIX%" "$out"
|
--replace "%PREFIX%" "$out"
|
||||||
|
runHook postBuild;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{bin,man/man1,share/cows}
|
runHook preInstall
|
||||||
install -m755 cowsay $out/bin/cowsay
|
install -Dm755 cowsay $out/bin/cowsay
|
||||||
ln -s cowsay $out/bin/cowthink
|
ln -s $out/bin/cowsay $out/bin/cowthink
|
||||||
install -m644 cowsay.1 $out/man/man1/cowsay.1
|
|
||||||
ln -s cowsay.1 $out/man/man1/cowthink.1
|
installManPage cowsay.1
|
||||||
install -m644 cows/* -t $out/share/cows/
|
ln -s $man/share/man/man1/cowsay.1.gz $man/share/man/man1/cowthink.1.gz
|
||||||
|
|
||||||
|
install -Dm644 cows/* -t $out/share/cows/
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
outputs = [ "out" "man" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A program which generates ASCII pictures of a cow with a message";
|
description = "A program which generates ASCII pictures of a cow with a message";
|
||||||
homepage = "https://en.wikipedia.org/wiki/Cowsay";
|
homepage = "https://github.com/tnalpgge/rank-amateur-cowsay";
|
||||||
license = licenses.gpl1;
|
license = licenses.gpl3Only;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = [ maintainers.rob ];
|
maintainers = [ maintainers.rob ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue