1 diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix
2 index c8163caf8ea..5b313a3a4e9 100644
3 --- a/pkgs/applications/version-management/sourcehut/builds.nix
4 +++ b/pkgs/applications/version-management/sourcehut/builds.nix
10 + version = "0.70.12";
12 buildWorker = src: buildGoModule {
14 pname = "builds-sr-ht-worker";
16 - vendorSha256 = "sha256-giOaldV46aBqXyFH/cQVsbUr6Rb4VMhbBO86o48tRZY=";
17 + vendorSha256 = "sha256-ZEarWM/33t+pNXUEIpfd/DkBkhu3UUg17Hh8XXWOepA=";
20 buildPythonPackage rec {
21 @@ -28,7 +28,7 @@ buildPythonPackage rec {
23 repo = "builds.sr.ht";
25 - sha256 = "sha256-2MLs/DOXHjEYarXDVUcPZe3o0fmZbzVxn528SE72lhM=";
26 + sha256 = "sha256-k5BOb48WVOhBVKRLZeSGNePclvl9cjjJPIEt6pU7M3I=";
29 nativeBuildInputs = srht.nativeBuildInputs;
30 diff --git a/pkgs/applications/version-management/sourcehut/core.nix b/pkgs/applications/version-management/sourcehut/core.nix
31 index d359d524eb2..2d9a18bb233 100644
32 --- a/pkgs/applications/version-management/sourcehut/core.nix
33 +++ b/pkgs/applications/version-management/sourcehut/core.nix
36 buildPythonPackage rec {
39 + version = "0.67.14";
42 url = "https://git.sr.ht/~sircmpwn/core.sr.ht";
44 - sha256 = "sha256-XvzFfcBK5Mq8p7xEBAF/eupUE1kkUBh5k+ByM/WA9bc=";
45 + sha256 = "sha256-u98Se7QvZF2Xi6LcGHZ3ixLv2pJLYHufP2G4FtDppJc=";
46 fetchSubmodules = true;
49 diff --git a/pkgs/applications/version-management/sourcehut/dispatch.nix b/pkgs/applications/version-management/sourcehut/dispatch.nix
50 index 637c6f9c1df..af2ea1e9a4f 100644
51 --- a/pkgs/applications/version-management/sourcehut/dispatch.nix
52 +++ b/pkgs/applications/version-management/sourcehut/dispatch.nix
55 buildPythonPackage rec {
56 pname = "dispatchsrht";
58 + version = "0.15.32";
60 src = fetchFromSourcehut {
62 repo = "dispatch.sr.ht";
64 - sha256 = "sha256-zWCGPjIgMKHXHJUs9aciV7IFgo0rpahon6KXHDwcfss=";
65 + sha256 = "sha256-4P4cXhjcZ8IBzpRfmYIJkzl9U4Plo36a48Pf/KjmhFY=";
68 nativeBuildInputs = srht.nativeBuildInputs;
69 diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix
70 index e44fb9cd6c6..cbbc420123f 100644
71 --- a/pkgs/applications/version-management/sourcehut/git.nix
72 +++ b/pkgs/applications/version-management/sourcehut/git.nix
78 + version = "0.72.43";
80 src = fetchFromSourcehut {
84 - sha256 = "sha256-AB2uzajO5PtcpJfbOOTfuDFM6is5K39v3AZJ1hShRNc=";
85 + sha256 = "sha256-mb/zFHekLhAH5cpkB7dfTRDATWvgZKVcxdwiA4SntnU=";
88 buildShell = src: buildGoModule {
89 diff --git a/pkgs/applications/version-management/sourcehut/hg.nix b/pkgs/applications/version-management/sourcehut/hg.nix
90 index cddb76cabf2..a7317980134 100644
91 --- a/pkgs/applications/version-management/sourcehut/hg.nix
92 +++ b/pkgs/applications/version-management/sourcehut/hg.nix
95 buildPythonPackage rec {
101 url = "https://hg.sr.ht/~sircmpwn/hg.sr.ht";
103 - sha256 = "1c0qfi0gmbfngvds6917fy9ii2iglawn429757rh7b4bvzn7n6mr";
104 + sha256 = "ibijvKjS4CiWTYrO6Qdh3RkD0EUE7BY8wjdPwrD6vkA=";
107 nativeBuildInputs = srht.nativeBuildInputs;
108 diff --git a/pkgs/applications/version-management/sourcehut/hub.nix b/pkgs/applications/version-management/sourcehut/hub.nix
109 index 17cb3fe4b61..ff5ffcca38a 100644
110 --- a/pkgs/applications/version-management/sourcehut/hub.nix
111 +++ b/pkgs/applications/version-management/sourcehut/hub.nix
114 buildPythonPackage rec {
116 - version = "0.13.1";
117 + version = "0.13.5";
119 src = fetchFromSourcehut {
123 - sha256 = "sha256-Kqzy4mh5Nn1emzHBco/LVuXro/tW3NX+OYqdEwBSQ/U=";
124 + sha256 = "sha256-hCsHwKCnXOdUnJuklb0C7+yq2JduswMjaYGWmNS6rkc=";
127 nativeBuildInputs = srht.nativeBuildInputs;
128 diff --git a/pkgs/applications/version-management/sourcehut/lists.nix b/pkgs/applications/version-management/sourcehut/lists.nix
129 index b419b49f7b5..7f616fda834 100644
130 --- a/pkgs/applications/version-management/sourcehut/lists.nix
131 +++ b/pkgs/applications/version-management/sourcehut/lists.nix
134 buildPythonPackage rec {
136 - version = "0.48.19";
137 + version = "0.49.1";
139 src = fetchFromSourcehut {
141 repo = "lists.sr.ht";
143 - sha256 = "sha256-bsakEMyvWaxiE4/SGcAP4mlGG9jkdHfFxpt9H+TJn/8=";
144 + sha256 = "sha256-3YTn705lPFGHww/xUVXc7c8OkVq02usPbdoikMA34IQ=";
147 nativeBuildInputs = srht.nativeBuildInputs;
148 diff --git a/pkgs/applications/version-management/sourcehut/man.nix b/pkgs/applications/version-management/sourcehut/man.nix
149 index bd331f000a7..effe70059df 100644
150 --- a/pkgs/applications/version-management/sourcehut/man.nix
151 +++ b/pkgs/applications/version-management/sourcehut/man.nix
154 buildPythonPackage rec {
156 - version = "0.15.12";
157 + version = "0.15.18";
159 src = fetchFromSourcehut {
163 - sha256 = "sha256-MqH/8K9XRvEg6P7GHE6XXtWnhDP3wT8iGoNaFtYQbio=";
164 + sha256 = "sha256-hlp3WBKgRHEWlQvs2Ep1sWA8gVR91pQnd7gvl8jMaVE=";
167 nativeBuildInputs = srht.nativeBuildInputs;
168 diff --git a/pkgs/applications/version-management/sourcehut/meta.nix b/pkgs/applications/version-management/sourcehut/meta.nix
169 index a285d484ed2..87122a03cab 100644
170 --- a/pkgs/applications/version-management/sourcehut/meta.nix
171 +++ b/pkgs/applications/version-management/sourcehut/meta.nix
176 - version = "0.53.14";
177 + version = "0.54.3";
179 src = fetchFromSourcehut {
183 - sha256 = "sha256-/+r/XLDkcSTW647xPMh5bcJmR2xZNNH74AJ5jemna2k=";
184 + sha256 = "sha256-u9cl0YGPnCo+AYLA4qkrqqzQhsf4IRR6W95JulpNIIE=";
187 buildApi = src: buildGoModule {
189 pname = "metasrht-api";
190 - vendorSha256 = "sha256-eZyDrr2VcNMxI++18qUy7LA1Q1YDlWCoRtl00L8lfR4=";
191 + vendorSha256 = "sha256-s0Hjt/6S9vMBL5iGREQjmA1BQ1ImB2Va++9NxSfUZzw=";
195 diff --git a/pkgs/applications/version-management/sourcehut/paste.nix b/pkgs/applications/version-management/sourcehut/paste.nix
196 index 0d8c9135493..71a95bb10b0 100644
197 --- a/pkgs/applications/version-management/sourcehut/paste.nix
198 +++ b/pkgs/applications/version-management/sourcehut/paste.nix
201 buildPythonPackage rec {
203 - version = "0.12.1";
204 + version = "0.12.4";
206 src = fetchFromSourcehut {
208 repo = "paste.sr.ht";
210 - sha256 = "sha256-QQhd2LeH9BLmlHilhsv+9fZ+RPNmEMSmOpFA3dsMBFc=";
211 + sha256 = "sha256-hFjWa7L7JiQoG3Hm9NyoP2FNypDiW+nGDmQ2DoZkAIw=";
214 nativeBuildInputs = srht.nativeBuildInputs;
215 diff --git a/pkgs/applications/version-management/sourcehut/scm.nix b/pkgs/applications/version-management/sourcehut/scm.nix
216 index 1f385265360..1ce3fe867ed 100644
217 --- a/pkgs/applications/version-management/sourcehut/scm.nix
218 +++ b/pkgs/applications/version-management/sourcehut/scm.nix
221 buildPythonPackage rec {
223 - version = "0.22.9";
224 + version = "0.22.12";
226 src = fetchFromSourcehut {
230 - sha256 = "sha256-327G6C8FW+iZx+167D7TQsFtV6FGc8MpMVo9L/cUUqU=";
231 + sha256 = "sha256-ktDQ0pVljt85sN2v5QgBiqaW5wtVc5pRC8WT31HSwpI=";
234 nativeBuildInputs = srht.nativeBuildInputs;
235 diff --git a/pkgs/applications/version-management/sourcehut/todo.nix b/pkgs/applications/version-management/sourcehut/todo.nix
236 index 85e1f5637b6..8aa4730b1cb 100644
237 --- a/pkgs/applications/version-management/sourcehut/todo.nix
238 +++ b/pkgs/applications/version-management/sourcehut/todo.nix
241 buildPythonPackage rec {
243 - version = "0.64.14";
244 + version = "0.64.23";
246 src = fetchFromSourcehut {
250 - sha256 = "sha256-huIAhn6h1F5w5ST4/yBwr82kAzyYwhLu+gpRuOQgnsE=";
251 + sha256 = "sha256-gagOaYlOfkho8nV7feboPjmOYazsMV72NfMngubxRFc=";
254 nativeBuildInputs = srht.nativeBuildInputs;
255 diff --git a/pkgs/applications/version-management/sourcehut/update.sh b/pkgs/applications/version-management/sourcehut/update.sh
256 index 156d4cc35e4..8cb4f708006 100755
257 --- a/pkgs/applications/version-management/sourcehut/update.sh
258 +++ b/pkgs/applications/version-management/sourcehut/update.sh
260 #! /usr/bin/env nix-shell
261 #! nix-shell -i bash -p git mercurial common-updater-scripts
264 -cd "$(dirname "${BASH_SOURCE[0]}")"
265 +cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1
268 +trap 'rm -rf "$tmp"' EXIT
271 (cd "$root" && nix-instantiate --eval --strict -A "sourcehut.python.pkgs.$1.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/')
272 @@ -13,19 +16,18 @@ version() {
276 - (cd "$root" && nix-instantiate --eval --strict -A "sourcehut.python.pkgs.$1.src.drvAttrs.url" | tr -d '"')
277 + nix-instantiate --eval --strict --expr " with import $root {}; let src = sourcehut.python.pkgs.$1.drvAttrs.src; in src.url or src.meta.homepage" | tr -d '"'
280 get_latest_version() {
281 src="$(src_url "$1")"
285 if [ "$1" = "hgsrht" ]; then
286 - hg clone "$src" "$tmp" &> /dev/null
287 + hg clone "$src" "$tmp" >/dev/null
288 printf "%s" "$(cd "$tmp" && hg log --limit 1 --template '{latesttag}')"
290 - git clone "$src" "$tmp"
291 - printf "%s" "$(cd "$tmp" && git describe $(git rev-list --tags --max-count=1))"
292 + git clone "$src" "$tmp" >/dev/null
293 + printf "%s" "$(cd "$tmp" && git describe "$(git rev-list --tags --max-count=1)")"
297 @@ -36,19 +38,33 @@ update_version() {
299 (cd "$root" && update-source-version "sourcehut.python.pkgs.$1" "$version")
301 + # Update vendorSha256 of Go modules
302 + nixFile="${1%srht}".nix
303 + nixFile="${nixFile/build/builds}"
307 + exec < <(exec nix -L build -f "$root" sourcehut.python.pkgs."$1" 2>&1)
308 + while IFS=' :' read -r origin hash; do
310 + (expected|specified) oldHash="$hash";;
311 + (got) sed -i "s|$oldHash|$(nix hash to-sri --type sha256 "$hash")|" "$nixFile"; retry=true; break;;
312 + (*) printf >&2 "%s\n" "$origin${hash:+:$hash}"
317 git add "$default_nix"
318 git commit -m "$1: $version_old -> $version"
321 -services=( "srht" "buildsrht" "dispatchsrht" "gitsrht" "hgsrht" "hubsrht" "listssrht" "mansrht"
322 - "metasrht" "pastesrht" "todosrht" "scmsrht" )
324 -# Whether or not a specific service is requested
325 -if [ -n "$1" ]; then
326 - version="$(get_latest_version "$1")"
327 - (cd "$root" && update-source-version "sourcehut.python.pkgs.$1" "$version")
328 +if [ $# -gt 0 ]; then
331 - for service in "${services[@]}"; do
332 - update_version "$service"
334 + services=( "srht" "buildsrht" "dispatchsrht" "gitsrht" "hgsrht" "hubsrht" "listssrht" "mansrht"
335 + "metasrht" "pastesrht" "todosrht" "scmsrht" )
338 +for service in "${services[@]}"; do
339 + update_version "$service"