about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/networking/goodhosts/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/goodhosts/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/networking/goodhosts/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/networking/goodhosts/default.nix b/nixpkgs/pkgs/tools/networking/goodhosts/default.nix
new file mode 100644
index 000000000000..fe24c2c06fd3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/networking/goodhosts/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, testers
+}:
+
+buildGoModule rec {
+  pname = "goodhosts";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "goodhosts";
+    repo = "cli";
+    rev = "v${version}";
+    hash = "sha256-VXOMyYM4jS3gYxm3WiKw3uKeC535ppd9iHumPiupGbc=";
+  };
+
+  ldflags = [
+    "-s -w -X main.version=${version}"
+  ];
+
+  postInstall = ''
+    mv $out/bin/cli $out/bin/goodhosts
+  '';
+
+  vendorHash = "sha256-pL1z8cfnzcmX5iMVHQJGXYmzGuf8bp4Txbqoh5wSPWQ=";
+
+  meta = with lib; {
+    description = "A CLI tool for managing hostfiles";
+    license = licenses.mit;
+    homepage = "https://github.com/goodhosts/cli/tree/main";
+    maintainers = with maintainers; [ schinmai-akamai ];
+    mainProgram = "goodhosts";
+  };
+}