From 8d7184f6ae4fc1ee19a86724c98cf5a6dcd32d91 Mon Sep 17 00:00:00 2001 From: "Janik H." Date: Sun, 17 Dec 2023 10:40:43 +0100 Subject: [PATCH] ipam: init at 0.3.0-1 --- pkgs/by-name/ip/ipam/package.nix | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pkgs/by-name/ip/ipam/package.nix diff --git a/pkgs/by-name/ip/ipam/package.nix b/pkgs/by-name/ip/ipam/package.nix new file mode 100644 index 000000000000..ec54b78e6e9d --- /dev/null +++ b/pkgs/by-name/ip/ipam/package.nix @@ -0,0 +1,42 @@ +{ lib +, buildGoModule +, fetchFromGitea +, installShellFiles +}: + +buildGoModule rec { + pname = "ipam"; + version = "0.3.0-1"; + + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "lauralani"; + repo = "ipam"; + rev = "v${version}"; + hash = "sha256-6gOkBjXgaMMWFRXFTSBY9YaNPdMRyLl8wy7BT/5vHio="; + }; + + nativeBuildInputs = [ + installShellFiles + ]; + + vendorHash = "sha256-l8eeeYv41yUPQ1dyJY4Jo3uvULrc1B/buGlMxYSdhCA="; + + ldflags = [ "-s" "-w" ]; + + postInstall = '' + installShellCompletion --cmd ipam \ + --bash <($out/bin/ipam completion bash) \ + --fish <($out/bin/ipam completion fish) \ + --zsh <($out/bin/ipam completion zsh) + ''; + + meta = with lib; { + description = "A cli based IPAM written in Go with PowerDNS support"; + homepage = "https://ipam.lauka.net/"; + changelog = "https://codeberg.org/lauralani/ipam/releases/tag/v${version}"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ janik ]; + mainProgram = "ipam"; + }; +}