about summary refs log tree commit diff
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2023-03-27 09:23:59 -0400
committerGitHub <noreply@github.com>2023-03-27 09:23:59 -0400
commit75138e08143072bfdce74de219e2aff81e5d0850 (patch)
tree53147f83664fe98ed278fcea9fe3ed8b2ab0c987
parenta1c45f32e6450f052525fec74b9db0154844c638 (diff)
parentae3ac99d579b4d881813e7c94542123efec95d7e (diff)
Merge pull request #222842 from meain/exhaustive
-rw-r--r--pkgs/development/tools/exhaustive/default.nix27
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/tools/exhaustive/default.nix b/pkgs/development/tools/exhaustive/default.nix
new file mode 100644
index 0000000000000..7445ae5236dbb
--- /dev/null
+++ b/pkgs/development/tools/exhaustive/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+}:
+
+buildGoModule rec {
+  pname = "exhaustive";
+  version = "0.10.0";
+
+  src = fetchFromGitHub {
+    owner = "nishanths";
+    repo = "exhaustive";
+    rev = "v${version}";
+    hash = "sha256-vMoFIyZcAdObeQD5bGcQHlGpJv/a8yl/2HUVc8aDiIA=";
+  };
+
+  vendorHash = "sha256-i3Cgefe4krvH99N233IeEWkVt9AhdzROkJ5JBeTIaAs=";
+
+  ldflags = [ "-s" "-w" ];
+
+  meta = with lib; {
+    description = "Check exhaustiveness of switch statements of enum-like constants in Go code";
+    homepage = "https://github.com/nishanths/exhaustive";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ meain ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f136e167c772f..4ca340f435faf 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -24748,6 +24748,8 @@ with pkgs;
 
   ejabberd = callPackage ../servers/xmpp/ejabberd { erlang = erlang_24; };
 
+  exhaustive = callPackage ../development/tools/exhaustive { };
+
   exhibitor = callPackage ../servers/exhibitor { };
 
   hyp = callPackage ../servers/http/hyp { };