add navi
This commit is contained in:
parent
3361da4c56
commit
4c396c1fbe
3 changed files with 27 additions and 4 deletions
|
@ -28,6 +28,8 @@ in {
|
|||
|
||||
fuji-cam-wifi-tool = callPackage ./fuji-cam { };
|
||||
|
||||
navi = callPackage ./navi { };
|
||||
|
||||
bitwig-studio3 = callPackage ./bitwig-studio/bitwig-studio3.nix { };
|
||||
|
||||
bitwig-studio = callPackage ./bitwig-studio/bitwig-studio-environment.nix { };
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{ stdenv, fetchFromGitHub, ... }:
|
||||
{ rustPlatform, fetchFromGitHub, stdenv, fzf, makeWrapper, ... }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.0.8";
|
||||
name = "navi-${version}";
|
||||
|
||||
version = "2.0.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "denisidoro";
|
||||
repo = "navi";
|
||||
|
@ -11,7 +13,17 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1kh4s7s595l95xirdb0fvgkdbig3zcfkdiqk8zdz9cfglzcm5192";
|
||||
};
|
||||
|
||||
buildInputs = [ ];
|
||||
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 ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "An interactive cheatsheet tool for the command-line";
|
||||
|
@ -21,3 +33,4 @@ stdenv.mkDerivation rec {
|
|||
maintainers = with maintainers; [ mrVanDalo ];
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -85,6 +85,14 @@ in {
|
|||
|
||||
duc
|
||||
|
||||
(pkgs.writers.writeBashBin "cheat" ''
|
||||
set -eu -o pipefail
|
||||
output=$( navi --print --path "$HOME/.cheats:${pkgs.navi}/share/navi/cheats" )
|
||||
echo "$output"
|
||||
${pkgs.bash}/bin/bash -c "$output"
|
||||
'')
|
||||
navi
|
||||
|
||||
memoryUsage
|
||||
|
||||
#gitlog2json
|
||||
|
|
Loading…
Reference in a new issue