2023-01-08 22:32:18 +01:00
|
|
|
{ lib, stdenv, perl, fetchFromGitHub, fetchpatch, nix-update-script, testers, cowsay }:
|
2016-11-05 04:04:05 +01:00
|
|
|
|
2020-06-07 23:11:08 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "cowsay";
|
2023-01-08 22:32:18 +01:00
|
|
|
version = "3.7.0";
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
2016-11-05 04:04:05 +01:00
|
|
|
|
2021-05-25 17:29:37 +02:00
|
|
|
src = fetchFromGitHub {
|
2023-01-08 22:32:18 +01:00
|
|
|
owner = "cowsay-org";
|
|
|
|
repo = "cowsay";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-t1grmCPQhRgwS64RjEwkK61F2qxxMBKuv0/DzBTnL3s=";
|
2016-11-05 04:04:05 +01:00
|
|
|
};
|
|
|
|
|
2023-01-08 22:32:18 +01:00
|
|
|
patches = [
|
|
|
|
# Install cowthink as a symlink, not a copy
|
|
|
|
# See https://github.com/cowsay-org/cowsay/pull/18
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/cowsay-org/cowsay/commit/9e129fa0933cf1837672c97f5ae5ad4a1a10ec11.patch";
|
|
|
|
hash = "sha256-zAYEUAM5MkyMONAl5BXj8hBHRalQVAOdpxgiM+Ewmlw=";
|
|
|
|
})
|
|
|
|
];
|
2018-12-04 00:19:37 +01:00
|
|
|
|
2023-01-08 22:32:18 +01:00
|
|
|
buildInputs = [ perl ];
|
2021-05-25 17:29:37 +02:00
|
|
|
|
2023-01-08 22:32:18 +01:00
|
|
|
makeFlags = [
|
|
|
|
"prefix=${placeholder "out"}"
|
|
|
|
];
|
2016-11-05 04:04:05 +01:00
|
|
|
|
2023-01-08 22:32:18 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = cowsay;
|
|
|
|
command = "cowsay --version";
|
|
|
|
};
|
|
|
|
};
|
2021-05-25 17:29:37 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-11-05 04:04:05 +01:00
|
|
|
description = "A program which generates ASCII pictures of a cow with a message";
|
2023-01-08 22:32:18 +01:00
|
|
|
homepage = "https://cowsay.diamonds";
|
|
|
|
changelog = "https://github.com/cowsay-org/cowsay/releases/tag/v${version}";
|
2021-05-25 17:29:37 +02:00
|
|
|
license = licenses.gpl3Only;
|
2018-08-15 20:21:16 +02:00
|
|
|
platforms = platforms.all;
|
2023-01-08 22:32:22 +01:00
|
|
|
maintainers = with maintainers; [ rob anthonyroussel ];
|
2016-11-05 04:04:05 +01:00
|
|
|
};
|
|
|
|
}
|