diff --git a/pkgs/by-name/ri/river/build.zig.zon.nix b/pkgs/by-name/ri/river/build.zig.zon.nix new file mode 100644 index 000000000000..424b5ad35edd --- /dev/null +++ b/pkgs/by-name/ri/river/build.zig.zon.nix @@ -0,0 +1,34 @@ +# generated by zon2nix (https://github.com/nix-community/zon2nix) + +{ linkFarm, fetchzip }: + +linkFarm "zig-packages" [ + { + name = "122014eeb4600a059bdcfe1c864862f17e6d5e4237e3bb7d6818f2a5583f6f4eb843"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.1.0.tar.gz"; + hash = "sha256-Atfkiyt9v+GWry3xA2Y0Iv6AvwbZ+EHfHLmX0AUEz6Y="; + }; + } + { + name = "1220714d1cc39c3abb1d9c22a0b838d847ead099cb7d9931821490483f30c022e827"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-wlroots/archive/v0.17.0.tar.gz"; + hash = "sha256-C1D2dBn65Z9PmDacpeYbdX574fcOyYi/BJVDUMibkPA="; + }; + } + { + name = "1220840390382c88caf9b0887f6cebbba3a7d05960b8b2ee6d80567b2950b71e5017"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.1.0.tar.gz"; + hash = "sha256-xilmsDGWlkfpTiGff+/nb76jx87ANdr4zqYy6rKOBMg="; + }; + } + { + name = "1220b0f8f822c1625af7aae4cb3ab2c4ec1a4c0e99ef32867b2a8d88bb070b3e7f6d"; + path = fetchzip { + url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.1.0.tar.gz"; + hash = "sha256-VLEx8nRgmJZWgLNBRqrR7bZEkW0m5HTRv984HKwoIfA="; + }; + } +] diff --git a/pkgs/applications/window-managers/river/default.nix b/pkgs/by-name/ri/river/package.nix similarity index 82% rename from pkgs/applications/window-managers/river/default.nix rename to pkgs/by-name/ri/river/package.nix index 698d785a1911..0a251f51e079 100644 --- a/pkgs/applications/window-managers/river/default.nix +++ b/pkgs/by-name/ri/river/package.nix @@ -1,5 +1,6 @@ { lib , stdenv +, callPackage , fetchFromGitea , libGL , libX11 @@ -14,14 +15,14 @@ , wayland-protocols , wlroots_0_17 , xwayland -, zig_0_11 +, zig_0_12 , withManpages ? true , xwaylandSupport ? true }: stdenv.mkDerivation (finalAttrs: { pname = "river"; - version = "0.3.1"; + version = "0.3.2"; outputs = [ "out" ] ++ lib.optionals withManpages [ "man" ]; @@ -31,14 +32,16 @@ stdenv.mkDerivation (finalAttrs: { repo = "river"; rev = "refs/tags/v${finalAttrs.version}"; fetchSubmodules = true; - hash = "sha256-H/908/TP2uzJD1yH4mCXHvorY+4kAhzEkWn6nZGsyBg="; + hash = "sha256-I09cR5aN7qXOzV9HDXaL4TjoeJcVa0Ch00zxOJokdDE="; }; + deps = callPackage ./build.zig.zon.nix { }; + nativeBuildInputs = [ pkg-config wayland xwayland - zig_0_11.hook + zig_0_12.hook ] ++ lib.optional withManpages scdoc; @@ -55,14 +58,19 @@ stdenv.mkDerivation (finalAttrs: { dontConfigure = true; - zigBuildFlags = lib.optional withManpages "-Dman-pages" - ++ lib.optional xwaylandSupport "-Dxwayland"; + zigBuildFlags = [ + "--system" + "${finalAttrs.deps}" + ] ++ lib.optional withManpages "-Dman-pages" ++ lib.optional xwaylandSupport "-Dxwayland"; postInstall = '' install contrib/river.desktop -Dt $out/share/wayland-sessions ''; - passthru.providedSessions = [ "river" ]; + passthru = { + providedSessions = [ "river" ]; + updateScript = ./update.nu; + }; meta = { homepage = "https://codeberg.org/river/river"; diff --git a/pkgs/by-name/ri/river/update.nu b/pkgs/by-name/ri/river/update.nu new file mode 100755 index 000000000000..37a8ec6098ab --- /dev/null +++ b/pkgs/by-name/ri/river/update.nu @@ -0,0 +1,8 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i nu -p nushell common-updater-scripts zon2nix + +let latest_tag = list-git-tags --url=https://codeberg.org/river/river | lines | sort --natural | str replace v '' | last +update-source-version river $latest_tag + +http get $"https://codeberg.org/river/river/raw/tag/v($latest_tag)/build.zig.zon" | save build.zig.zon +zon2nix > pkgs/by-name/ri/river/build.zig.zon.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e930b2c73972..b330f35fd78f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6132,8 +6132,6 @@ with pkgs; rex = callPackage ../tools/system/rex { }; - river = callPackage ../applications/window-managers/river { }; - rivercarro = callPackage ../applications/misc/rivercarro { }; river-luatile = callPackage ../applications/misc/river-luatile{ };