about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/fzf-make/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/fzf-make/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/misc/fzf-make/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/fzf-make/default.nix b/nixpkgs/pkgs/development/tools/misc/fzf-make/default.nix
new file mode 100644
index 000000000000..0ea3e9505e6a
--- /dev/null
+++ b/nixpkgs/pkgs/development/tools/misc/fzf-make/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, makeBinaryWrapper
+, runtimeShell
+, bat
+, gnugrep
+, gnumake
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "fzf-make";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "kyu08";
+    repo = "fzf-make";
+    rev = "v${version}";
+    hash = "sha256-VDPkucvp12pdnJkUxSTfU73X9CMvP/UU1ypBnN0Jp80=";
+  };
+
+  cargoHash = "sha256-mLbGV0hj571SiM1ZPiHnADYYICgP8ZfgnMTjo2npIgk=";
+
+  nativeBuildInputs = [
+    makeBinaryWrapper
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/fzf-make \
+      --set SHELL ${runtimeShell} \
+      --suffix PATH : ${lib.makeBinPath [ bat gnugrep gnumake ]}
+  '';
+
+  meta = with lib; {
+    description = "Fuzzy finder for Makefile";
+    homepage = "https://github.com/kyu08/fzf-make";
+    changelog = "https://github.com/kyu08/fzf-make/releases/tag/${src.rev}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ figsoda sigmanificient ];
+    mainProgram = "fzf-make";
+  };
+}