Skip to content

Commit

Permalink
nav: init at 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Kopczynski committed Nov 25, 2024
1 parent f640d05 commit b9ad375
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions pkgs/by-name/na/nav/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
stdenv,
lib,
fetchzip,
nix-update-script,
autoPatchelfHook,
libxcrypt-legacy,
}:

let
system = stdenv.hostPlatform.parsed.cpu.name;
platform = "${system}-unknown-linux-gnu";
in
stdenv.mkDerivation rec {
pname = "nav";
version = "1.2.1";

src = fetchzip {
url = "https://github.com/Jojo4GH/nav/releases/download/v${version}/nav-${platform}.tar.gz";
sha256 =
{
x86_64-linux = "sha256-ihn5wlagmujHlSfJpgojQNqa4NjLF1wk2pt8wHi60DY=";
aarch64-linux = "sha256-l3rKu3OU/TUUjmx3p06k9V5eN3ZDNcxbxObLqVQ2B7U=";
}
.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
};

nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
stdenv.cc.cc.lib
libxcrypt-legacy
];

installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp nav $out/bin
runHook postInstall
'';

passthru.updateScript = nix-update-script { };

meta = {
description = "Interactive and stylish replacement for ls & cd";
longDescription = ''
To make use of nav, add the following lines to your configuration:
`programs.bash.shellInit = "eval \"$(nav --init bash)\"";` and
`programs.zsh.shellInit = "eval \"$(nav --init zsh)\"";`
'';
homepage = "https://github.com/Jojo4GH/nav";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
David-Kopczynski
Jojo4GH
];
platforms = lib.platforms.linux;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
mainProgram = "nav";
};
}

0 comments on commit b9ad375

Please sign in to comment.