Skip to content

Commit 914c4f2

Browse files
committed
radicle-tui: use fetchFromRadicle
1 parent 1ddbbb1 commit 914c4f2

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

pkgs/by-name/ra/radicle-tui/package.nix

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
lib,
33
rustPlatform,
4-
fetchgit,
4+
fetchFromRadicle,
55
stdenv,
66
libiconv,
77
zlib,
@@ -13,9 +13,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
1313
pname = "radicle-tui";
1414
version = "0.6.0";
1515

16-
src = fetchgit {
17-
url = "https://seed.radicle.xyz/z39mP9rQAaGmERfUMPULfPUi473tY.git";
18-
rev = "refs/namespaces/z6MkswQE8gwZw924amKatxnNCXA55BMupMmRg7LvJuim2C1V/refs/tags/${finalAttrs.version}";
16+
src = fetchFromRadicle {
17+
seed = "seed.radicle.xyz";
18+
repo = "z39mP9rQAaGmERfUMPULfPUi473tY";
19+
node = "z6MkswQE8gwZw924amKatxnNCXA55BMupMmRg7LvJuim2C1V";
20+
tag = finalAttrs.version;
1921
hash = "sha256-rz9l9GtycqZoROUI6Hn0Fv5Br0YCIrcHlEWLMP4hasQ=";
2022
leaveDotGit = true;
2123
postFetch = ''

pkgs/by-name/ra/radicle-tui/update.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@ set -euo pipefail
66
dirname="$(dirname "${BASH_SOURCE[0]}")"
77

88
url=$(nix-instantiate --eval --raw -A radicle-tui.src.url)
9-
old_ref=$(nix-instantiate --eval --raw -A radicle-tui.src.rev)
10-
new_ref=$(git ls-remote "$url" 'refs/namespaces/*/refs/tags/*' | cut -f2 | tail -1)
9+
old_node=$(nix-instantiate --eval --raw -A radicle-tui.src.node)
1110

12-
[[ "$old_ref" =~ ^refs/namespaces/([^/]+)/refs/tags/([^/]+)$ ]]
13-
old_node="${BASH_REMATCH[1]}"
14-
15-
[[ "$new_ref" =~ ^refs/namespaces/([^/]+)/refs/tags/([^/]+)$ ]]
11+
ref=$(git ls-remote "$url" 'refs/namespaces/*/refs/tags/*' | cut -f2 | tail -1)
12+
[[ "$ref" =~ ^refs/namespaces/([^/]+)/refs/tags/([^/]+)$ ]]
1613
new_node="${BASH_REMATCH[1]}"
1714
version="${BASH_REMATCH[2]}"
1815

0 commit comments

Comments
 (0)