From 03dab953629bca8c5773fda1bd2bb023754d3bd1 Mon Sep 17 00:00:00 2001 From: Jost Alemann Date: Fri, 17 Apr 2026 02:48:58 +0200 Subject: [PATCH] river-ultitile: fix build.zig.zon.nix Fix build by using the current version of zon2nix to generate the build.zig.zon.nix --- .../ri/river-ultitile/build.zig.zon.nix | 93 +------------------ 1 file changed, 5 insertions(+), 88 deletions(-) diff --git a/pkgs/by-name/ri/river-ultitile/build.zig.zon.nix b/pkgs/by-name/ri/river-ultitile/build.zig.zon.nix index 12ed09927d06..059e1411a333 100644 --- a/pkgs/by-name/ri/river-ultitile/build.zig.zon.nix +++ b/pkgs/by-name/ri/river-ultitile/build.zig.zon.nix @@ -1,96 +1,13 @@ -# generated by zon2nix (https://github.com/Cloudef/zig2nix) +# generated by zon2nix (https://github.com/nix-community/zon2nix) -{ - lib, - linkFarm, - fetchurl, - fetchgit, - runCommandLocal, - zig, - name ? "zig-packages", -}: +{ linkFarm, fetchzip }: -let - unpackZigArtifact = - { name, artifact }: - runCommandLocal name { nativeBuildInputs = [ zig ]; } '' - hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})" - mv "$TMPDIR/p/$hash" "$out" - chmod 755 "$out" - ''; - - fetchZig = - { - name, - url, - hash, - }: - let - artifact = fetchurl { inherit url hash; }; - in - unpackZigArtifact { inherit name artifact; }; - - fetchGitZig = - { - name, - url, - hash, - rev ? throw "rev is required, remove and regenerate the zon2json-lock file", - }: - let - parts = lib.splitString "#" url; - url_base = lib.elemAt parts 0; - url_without_query = lib.elemAt (lib.splitString "?" url_base) 0; - in - fetchgit { - inherit name rev hash; - url = url_without_query; - deepClone = false; - }; - - fetchZigArtifact = - { - name, - url, - hash, - ... - }@args: - let - parts = lib.splitString "://" url; - proto = lib.elemAt parts 0; - path = lib.elemAt parts 1; - fetcher = { - "git+http" = fetchGitZig ( - args - // { - url = "http://${path}"; - } - ); - "git+https" = fetchGitZig ( - args - // { - url = "https://${path}"; - } - ); - http = fetchZig { - inherit name hash; - url = "http://${path}"; - }; - https = fetchZig { - inherit name hash; - url = "https://${path}"; - }; - }; - in - fetcher.${proto}; -in -linkFarm name [ +linkFarm "zig-packages" [ { name = "wayland-0.3.0-lQa1kjPIAQDmhGYpY-zxiRzQJFHQ2VqhJkQLbKKdt5wl"; - path = fetchZigArtifact { - name = "wayland"; + path = fetchzip { url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.3.0.tar.gz"; - hash = "sha256-xU8IrETSFOKKQQMgwVyRKLwGaek4USaKXg49S9oHSTQ="; + hash = "sha256-ydEavD9z20wRwn9ZVX56ZI2T5i1tnm3LupVxfa30o84="; }; } ] -- knotmirror 0.0.1