mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-24 05:00:19 +00:00
Merge pull request #124394 from legendofmiracles/cowsay-cleanup
cowsay: 3.03+dfsg2 -> 3.0.4
This commit is contained in:
commit
9b7fb215d4
@ -1,34 +1,46 @@
|
||||
{ lib, stdenv, fetchurl, perl }:
|
||||
{ lib, stdenv, perl, installShellFiles, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.03+dfsg2";
|
||||
pname = "cowsay";
|
||||
version = "3.04";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://http.debian.net/debian/pool/main/c/cowsay/cowsay_${version}.orig.tar.gz";
|
||||
sha256 = "0ghqnkp8njc3wyqx4mlg0qv0v0pc996x2nbyhqhz66bbgmf9d29v";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tnalpgge";
|
||||
repo = "rank-amateur-cowsay";
|
||||
rev = "cowsay-${version}";
|
||||
sha256 = "sha256-9jCaQ6Um6Nl9j0/urrMCRcsGeubRN3VWD3jDM/AshRg=";
|
||||
};
|
||||
|
||||
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" \
|
||||
--replace "%PREFIX%" "$out"
|
||||
runHook postBuild;
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,man/man1,share/cows}
|
||||
install -m755 cowsay $out/bin/cowsay
|
||||
ln -s cowsay $out/bin/cowthink
|
||||
install -m644 cowsay.1 $out/man/man1/cowsay.1
|
||||
ln -s cowsay.1 $out/man/man1/cowthink.1
|
||||
install -m644 cows/* -t $out/share/cows/
|
||||
runHook preInstall
|
||||
install -Dm755 cowsay $out/bin/cowsay
|
||||
ln -s $out/bin/cowsay $out/bin/cowthink
|
||||
|
||||
installManPage cowsay.1
|
||||
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; {
|
||||
description = "A program which generates ASCII pictures of a cow with a message";
|
||||
homepage = "https://en.wikipedia.org/wiki/Cowsay";
|
||||
license = licenses.gpl1;
|
||||
homepage = "https://github.com/tnalpgge/rank-amateur-cowsay";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.rob ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user