mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 10:53:52 +00:00
1c29673fcc
In 787af0f79f
I had to change ${go-modules} to $goModules to allow overrideAttrs to work;
However, env vars cannot contain -, so i had to change go-modules too.
This in turn broke nix-update because it uses the go-modules attr.
Instead of making nix-update more complicated, make go-modules naming match cargoDeps.
`fd --type f | xargs sd '\bgo-modules\b' 'goModules'`
and revert change to pkgs/applications/misc/dstask/default.nix
and pkgs/servers/http/dave/default.nix
and pkgs/os-specific/darwin/plistwatch/default.nix
release note added
36 lines
931 B
Nix
36 lines
931 B
Nix
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
buildGoModule rec {
|
|
pname = "alertmanager-bot";
|
|
version = "0.4.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "metalmatze";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "1hjfkksqb675gabzjc221b33h2m4s6qsanmkm382d3fyzqj71dh9";
|
|
};
|
|
|
|
vendorSha256 = null; #vendorSha256 = "";
|
|
|
|
postPatch = ''
|
|
sed "s;/templates/default.tmpl;$out/share&;" -i cmd/alertmanager-bot/main.go
|
|
'';
|
|
|
|
ldflags = [
|
|
"-s" "-w" "-X main.Version=v${version}" "-X main.Revision=${src.rev}"
|
|
];
|
|
|
|
postInstall = ''
|
|
install -Dm644 -t $out/share/templates $src/default.tmpl
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Bot for Prometheus' Alertmanager";
|
|
homepage = "https://github.com/metalmatze/alertmanager-bot";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ mmahut ];
|
|
broken = true; # vendor isn't reproducible with go > 1.17: nix-build -A $name.goModules --check
|
|
};
|
|
}
|