mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 07:05:13 +00:00
b68130fd2c
Extract 'version test' to a reusable test utility as discussed in https://github.com/NixOS/nixpkgs/pull/119636#issuecomment-826137021 and
35 lines
852 B
Nix
35 lines
852 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, testVersion
|
|
, hello
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "hello";
|
|
version = "2.10";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/hello/${pname}-${version}.tar.gz";
|
|
sha256 = "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i";
|
|
};
|
|
|
|
doCheck = true;
|
|
|
|
passthru.tests.version =
|
|
testVersion { package = hello; };
|
|
|
|
meta = with lib; {
|
|
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/";
|
|
changelog = "https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.eelco ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|