hello-zmsun: init
output.overlays: list -> attr
This commit is contained in:
parent
46bd9be3c3
commit
02dc79ba3e
3 changed files with 68 additions and 4 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
outputs/
|
||||||
|
result
|
||||||
|
result-*
|
||||||
|
repl-result-*
|
||||||
|
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
outputs = { self, nixpkgs }: let
|
outputs = { self, nixpkgs }: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
myOverlay = import ./overlays/my-pkgs.nix;
|
myPkgs = import ./overlays/my-pkgs.nix;
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [ myOverlay ];
|
overlays = [ myPkgs ];
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
overlays = [ myOverlay ];
|
overlays = { inherit myPkgs; };
|
||||||
packages.${system} = pkgs;
|
packages.${system} = pkgs // { default = pkgs.hello-zmsun; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
60
pkgs/hello-zmsun/default.nix
Normal file
60
pkgs/hello-zmsun/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
{
|
||||||
|
callPackage,
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchurl,
|
||||||
|
nixos,
|
||||||
|
testers,
|
||||||
|
versionCheckHook,
|
||||||
|
hello,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "hello-zmsun";
|
||||||
|
version = "2.12.2";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://gnu/hello/hello-${finalAttrs.version}.tar.gz";
|
||||||
|
hash = "sha256-WpqZbcKSzCTc9BHO6H6S9qrluNE72caBm0x6nc4IGKs=";
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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";
|
||||||
|
};
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
nativeInstallCheckInputs = [
|
||||||
|
versionCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
# Give hello some install checks for testing purpose.
|
||||||
|
postInstallCheck = ''
|
||||||
|
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
version = testers.testVersion { package = hello; };
|
||||||
|
};
|
||||||
|
|
||||||
|
passthru.tests.run = callPackage ./test.nix { hello = finalAttrs.finalPackage; };
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
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.
|
||||||
|
'';
|
||||||
|
homepage = "https://www.gnu.org/software/hello/manual/";
|
||||||
|
changelog = "https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${finalAttrs.version}";
|
||||||
|
license = lib.licenses.gpl3Plus;
|
||||||
|
maintainers = with lib.maintainers; [ stv0g ];
|
||||||
|
mainProgram = "hello";
|
||||||
|
platforms = lib.platforms.all;
|
||||||
|
identifiers.cpeParts.vendor = "gnu";
|
||||||
|
};
|
||||||
|
})
|
||||||
Loading…
Add table
Add a link
Reference in a new issue