2022-04-27 09:35:20 +00:00
|
|
|
{ callPackage
|
|
|
|
, lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2022-01-13 20:06:32 +00:00
|
|
|
, nixos
|
2022-04-27 09:35:20 +00:00
|
|
|
, testers
|
2021-05-20 23:08:51 +00:00
|
|
|
, hello
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "hello";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.12.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-04-27 09:35:20 +00:00
|
|
|
url = "mirror://gnu/hello/hello-${finalAttrs.version}.tar.gz";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-jZkUKv2SV28wsM18tCqNxoCZmLxdYH2Idh9RLibH2yA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
# Give hello some install checks for testing purpose.
|
|
|
|
postInstallCheck = ''
|
|
|
|
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
|
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
passthru.tests = {
|
2022-04-27 09:35:20 +00:00
|
|
|
version = testers.testVersion { package = hello; };
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
invariant-under-noXlibs =
|
2022-04-27 09:35:20 +00:00
|
|
|
testers.testEqualDerivation
|
2022-01-13 20:06:32 +00:00
|
|
|
"hello must not be rebuilt when environment.noXlibs is set."
|
|
|
|
hello
|
|
|
|
(nixos { environment.noXlibs = true; }).pkgs.hello;
|
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests.run = callPackage ./test.nix { hello = finalAttrs.finalPackage; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A 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.
|
|
|
|
'';
|
|
|
|
homepage = "https://www.gnu.org/software/hello/manual/";
|
2022-04-27 09:35:20 +00:00
|
|
|
changelog = "https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${finalAttrs.version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.eelco ];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "hello";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2022-04-27 09:35:20 +00:00
|
|
|
})
|