Loading pkgs/by-name/na/nav/package.nix +9 −12 Original line number Diff line number Diff line { stdenv, lib, fetchzip, nix-update-script, fetchurl, 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"; version = "1.3.1"; src = fetchzip { url = "https://github.com/Jojo4GH/nav/releases/download/v${version}/nav-${platform}.tar.gz"; 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-ihn5wlagmujHlSfJpgojQNqa4NjLF1wk2pt8wHi60DY="; aarch64-linux = "sha256-l3rKu3OU/TUUjmx3p06k9V5eN3ZDNcxbxObLqVQ2B7U="; x86_64-linux = "sha256-T/gmQVetPoW+veVmQBHnv56UetiMUXUoJU7f2t9yMVE="; aarch64-linux = "sha256-ueEeaiUGx+ZbTywNrCMEIZl1zNxhfmZQuN/GkYpiC1Q="; } .${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); }; sourceRoot = "."; nativeBuildInputs = [ autoPatchelfHook ]; buildInputs = [ stdenv.cc.cc.lib Loading @@ -40,7 +37,7 @@ stdenv.mkDerivation rec { runHook postInstall ''; passthru.updateScript = nix-update-script { }; passthru.updateScript = ./update.sh; meta = { description = "Interactive and stylish replacement for ls & cd"; Loading pkgs/by-name/na/nav/update.sh 0 → 100755 +11 −0 Original line number Diff line number Diff line #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl jq common-updater-scripts set -eou pipefail version=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sfL "https://api.github.com/repos/Jojo4GH/nav/releases/latest" | jq -r .tag_name | sed 's/v//') for cpu in "x86_64" "aarch64"; do 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")) update-source-version nav $version $hash --system=$cpu-linux --ignore-same-version done Loading
pkgs/by-name/na/nav/package.nix +9 −12 Original line number Diff line number Diff line { stdenv, lib, fetchzip, nix-update-script, fetchurl, 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"; version = "1.3.1"; src = fetchzip { url = "https://github.com/Jojo4GH/nav/releases/download/v${version}/nav-${platform}.tar.gz"; 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-ihn5wlagmujHlSfJpgojQNqa4NjLF1wk2pt8wHi60DY="; aarch64-linux = "sha256-l3rKu3OU/TUUjmx3p06k9V5eN3ZDNcxbxObLqVQ2B7U="; x86_64-linux = "sha256-T/gmQVetPoW+veVmQBHnv56UetiMUXUoJU7f2t9yMVE="; aarch64-linux = "sha256-ueEeaiUGx+ZbTywNrCMEIZl1zNxhfmZQuN/GkYpiC1Q="; } .${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); }; sourceRoot = "."; nativeBuildInputs = [ autoPatchelfHook ]; buildInputs = [ stdenv.cc.cc.lib Loading @@ -40,7 +37,7 @@ stdenv.mkDerivation rec { runHook postInstall ''; passthru.updateScript = nix-update-script { }; passthru.updateScript = ./update.sh; meta = { description = "Interactive and stylish replacement for ls & cd"; Loading
pkgs/by-name/na/nav/update.sh 0 → 100755 +11 −0 Original line number Diff line number Diff line #!/usr/bin/env nix-shell #!nix-shell -i bash -p curl jq common-updater-scripts set -eou pipefail version=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sfL "https://api.github.com/repos/Jojo4GH/nav/releases/latest" | jq -r .tag_name | sed 's/v//') for cpu in "x86_64" "aarch64"; do 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")) update-source-version nav $version $hash --system=$cpu-linux --ignore-same-version done