File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ stdenv ,
3+ lib ,
4+ fetchzip ,
5+ nix-update-script ,
6+ autoPatchelfHook ,
7+ libxcrypt-legacy ,
8+ } :
9+
10+ let
11+ system = stdenv . hostPlatform . parsed . cpu . name ;
12+ platform = "${ system } -unknown-linux-gnu" ;
13+ in
14+ stdenv . mkDerivation rec {
15+ pname = "nav" ;
16+ version = "1.2.1" ;
17+
18+ src = fetchzip {
19+ url = "https://github.com/Jojo4GH/nav/releases/download/v${ version } /nav-${ platform } .tar.gz" ;
20+ sha256 =
21+ {
22+ x86_64-linux = "sha256-ihn5wlagmujHlSfJpgojQNqa4NjLF1wk2pt8wHi60DY=" ;
23+ aarch64-linux = "sha256-l3rKu3OU/TUUjmx3p06k9V5eN3ZDNcxbxObLqVQ2B7U=" ;
24+ }
25+ . ${ stdenv . hostPlatform . system } or ( throw "unsupported system ${ stdenv . hostPlatform . system } " ) ;
26+ } ;
27+
28+ nativeBuildInputs = [ autoPatchelfHook ] ;
29+ buildInputs = [
30+ stdenv . cc . cc . lib
31+ libxcrypt-legacy
32+ ] ;
33+
34+ installPhase = ''
35+ runHook preInstall
36+
37+ mkdir -p $out/bin
38+ cp nav $out/bin
39+
40+ runHook postInstall
41+ '' ;
42+
43+ passthru . updateScript = nix-update-script { } ;
44+
45+ meta = {
46+ description = "Interactive and stylish replacement for ls & cd" ;
47+ longDescription = ''
48+ To make use of nav, add the following lines to your configuration:
49+ `programs.bash.shellInit = "eval \"$(nav --init bash)\"";` and
50+ `programs.zsh.shellInit = "eval \"$(nav --init zsh)\"";`
51+ '' ;
52+ homepage = "https://github.com/Jojo4GH/nav" ;
53+ license = lib . licenses . mit ;
54+ maintainers = with lib . maintainers ; [
55+ David-Kopczynski
56+ Jojo4GH
57+ ] ;
58+ platforms = lib . platforms . linux ;
59+ sourceProvenance = [ lib . sourceTypes . binaryNativeCode ] ;
60+ mainProgram = "nav" ;
61+ } ;
62+ }
You can’t perform that action at this time.
0 commit comments