nixpkgs/pkgs/tools/misc/adrgen/default.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

2021-12-30 21:47:52 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
2022-10-05 07:22:10 +00:00
, fetchpatch
, testers
2021-12-30 21:47:52 +00:00
, adrgen
}:
buildGoModule rec {
pname = "adrgen";
version = "0.4.0-beta";
src = fetchFromGitHub {
owner = "asiermarques";
repo = "adrgen";
rev = "v${version}";
2022-10-05 07:22:10 +00:00
hash = "sha256-2ZE/orsfwL59Io09c4yfXt2enVmpSM/QHlUMgyd9RYQ=";
2021-12-30 21:47:52 +00:00
};
2022-10-05 07:22:10 +00:00
patches = [
# https://github.com/asiermarques/adrgen/pull/14
(fetchpatch {
name = "update-x-sys-for-go-1.18-on-aarch64-darwin.patch";
url = "https://github.com/asiermarques/adrgen/commit/485dc383106467d1029ee6d92c9bcbc3c2281626.patch";
hash = "sha256-38ktHrRgW5ysQmafvFthNtkZ6nnM61z4yEA7wUGmWb4=";
})
];
vendorHash = "sha256-RXwwv3Q/kQ6FondpiUm5XZogAVK2aaVmKu4hfr+AnAM=";
2021-12-30 21:47:52 +00:00
passthru.tests.version = testers.testVersion {
2021-12-30 21:47:52 +00:00
package = adrgen;
command = "adrgen version";
version = "v${version}";
};
meta = with lib; {
homepage = "https://github.com/asiermarques/adrgen";
description = "A command-line tool for generating and managing Architecture Decision Records";
license = licenses.mit;
maintainers = [ maintainers.ivar ];
};
}