From bbd16df0ef4e94009c39ba90d9c0a83e22c487a3 Mon Sep 17 00:00:00 2001 From: bluepython508 <16466646+bluepython508@users.noreply.github.com> Date: Mon, 20 Apr 2026 11:28:22 +0100 Subject: [PATCH] Update river --- flake.lock | 88 ++++++++++++++++++++++--- flake.nix | 85 ++++++++++-------------- river.build.zig.zon.nix | 143 +++++++++------------------------------- 3 files changed, 143 insertions(+), 173 deletions(-) diff --git a/flake.lock b/flake.lock index fb8a533..3019992 100644 --- a/flake.lock +++ b/flake.lock @@ -1,12 +1,76 @@ { "nodes": { + "janet-pkgs": { + "flake": false, + "locked": { + "lastModified": 1768783276, + "narHash": "sha256-VPzMcRq8oerlHwDegKaqP6MpOMsUprDAAzyqrI7YEY8=", + "owner": "janet-lang", + "repo": "pkgs", + "rev": "36e69933328cc7ac98ac8d59fca315906cd82384", + "type": "github" + }, + "original": { + "owner": "janet-lang", + "repo": "pkgs", + "type": "github" + } + }, + "janet-wayland": { + "flake": false, + "locked": { + "lastModified": 1774511618, + "narHash": "sha256-maPZ0hAvsBhRuVZt/6hlUYHkxGSbV+zwVDldqjDRRNU=", + "ref": "refs/heads/main", + "rev": "0aea1ae8c2b462d609fc739acceeb9ead315c07f", + "revCount": 64, + "type": "git", + "url": "https://codeberg.org/ifreund/janet-wayland" + }, + "original": { + "type": "git", + "url": "https://codeberg.org/ifreund/janet-wayland" + } + }, + "janet-xkbcommon": { + "flake": false, + "locked": { + "lastModified": 1768088717, + "narHash": "sha256-W7X1ABu1v2+sqZ29OICiYYaFixxXo4uclYfsF4OMAPE=", + "ref": "refs/heads/main", + "rev": "ce36f665a8b271d3eac0ef60a1ec77bd79b02367", + "revCount": 8, + "type": "git", + "url": "https://codeberg.org/ifreund/janet-xkbcommon" + }, + "original": { + "type": "git", + "url": "https://codeberg.org/ifreund/janet-xkbcommon" + } + }, + "lemongrass": { + "flake": false, + "locked": { + "lastModified": 1765024507, + "narHash": "sha256-OUqK57EYh6McnxnbvqoPm92eBMYM5iNaPuN6R0yZHA4=", + "owner": "pyrmont", + "repo": "lemongrass", + "rev": "906974b82ba06ed421e0c8cd9a56c6ddc4ca6820", + "type": "github" + }, + "original": { + "owner": "pyrmont", + "repo": "lemongrass", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1767950769, - "narHash": "sha256-oT4Tj7O9361bmMbPwuAcH2zgj2fUZao7F32Bkah+AmE=", + "lastModified": 1780750590, + "narHash": "sha256-1TMOErEkQatevyUn4Y/wpriZuj+8a8GFdqITzDuWDMw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3cf525869eaad0c4105795523d158d6985d40885", + "rev": "4bb2f933a726f6164c2c7066ca03f5684de94f2a", "type": "github" }, "original": { @@ -18,11 +82,11 @@ "river": { "flake": false, "locked": { - "lastModified": 1770134013, - "narHash": "sha256-O0GySsnOhbZBi86RdG1U/9ov8llLS/15ZZZVlSQqAv4=", + "lastModified": 1780581500, + "narHash": "sha256-ufnhCOsVa8QGZGsmTrYRdC9fN+Z5ma7j5Cjxvn9Dhik=", "ref": "main", - "rev": "e967499fb12b6074ebb93d98d7fc3e5eefb438ab", - "revCount": 1578, + "rev": "76b9f619c74a1ddebfad3c798b189b5458b06009", + "revCount": 1721, "type": "git", "url": "https://codeberg.org/river/river.git" }, @@ -34,6 +98,10 @@ }, "root": { "inputs": { + "janet-pkgs": "janet-pkgs", + "janet-wayland": "janet-wayland", + "janet-xkbcommon": "janet-xkbcommon", + "lemongrass": "lemongrass", "nixpkgs": "nixpkgs", "river": "river", "spork": "spork" @@ -42,11 +110,11 @@ "spork": { "flake": false, "locked": { - "lastModified": 1774924473, - "narHash": "sha256-YnmeSt/u0S9rQD/AOBBj0YfinG80j6VQ4TZ9Xq2TSR4=", + "lastModified": 1776515126, + "narHash": "sha256-4oKmRjwDMRwlnntHOh3k2XG3pNxQ239Hgvw7zlokoCQ=", "owner": "janet-lang", "repo": "spork", - "rev": "5bc08fb253d2b2b641c322cd51b9c10eed254706", + "rev": "993887a8dbc9387af3b037418f02ef8e2b42b275", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a662f69..44ad031 100644 --- a/flake.nix +++ b/flake.nix @@ -8,12 +8,32 @@ url = "github:janet-lang/spork"; flake = false; }; + inputs.janet-pkgs = { + url = "github:janet-lang/pkgs"; + flake = false; + }; + inputs.lemongrass = { + url = "github:pyrmont/lemongrass"; + flake = false; + }; + inputs.janet-wayland = { + url = "git+https://codeberg.org/ifreund/janet-wayland"; + flake = false; + }; + inputs.janet-xkbcommon = { + url = "git+https://codeberg.org/ifreund/janet-xkbcommon"; + flake = false; + }; outputs = inputs @ { self, nixpkgs, river, spork, + janet-pkgs, + lemongrass, + janet-wayland, + janet-xkbcommon, }: let systems = ["x86_64-linux" "aarch64-linux"]; eachSystem = f: @@ -29,17 +49,6 @@ system, ... }: let - libxkbcommon = pkgs.libxkbcommon.overrideAttrs { - version = "1.12.0"; - src = pkgs.fetchFromGitHub { - owner = "xkbcommon"; - repo = "libxkbcommon"; - tag = "xkbcommon-1.12.0"; - hash = "sha256-QO3snl7NiyS2ao2MF3eT/lkNmVBjijr3JdTyrPn/2MQ="; - }; - patches = []; - doCheck = false; - }; janet-pm = pkgs.stdenv.mkDerivation { pname = "janet-pm"; version = "1.1.1"; @@ -58,7 +67,7 @@ src = inputs.river; deps = pkgs.callPackage ./river.build.zig.zon.nix {}; zigBuildFlags = ["--system" "${finalAttrs.deps}" "-Dxwayland"]; - nativeBuildInputs = with pkgs; [pkg-config wayland-scanner xwayland zig_0_15.hook]; + nativeBuildInputs = with pkgs; [pkg-config wayland-scanner xwayland zig_0_16.hook]; buildInputs = with pkgs; [ libGL libevdev @@ -67,12 +76,10 @@ udev wayland wayland-protocols - wlroots_0_19 + wlroots_0_20 libx11 libxkbcommon ]; - - dontConfigure = true; }); default = pkgs.stdenv.mkDerivation { pname = "censtablo"; @@ -81,50 +88,26 @@ nativeBuildInputs = [pkgs.pkg-config janet-pm]; buildInputs = [ (pkgs.wayland.overrideAttrs (final: prev: { - patches = - prev.patches - ++ [ - (pkgs.fetchpatch { - url = "https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/485.patch"; - hash = "sha256-gd5BRE/ioFMM86Q8HLSzdvuwDDaqws0b3HiInC0nNgQ="; - }) - ]; + # patches = [ + # (pkgs.fetchpatch { + # url = "https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/485.patch"; + # hash = "sha256-gd5BRE/ioFMM86Q8HLSzdvuwDDaqws0b3HiInC0nNgQ="; + # }) + # ]; })) pkgs.wayland-scanner pkgs.wayland-protocols - libxkbcommon + pkgs.libxkbcommon pkgs.janet ]; RIVER_PROTOCOLS = "${inputs.river}/protocol/"; deps = [ - "${pkgs.fetchFromGitHub { - owner = "janet-lang"; - repo = "pkgs"; - rev = "master"; - hash = "sha256-VPzMcRq8oerlHwDegKaqP6MpOMsUprDAAzyqrI7YEY8="; - }}:git__https___github.com_janet-lang_pkgs.git" + "${janet-pkgs}:git__https___github.com_janet-lang_pkgs.git" "${spork}:git__https___github.com_janet-lang_spork" - "${pkgs.fetchFromGitHub { - owner = "pyrmont"; - repo = "lemongrass"; - rev = "master"; - hash = "sha256-OUqK57EYh6McnxnbvqoPm92eBMYM5iNaPuN6R0yZHA4="; - }}:git__https___github.com_pyrmont_lemongrass" - "${pkgs.fetchFromGitea { - domain = "codeberg.org"; - owner = "ifreund"; - repo = "janet-wayland"; - rev = "189eb3b2e3a87a676b7f682d8cf1764bb6eb457f"; - hash = "sha256-dIGjPeBL8/enIwwrSMqNdSOtBWnyo1ioHSLcL1VN2uI="; - }}:git__https___codeberg.org_ifreund_janet-wayland" - "${pkgs.fetchFromGitea { - domain = "codeberg.org"; - owner = "ifreund"; - repo = "janet-xkbcommon"; - rev = "main"; - hash = "sha256-W7X1ABu1v2+sqZ29OICiYYaFixxXo4uclYfsF4OMAPE="; - }}:git__https___codeberg.org_ifreund_janet-xkbcommon" + "${lemongrass}:git__https___github.com_pyrmont_lemongrass" + "${janet-wayland}:git__https___codeberg.org_ifreund_janet-wayland" + "${janet-xkbcommon}:git__https___codeberg.org_ifreund_janet-xkbcommon" ]; buildPhase = '' @@ -163,7 +146,7 @@ default = pkgs.mkShell { inputsFrom = [ownPkgs.default]; inherit (ownPkgs.default) RIVER_PROTOCOLS; - packages = [ownPkgs.janet-pm]; + packages = [ownPkgs.janet-pm ownPkgs.river]; shellHook = '' export JANET_PATH="$PWD/.jpm" mkdir -p $JANET_PATH diff --git a/river.build.zig.zon.nix b/river.build.zig.zon.nix index 6427ec2..e8f714b 100644 --- a/river.build.zig.zon.nix +++ b/river.build.zig.zon.nix @@ -1,138 +1,57 @@ -# 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, fetchgit }: -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; +linkFarm "zig-packages" [ + { + name = "aro-0.0.0-JSD1Qi7QNgDnfcrdEJf82v3o6MhZySjYVrtdfEf3E4Se"; + path = fetchgit { + url = "https://github.com/Vexu/arocc"; + rev = "5f5a050569a95ecc40a426f0c3666ae7ef987ede"; + hash = "sha256-f8Z0SXWx5Uia2TCMB5SUpcO8+xUnaWk32Oknva7xcxw="; }; - - 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"; + path = fetchzip { url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.3.0.tar.gz"; - hash = "sha256-zX/jQV1NWGhalP3t0wjpmUo38BKCiUDPtgNGHefyxq0="; + hash = "sha256-8tA4auo5FEI4IPnomV6bkpQHUe302tQtorFQZ1l14NU="; }; } { - 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 = "translate_c-0.0.0-Q_BUWlX1BgCD1wo6uo97prlp9VJ4gxAjwN_vZ7nsSjGN"; + path = fetchgit { + url = "https://codeberg.org/ziglang/translate-c/"; + rev = "57c559cf581b1fcad90494eda219f98abeb155ce"; + hash = "sha256-7OlW2f5tRc1UZySDcEQERsLGChSxIcJAiVWdvuFUvvY="; }; } { - 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.6.0-lQa1kqz8AQADQmdNJsNhLoNHcnEGEUjrOaPV-dtEnEmX"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.6.0.tar.gz"; + hash = "sha256-3m/ITNhZUJ/5uD/Tqm+0uZSktGoYgWF5oldOqOCUkIE="; }; } { - 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 = "wlroots-0.20.1-jmOlcqNVBAB3uB5oqBTzpRlwu-FmMyyZMVAWCe5kmcSt"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-wlroots/archive/v0.20.1.tar.gz"; + hash = "sha256-cfzHJ2ziiCkMyNlIo6I9o/NjaZGrsv22hq41WYwCnpk="; }; } { name = "xkbcommon-0.3.0-VDqIe3K9AQB2fG5ZeRcMC9i7kfrp5m2rWgLrmdNn9azr"; - path = fetchZigArtifact { - name = "xkbcommon"; + path = fetchzip { url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.3.0.tar.gz"; - hash = "sha256-HhhUI+ayPtlylhTmZ1GrdSLbRIffTg3MeisGN1qs2iM="; + hash = "sha256-e5bPEfxl4SQf0cqccLt/py1KOW1+Q1+kWZUEXBbh9oQ="; }; } { - 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"; + name = "xkbcommon-0.4.0-VDqIe0i2AgDRsok2GpMFYJ8SVhQS10_PI2M_CnHXsJJZ"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.4.0.tar.gz"; + hash = "sha256-zQkmP/cuhAtjOLqYS5D15khKzpqyhbyZ0TD6/8jOkqE="; }; } ]