nixos-config/pkgs/navi/default.nix

36 lines
963 B
Nix
Raw Normal View History

2020-03-16 08:24:16 +01:00
{ rustPlatform, fetchFromGitHub, stdenv, fzf, makeWrapper, openssl, pkgconfig }:
2020-03-13 09:23:54 +01:00
rustPlatform.buildRustPackage rec {
2020-03-15 08:21:50 +01:00
pname = "navi";
2020-03-16 08:24:16 +01:00
version = "2.1.1";
2020-03-13 09:23:54 +01:00
2020-03-13 05:01:10 +01:00
src = fetchFromGitHub {
owner = "denisidoro";
repo = "navi";
2020-03-16 08:24:16 +01:00
rev = "v${version}";
#rev = "${version}";
sha256 = "1195f7c3ij2mkv0k1h9fwn6jkyjb01w0p6mj2xc39w5f6i0c0hwp";
2020-03-13 05:01:10 +01:00
};
2020-03-16 08:24:16 +01:00
cargoSha256 = "0ks25w0dncaiw3ma05r8jrng3cczancrynnpgdksbvgz49lg3wjw";
2020-03-13 09:23:54 +01:00
verifyCargoDeps = true;
postInstall = ''
mkdir -p $out/share/navi/
2020-03-15 08:21:50 +01:00
mv shell $out/share/navi/
2020-03-13 09:23:54 +01:00
wrapProgram "$out/bin/navi" \
2020-03-16 08:24:16 +01:00
--suffix "PATH" : "${fzf}/bin"
2020-03-13 09:23:54 +01:00
'';
2020-03-16 08:24:16 +01:00
buildInputs = [ openssl ];
nativeBuildInputs = [ makeWrapper pkgconfig ];
2020-03-15 08:21:50 +01:00
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 ];
};
}