nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

nav: 1.2.1 -> 1.3.1

+20 -12
+9 -12
pkgs/by-name/na/nav/package.nix
··· 1 1 { 2 2 stdenv, 3 3 lib, 4 - fetchzip, 5 - nix-update-script, 4 + fetchurl, 6 5 autoPatchelfHook, 7 6 libxcrypt-legacy, 8 7 }: 9 8 10 - let 11 - system = stdenv.hostPlatform.parsed.cpu.name; 12 - platform = "${system}-unknown-linux-gnu"; 13 - in 14 9 stdenv.mkDerivation rec { 15 10 pname = "nav"; 16 - version = "1.2.1"; 11 + version = "1.3.1"; 17 12 18 - src = fetchzip { 19 - url = "https://github.com/Jojo4GH/nav/releases/download/v${version}/nav-${platform}.tar.gz"; 13 + src = fetchurl { 14 + url = "https://github.com/Jojo4GH/nav/releases/download/v${version}/nav-${stdenv.hostPlatform.parsed.cpu.name}-unknown-linux-gnu.tar.gz"; 20 15 sha256 = 21 16 { 22 - x86_64-linux = "sha256-ihn5wlagmujHlSfJpgojQNqa4NjLF1wk2pt8wHi60DY="; 23 - aarch64-linux = "sha256-l3rKu3OU/TUUjmx3p06k9V5eN3ZDNcxbxObLqVQ2B7U="; 17 + x86_64-linux = "sha256-T/gmQVetPoW+veVmQBHnv56UetiMUXUoJU7f2t9yMVE="; 18 + aarch64-linux = "sha256-ueEeaiUGx+ZbTywNrCMEIZl1zNxhfmZQuN/GkYpiC1Q="; 24 19 } 25 20 .${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); 26 21 }; 22 + 23 + sourceRoot = "."; 27 24 28 25 nativeBuildInputs = [ autoPatchelfHook ]; 29 26 buildInputs = [ ··· 37 40 runHook postInstall 38 41 ''; 39 42 40 - passthru.updateScript = nix-update-script { }; 43 + passthru.updateScript = ./update.sh; 41 44 42 45 meta = { 43 46 description = "Interactive and stylish replacement for ls & cd";
+11
pkgs/by-name/na/nav/update.sh
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p curl jq common-updater-scripts 3 + set -eou pipefail 4 + 5 + version=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sfL "https://api.github.com/repos/Jojo4GH/nav/releases/latest" | jq -r .tag_name | sed 's/v//') 6 + 7 + for cpu in "x86_64" "aarch64"; do 8 + 9 + hash=$(nix-hash --type sha256 --to-sri $(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sfL "https://github.com/Jojo4GH/nav/releases/download/v$version/nav-$cpu-unknown-linux-gnu.tar.gz.sha256")) 10 + update-source-version nav $version $hash --system=$cpu-linux --ignore-same-version 11 + done