nixos-config/pkgs/navi/default.nix

37 lines
957 B
Nix
Raw Normal View History

2020-03-13 09:23:54 +01:00
{ rustPlatform, fetchFromGitHub, stdenv, fzf, makeWrapper, ... }:
rustPlatform.buildRustPackage rec {
2020-03-13 05:01:10 +01:00
name = "navi-${version}";
2020-03-13 09:23:54 +01:00
version = "2.0.8";
2020-03-13 05:01:10 +01:00
src = fetchFromGitHub {
owner = "denisidoro";
repo = "navi";
rev = "v${version}";
sha256 = "1kh4s7s595l95xirdb0fvgkdbig3zcfkdiqk8zdz9cfglzcm5192";
};
2020-03-13 09:23:54 +01:00
cargoSha256 = "18d3b9g2jxkgscx9186v5301y4y01wd00kcs14617fgjnv0lyz1g";
verifyCargoDeps = true;
postInstall = ''
mkdir -p $out/share/navi/
cp -r ./cheats $out/share/navi/
wrapProgram "$out/bin/navi" \
--suffix "PATH" : "${fzf}/bin" \
--suffix "NAVI_PATH" : "$out/share/navi/cheats"
'';
buildInputs = [ fzf 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;
platforms = platforms.linux;
maintainers = with maintainers; [ mrVanDalo ];
};
}
2020-03-13 09:23:54 +01:00