Files
censtablo/river.build.zig.zon.nix
bluepython508 5930ffd357 Initial Commit
2026-02-10 14:19:40 +00:00

139 lines
3.6 KiB
Nix

# generated by zon2nix (https://github.com/Cloudef/zig2nix)
{
lib,
linkFarm,
fetchurl,
fetchgit,
runCommandLocal,
zig,
name ? "zig-packages",
}:
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 [
{
name = "pixman-0.3.0-LClMnz2VAAAs7QSCGwLimV5VUYx0JFnX5xWU6HwtMuDX";
path = fetchZigArtifact {
name = "pixman";
url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.3.0.tar.gz";
hash = "sha256-zX/jQV1NWGhalP3t0wjpmUo38BKCiUDPtgNGHefyxq0=";
};
}
{
name = "wayland-0.5.0-dev-lQa1kvTUAQCsD8AobfOXJA_-TVG-WTYXju68OZ8L85RM";
path = fetchZigArtifact {
name = "wayland";
url = "git+https://codeberg.org/ifreund/zig-wayland?ref=main#f2480d25764a50ed2fe29f49e4209c074a557f46";
hash = "sha256-PosVlJ0FD80O46l0SYTWzfHFYfIE4Bdjqof/gttQ+KM=";
rev = "f2480d25764a50ed2fe29f49e4209c074a557f46";
};
}
{
name = "wlroots-0.19.3-jmOlcuL_AwBHhLCwpFsXbTizE3q9BugFmGX-XIxqcPMc";
path = fetchZigArtifact {
name = "wlroots";
url = "https://codeberg.org/ifreund/zig-wlroots/archive/v0.19.3.tar.gz";
hash = "sha256-v/z6Kva5DQfLGHzrPXCu/7DtEbPT+XN+oATnIrwDHWs=";
};
}
{
name = "wayland-0.4.0-lQa1khbMAQAsLS2eBR7M5lofyEGPIbu2iFDmoz8lPC27";
path = fetchZigArtifact {
name = "wayland";
url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.4.0.tar.gz";
hash = "sha256-kH/dGMft4asfJJxhi6Xc47inLCblAJC0rnAQAzpBm6k=";
};
}
{
name = "xkbcommon-0.3.0-VDqIe3K9AQB2fG5ZeRcMC9i7kfrp5m2rWgLrmdNn9azr";
path = fetchZigArtifact {
name = "xkbcommon";
url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.3.0.tar.gz";
hash = "sha256-HhhUI+ayPtlylhTmZ1GrdSLbRIffTg3MeisGN1qs2iM=";
};
}
{
name = "xkbcommon-0.4.0-dev-VDqIe3bUAQB9reSurmSJxQjiQ6bnpekmOxIp_077GhVZ";
path = fetchZigArtifact {
name = "xkbcommon";
url = "git+https://codeberg.org/ifreund/zig-xkbcommon?ref=main#a10651157cb1545ee3ae3818b4c7437c64d16462";
hash = "sha256-fHf99JXSC1duAGoydZerzEGfmYUyZNEHdlz/SHy/xh8=";
rev = "a10651157cb1545ee3ae3818b4c7437c64d16462";
};
}
]