2024-10-27 09:45:05 +00:00
|
|
|
{
|
|
|
|
callPackage,
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
nixos,
|
|
|
|
testers,
|
|
|
|
versionCheckHook,
|
|
|
|
hello,
|
2021-05-06 08:08:08 +00:00
|
|
|
}:
|
2004-11-05 20:54:19 +00:00
|
|
|
|
2021-12-23 19:54:57 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "hello";
|
2022-07-31 15:01:33 +00:00
|
|
|
version = "2.12.1";
|
2010-11-29 16:03:36 +00:00
|
|
|
|
2017-11-13 16:45:09 +00:00
|
|
|
src = fetchurl {
|
2022-02-09 11:35:35 +00:00
|
|
|
url = "mirror://gnu/hello/hello-${finalAttrs.version}.tar.gz";
|
2024-09-14 21:47:11 +00:00
|
|
|
hash = "sha256-jZkUKv2SV28wsM18tCqNxoCZmLxdYH2Idh9RLibH2yA=";
|
2008-06-17 14:19:59 +00:00
|
|
|
};
|
2010-02-05 14:13:25 +00:00
|
|
|
|
2024-09-21 12:34:44 +00:00
|
|
|
# The GNU Hello `configure` script detects how to link libiconv but fails to actually make use of that.
|
|
|
|
# Unfortunately, this cannot be a patch to `Makefile.am` because `autoreconfHook` causes a gettext
|
|
|
|
# infrastructure mismatch error when trying to build `hello`.
|
|
|
|
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
|
|
|
|
NIX_LDFLAGS = "-liconv";
|
|
|
|
};
|
|
|
|
|
2016-08-07 15:17:02 +00:00
|
|
|
doCheck = true;
|
2015-09-17 13:24:32 +00:00
|
|
|
|
2024-03-13 15:16:06 +00:00
|
|
|
doInstallCheck = true;
|
2024-06-18 06:41:18 +00:00
|
|
|
nativeInstallCheckInputs = [
|
|
|
|
versionCheckHook
|
|
|
|
];
|
2024-03-13 15:16:06 +00:00
|
|
|
|
|
|
|
# Give hello some install checks for testing purpose.
|
|
|
|
postInstallCheck = ''
|
|
|
|
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
|
|
|
|
'';
|
|
|
|
|
2021-06-12 23:10:46 +00:00
|
|
|
passthru.tests = {
|
2022-04-20 13:31:36 +00:00
|
|
|
version = testers.testVersion { package = hello; };
|
2021-06-12 23:10:46 +00:00
|
|
|
};
|
2021-05-06 08:08:08 +00:00
|
|
|
|
2022-03-15 11:22:16 +00:00
|
|
|
passthru.tests.run = callPackage ./test.nix { hello = finalAttrs.finalPackage; };
|
2021-04-20 11:46:53 +00:00
|
|
|
|
2024-10-27 09:45:30 +00:00
|
|
|
meta = {
|
2008-06-17 14:19:59 +00:00
|
|
|
description = "Program that produces a familiar, friendly greeting";
|
|
|
|
longDescription = ''
|
|
|
|
GNU Hello is a program that prints "Hello, world!" when you run it.
|
|
|
|
It is fully customizable.
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.gnu.org/software/hello/manual/";
|
2021-12-23 19:54:57 +00:00
|
|
|
changelog = "https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${finalAttrs.version}";
|
2024-10-27 09:45:30 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
maintainers = with lib.maintainers; [ stv0g ];
|
2023-09-16 10:55:12 +00:00
|
|
|
mainProgram = "hello";
|
2024-10-27 09:45:30 +00:00
|
|
|
platforms = lib.platforms.all;
|
2004-11-05 20:54:19 +00:00
|
|
|
};
|
2021-04-20 11:46:53 +00:00
|
|
|
})
|