mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-06 13:53:05 +00:00
59 lines
1.2 KiB
Nix
59 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
nix-update-script,
|
|
perl,
|
|
stdenv,
|
|
testers,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "cowsay";
|
|
version = "3.8.3";
|
|
|
|
outputs = [
|
|
"out"
|
|
"man"
|
|
];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cowsay-org";
|
|
repo = "cowsay";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-Bca+/a9jXsNnuBeYEjjtvZ1LsMMraLKiCn04CiS+uXU=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ perl ];
|
|
|
|
makeFlags = [ "prefix=${placeholder "out"}" ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/cowsay \
|
|
--suffix COWPATH : $out/share/cowsay/cows
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
tests.version = testers.testVersion {
|
|
package = finalAttrs.finalPackage;
|
|
command = "cowsay --version";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Program which generates ASCII pictures of a cow with a message";
|
|
homepage = "https://cowsay.diamonds";
|
|
changelog = "https://github.com/cowsay-org/cowsay/releases/tag/v${finalAttrs.version}";
|
|
license = licenses.gpl3Only;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [
|
|
rob
|
|
anthonyroussel
|
|
];
|
|
mainProgram = "cowsay";
|
|
};
|
|
})
|