summary refs log tree commit diff
path: root/pkgs/tools/misc/didyoumean/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/didyoumean/default.nix')
-rw-r--r--pkgs/tools/misc/didyoumean/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/tools/misc/didyoumean/default.nix b/pkgs/tools/misc/didyoumean/default.nix
new file mode 100644
index 00000000000..cd7b8270a1a
--- /dev/null
+++ b/pkgs/tools/misc/didyoumean/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, stdenv
+, rustPlatform
+, fetchFromGitHub
+, libxcb
+# Darwin dependencies
+, AppKit
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "didyoumean";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "hisbaan";
+    repo = "didyoumean";
+    rev = "v${version}";
+    sha256 = "sha256-t2bmvz05vWIxQhC474q/9uky1kAQoFN8Z+qflw5Vj68=";
+  };
+
+  cargoSha256 = "sha256-4DbziI9enib4pm9/P4WEu15glIxtejaV2GCqbzuxxyw=";
+
+  buildInputs = lib.optional stdenv.isLinux [ libxcb ]
+    ++ lib.optionals stdenv.isDarwin [ AppKit ];
+
+  meta = with lib; {
+    description = "A CLI spelling corrector for when you're unsure";
+    homepage = "https://github.com/hisbaan/didyoumean";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ evanjs ];
+  };
+}