nixpkgs/pkgs/by-name/fz/fzf-make/package.nix
2024-08-03 01:20:45 +02:00

41 lines
955 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, makeBinaryWrapper
, runtimeShell
, bat
, gnugrep
, gnumake
}:
rustPlatform.buildRustPackage rec {
pname = "fzf-make";
version = "0.36.0";
src = fetchFromGitHub {
owner = "kyu08";
repo = "fzf-make";
rev = "v${version}";
hash = "sha256-IlPkJK4pYszrJ43HSTq9Xwpz3K9XnUpoF0Ry7ox85KE=";
};
cargoHash = "sha256-mMDPpiIWhGMl0a4v1msNfcQqmq5ziB+ppw7RxYNAPaI=";
nativeBuildInputs = [ makeBinaryWrapper ];
postInstall = ''
wrapProgram $out/bin/fzf-make \
--set SHELL ${runtimeShell} \
--suffix PATH : ${lib.makeBinPath [ bat gnugrep gnumake ]}
'';
meta = {
description = "Fuzzy finder for Makefile";
homepage = "https://github.com/kyu08/fzf-make";
changelog = "https://github.com/kyu08/fzf-make/releases/tag/${src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ figsoda sigmanificient ];
mainProgram = "fzf-make";
};
}