tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
0
fork
atom
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
0
fork
atom
overview
issues
pulls
pipelines
nav: 1.2.1 -> 1.3.1
David E. C. Kopczynski
11 months ago
aa73a976
d1517968
+20
-12
2 changed files
expand all
collapse all
unified
split
pkgs
by-name
na
nav
package.nix
update.sh
+9
-12
pkgs/by-name/na/nav/package.nix
reviewed
···
1
1
{
2
2
stdenv,
3
3
lib,
4
4
-
fetchzip,
5
5
-
nix-update-script,
4
4
+
fetchurl,
6
5
autoPatchelfHook,
7
6
libxcrypt-legacy,
8
7
}:
9
8
10
10
-
let
11
11
-
system = stdenv.hostPlatform.parsed.cpu.name;
12
12
-
platform = "${system}-unknown-linux-gnu";
13
13
-
in
14
9
stdenv.mkDerivation rec {
15
10
pname = "nav";
16
16
-
version = "1.2.1";
11
11
+
version = "1.3.1";
17
12
18
18
-
src = fetchzip {
19
19
-
url = "https://github.com/Jojo4GH/nav/releases/download/v${version}/nav-${platform}.tar.gz";
13
13
+
src = fetchurl {
14
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
22
-
x86_64-linux = "sha256-ihn5wlagmujHlSfJpgojQNqa4NjLF1wk2pt8wHi60DY=";
23
23
-
aarch64-linux = "sha256-l3rKu3OU/TUUjmx3p06k9V5eN3ZDNcxbxObLqVQ2B7U=";
17
17
+
x86_64-linux = "sha256-T/gmQVetPoW+veVmQBHnv56UetiMUXUoJU7f2t9yMVE=";
18
18
+
aarch64-linux = "sha256-ueEeaiUGx+ZbTywNrCMEIZl1zNxhfmZQuN/GkYpiC1Q=";
24
19
}
25
20
.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
26
21
};
22
22
+
23
23
+
sourceRoot = ".";
27
24
28
25
nativeBuildInputs = [ autoPatchelfHook ];
29
26
buildInputs = [
···
37
40
runHook postInstall
38
41
'';
39
42
40
40
-
passthru.updateScript = nix-update-script { };
43
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
reviewed
···
1
1
+
#!/usr/bin/env nix-shell
2
2
+
#!nix-shell -i bash -p curl jq common-updater-scripts
3
3
+
set -eou pipefail
4
4
+
5
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
6
+
7
7
+
for cpu in "x86_64" "aarch64"; do
8
8
+
9
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
10
+
update-source-version nav $version $hash --system=$cpu-linux --ignore-same-version
11
11
+
done