nixos-config/pkgs/navi/default.nix

37 lines
1 KiB
Nix
Raw Normal View History

2020-03-15 08:21:50 +01:00
{ rustPlatform, fetchFromGitHub, stdenv, fzf, makeWrapper }:
2020-03-13 09:23:54 +01:00
rustPlatform.buildRustPackage rec {
2020-03-15 08:21:50 +01:00
pname = "navi";
version = "48c2b64f7f184dc351d04d2fe2bda1b2313b8d79";
2020-03-13 09:23:54 +01:00
2020-03-13 05:01:10 +01:00
src = fetchFromGitHub {
owner = "denisidoro";
repo = "navi";
2020-03-13 21:22:30 +01:00
# rev = "v${version}";
rev = "${version}";
2020-03-15 08:21:50 +01:00
sha256 = "1y7mfai7a0hwzq7kw997w0jwjpzqr2wcfr66jxf60k2jpbf4bk8h";
2020-03-13 05:01:10 +01:00
};
2020-03-13 09:23:54 +01:00
cargoSha256 = "18d3b9g2jxkgscx9186v5301y4y01wd00kcs14617fgjnv0lyz1g";
verifyCargoDeps = true;
postInstall = ''
mkdir -p $out/share/navi/
2020-03-15 08:21:50 +01:00
mv cheats $out/share/navi/
mv shell $out/share/navi/
2020-03-13 09:23:54 +01:00
wrapProgram "$out/bin/navi" \
--suffix "PATH" : "${fzf}/bin" \
--suffix "NAVI_PATH" : "$out/share/navi/cheats"
'';
2020-03-15 08:21:50 +01:00
nativeBuildInputs = [ makeWrapper ];
2020-03-13 05:01:10 +01:00
meta = with stdenv.lib; {
description = "An interactive cheatsheet tool for the command-line";
homepage = "https://github.com/denisidoro/navi";
license = licenses.asl20;
2020-03-15 08:21:50 +01:00
platforms = platforms.unix;
2020-03-13 05:01:10 +01:00
maintainers = with maintainers; [ mrVanDalo ];
};
}