Files
nixpkgs/pkgs/by-name/na/nav/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

60 lines
1.5 KiB
Nix

{
stdenv,
lib,
fetchurl,
autoPatchelfHook,
libxcrypt-legacy,
}:
stdenv.mkDerivation rec {
pname = "nav";
version = "1.4.5";
src = fetchurl {
url = "https://github.com/Jojo4GH/nav/releases/download/v${version}/nav-${stdenv.hostPlatform.parsed.cpu.name}-unknown-linux-gnu.tar.gz";
sha256 =
{
x86_64-linux = "sha256-N0C2rLKMNIgheNTjTStWOYliNuMKPPoxqtLAQSVV14Y=";
aarch64-linux = "sha256-kl+CtXXmgF9gU5auFIDCV2BOZFWh05XfE8OtbDBnrs0=";
}
.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
};
sourceRoot = ".";
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
stdenv.cc.cc.lib
libxcrypt-legacy
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp nav $out/bin
runHook postInstall
'';
passthru.updateScript = ./update.sh;
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";
};
}