nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6 nix-update-script,
7 pkgsCross,
8 versionCheckHook,
9}:
10
11buildGoModule (finalAttrs: {
12 pname = "moor";
13 version = "2.10.2";
14
15 src = fetchFromGitHub {
16 owner = "walles";
17 repo = "moor";
18 tag = "v${finalAttrs.version}";
19 hash = "sha256-DS2cfu/yX+ebCn7V3FQVN8ltCJcEMD+wIjlS+ENHP8w=";
20 };
21
22 vendorHash = "sha256-lz3cq2xL9byhLNbAwEvYOsP9WQsu0hqrWe2EDaLSeOQ=";
23
24 nativeBuildInputs = [ installShellFiles ];
25
26 ldflags = [
27 "-s"
28 "-w"
29 "-X"
30 "main.versionString=v${finalAttrs.version}"
31 ];
32
33 nativeInstallCheckInputs = [ versionCheckHook ];
34 doInstallCheck = true;
35
36 postInstall = ''
37 installManPage ./moor.1
38 '';
39
40 passthru = {
41 tests.cross-aarch64 = pkgsCross.aarch64-multiplatform.moor;
42 updateScript = nix-update-script { };
43 };
44
45 meta = {
46 description = "Nice-to-use pager for humans";
47 homepage = "https://github.com/walles/moor";
48 changelog = "https://github.com/walles/moor/releases/tag/v${finalAttrs.version}";
49 license = lib.licenses.bsd2WithViews;
50 mainProgram = "moor";
51 maintainers = with lib.maintainers; [
52 getchoo
53 zowoq
54 ];
55 };
56})