nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 pkg-config,
6 versionCheckHook,
7 nix-update-script,
8}:
9
10buildGoModule (finalAttrs: {
11 pname = "overpush";
12 version = "0.4.5";
13
14 src = fetchFromGitHub {
15 owner = "mrusme";
16 repo = "overpush";
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-6tSptrvlaljKMUawGD3Bk1LBwge/Awvvudpr+juuuQQ=";
19 };
20
21 vendorHash = "sha256-KUfGc4vFfw59mwqR840cbL4ubBH1i+sIniHU0CDCKTg=";
22
23 env.CGO_ENABLED = "0";
24
25 ldflags = [
26 "-s"
27 "-X main.version=${finalAttrs.version}"
28 ];
29
30 nativeBuildInputs = [
31 pkg-config
32 ];
33
34 nativeInstallCheckInputs = [
35 versionCheckHook
36 ];
37 versionCheckProgramArg = "--version";
38 doInstallCheck = true;
39
40 passthru = {
41 updateScript = nix-update-script { };
42 };
43
44 meta = {
45 description = "Self-hosted, drop-in replacement for Pushover that can use XMPP";
46 homepage = "https://github.com/mrusme/overpush";
47 changelog = "https://github.com/mrusme/overpush/releases/tag/v${finalAttrs.version}";
48 license = lib.licenses.gpl3Only;
49 maintainers = with lib.maintainers; [ liberodark ];
50 platforms = lib.platforms.linux;
51 mainProgram = "overpush";
52 };
53})