depot/third_party/nixpkgs/pkgs/by-name/co/cowsay/package.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

58 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";
};
})