nixpkgs/pkgs/by-name/fz/fzf-make/package.nix
2024-06-25 23:01:08 +00:00

41 lines
957 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, makeBinaryWrapper
, runtimeShell
, bat
, gnugrep
, gnumake
}:
rustPlatform.buildRustPackage rec {
pname = "fzf-make";
version = "0.35.0";
src = fetchFromGitHub {
owner = "kyu08";
repo = "fzf-make";
rev = "v${version}";
hash = "sha256-hrPBuNCtwYOynv0JUcEq0lVZ9k3iVPNyn04l8zVbkN4=";
};
cargoHash = "sha256-O7rQp70ukw7LiC+m7rlqEGHVJw3Lo93WEmL3PFD7kBM=";
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";
};
}