From b8f8d83d5c1e014f22c775d832347c367571fcf4 Mon Sep 17 00:00:00 2001 From: Philip Abernethy Date: Wed, 25 Dec 2024 22:57:08 +0100 Subject: [PATCH 1/4] goverlay: sort arguments alphabetically --- pkgs/tools/graphics/goverlay/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/graphics/goverlay/default.nix b/pkgs/tools/graphics/goverlay/default.nix index b7521527c3732..ae0beb65cc65f 100644 --- a/pkgs/tools/graphics/goverlay/default.nix +++ b/pkgs/tools/graphics/goverlay/default.nix @@ -1,28 +1,28 @@ { lib, - writeScriptBin, - bash, stdenv, fetchFromGitHub, + bash, + breeze-qt5, + coreutils, fpc, + git, + gnugrep, lazarus-qt5, - wrapQtAppsHook, - breeze-qt5, libGL, libGLU, + libnotify, libqtpas, libX11, - coreutils, - git, - gnugrep, - libnotify, + nix-update-script, polkit, procps, systemd, util-linux, vulkan-tools, which, - nix-update-script, + wrapQtAppsHook, + writeScriptBin, }: let From 9f6bddf441b383f7639abb61b4881282dd7f9cfa Mon Sep 17 00:00:00 2001 From: Philip Abernethy Date: Wed, 25 Dec 2024 23:00:00 +0100 Subject: [PATCH 2/4] goverlay: 0.7.1 -> 1.2 --- pkgs/tools/graphics/goverlay/default.nix | 41 +++++++----------------- pkgs/top-level/all-packages.nix | 5 ++- 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/pkgs/tools/graphics/goverlay/default.nix b/pkgs/tools/graphics/goverlay/default.nix index ae0beb65cc65f..b59d5de8ac3c0 100644 --- a/pkgs/tools/graphics/goverlay/default.nix +++ b/pkgs/tools/graphics/goverlay/default.nix @@ -3,12 +3,12 @@ stdenv, fetchFromGitHub, bash, - breeze-qt5, coreutils, fpc, git, gnugrep, - lazarus-qt5, + iproute2, + lazarus-qt6, libGL, libGLU, libnotify, @@ -17,36 +17,23 @@ nix-update-script, polkit, procps, + qt6, systemd, util-linux, vulkan-tools, which, wrapQtAppsHook, - writeScriptBin, }: -let - # Finds data files using the XDG Base Directory Specification - # See https://specifications.freedesktop.org/basedir-spec/latest - find-xdg-data-files = writeScriptBin "find-xdg-data-files" '' - #!${bash}/bin/sh - IFS=: - for xdg_data_dir in ''${XDG_DATA_HOME:-$HOME/.local/share}:''${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do - if [ -f "$xdg_data_dir/$1" ]; then - echo "$xdg_data_dir/$1" - fi - done - ''; -in stdenv.mkDerivation rec { pname = "goverlay"; - version = "0.7.1"; + version = "1.2"; src = fetchFromGitHub { owner = "benjamimgois"; repo = pname; rev = version; - sha256 = "sha256-oXkGrMHjs8uui0pzGYW8jnttet/5IX0r8eat0n5saFk="; + sha256 = "sha256-tSpM+XLlFQLfL750LTNWbWFg1O+0fSfsPRXuRCm/KlY="; }; outputs = [ @@ -54,38 +41,35 @@ stdenv.mkDerivation rec { "man" ]; - patches = [ - # Find MangoHud & vkBasalt Vulkan layers using the XDG Base Directory Specification - ./find-xdg-data-files.patch - ]; - postPatch = '' substituteInPlace Makefile \ - --replace 'prefix = /usr/local' "prefix = $out" + --replace-fail 'prefix = /usr/local' "prefix = $out" substituteInPlace overlayunit.pas \ - --replace '/usr/share/icons/hicolor/128x128/apps/goverlay.png' "$out/share/icons/hicolor/128x128/apps/goverlay.png" + --replace-fail '/usr/share/icons/hicolor/128x128/apps/goverlay.png' "$out/share/icons/hicolor/128x128/apps/goverlay.png" \ + --replace-fail '/sbin/ip' "${lib.getExe' iproute2 "ip"}" \ + --replace-fail '/bin/bash' "${lib.getExe' bash "bash"}" ''; nativeBuildInputs = [ fpc - lazarus-qt5 + lazarus-qt6 wrapQtAppsHook ]; buildInputs = [ - breeze-qt5 libGL libGLU libqtpas libX11 + qt6.qtbase ]; NIX_LDFLAGS = "-lGLU -rpath ${lib.makeLibraryPath buildInputs}"; buildPhase = '' runHook preBuild - HOME=$(mktemp -d) lazbuild --lazarusdir=${lazarus-qt5}/share/lazarus -B goverlay.lpi + HOME=$(mktemp -d) lazbuild --lazarusdir=${lazarus-qt6}/share/lazarus -B goverlay.lpi runHook postBuild ''; @@ -94,7 +78,6 @@ stdenv.mkDerivation rec { lib.makeBinPath [ bash coreutils - find-xdg-data-files git gnugrep libnotify diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 27cedbcd5f8d8..498d0003f6c86 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3581,9 +3581,8 @@ with pkgs; gdown = with python3Packages; toPythonApplication gdown; - goverlay = callPackage ../tools/graphics/goverlay { - inherit (libsForQt5) libqtpas wrapQtAppsHook; - inherit (plasma5Packages) breeze-qt5; + goverlay = qt6Packages.callPackage ../tools/graphics/goverlay { + inherit (qt6Packages) libqtpas wrapQtAppsHook; }; gpt4all-cuda = gpt4all.override { From f6fa10a460ff9f4454ef660336c7166a3401fa3a Mon Sep 17 00:00:00 2001 From: Philip Abernethy Date: Wed, 25 Dec 2024 23:00:28 +0100 Subject: [PATCH 3/4] goverlay: delete find-xdg-data-dirs.patch --- .../goverlay/find-xdg-data-files.patch | 40 ------------------- 1 file changed, 40 deletions(-) delete mode 100644 pkgs/tools/graphics/goverlay/find-xdg-data-files.patch diff --git a/pkgs/tools/graphics/goverlay/find-xdg-data-files.patch b/pkgs/tools/graphics/goverlay/find-xdg-data-files.patch deleted file mode 100644 index 17ba9ed1140ed..0000000000000 --- a/pkgs/tools/graphics/goverlay/find-xdg-data-files.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/overlayunit.pas b/overlayunit.pas -index 97a088d..4c42414 100644 ---- a/overlayunit.pas -+++ b/overlayunit.pas -@@ -5007,7 +5007,7 @@ begin - //Determine Mangohud dependency status - - //locate MangoHud and store result in tmp folder -- RunCommand('bash -c ''find /usr/share/vulkan/implicit_layer.d/MangoHud.json >> /tmp/goverlay/dependency_mangohud''', s); -+ RunCommand('bash -c ''find-xdg-data-files vulkan/implicit_layer.d/MangoHud.json >> /tmp/goverlay/dependency_mangohud''', s); - - // Assign Text file dependency_mangohud to variable mangohudVAR - AssignFile(mangohudVAR, '/tmp/goverlay/dependency_mangohud'); -@@ -5016,7 +5016,7 @@ begin - CloseFile(mangohudVAR); - - // Read String and store value on mangohuddependencyVALUE based on result -- if mangohudSTR = '/usr/share/vulkan/implicit_layer.d/MangoHud.json' then -+ if mangohudSTR <> '' then - mangohuddependencyVALUE := 1 - else - mangohuddependencyVALUE := 0; -@@ -5025,7 +5025,7 @@ begin - //Determine vkBasalt dependency staus - - //locate vkBasalt and store result in tmp folder -- RunCommand('bash -c ''find /usr/share/vulkan/implicit_layer.d/vkBasalt.json >> /tmp/goverlay/dependency_vkbasalt''', s); -+ RunCommand('bash -c ''find-xdg-data-files vulkan/implicit_layer.d/vkBasalt.json >> /tmp/goverlay/dependency_vkbasalt''', s); - - // Assign Text file dependency_mangohud to variable mangohudVAR - AssignFile(vkbasaltVAR, '/tmp/goverlay/dependency_vkbasalt'); -@@ -5034,7 +5034,7 @@ begin - CloseFile(vkbasaltVAR); - - // Read String and store value on vkbasaltdependencyVALUE based on result -- if vkbasaltSTR = '/usr/share/vulkan/implicit_layer.d/vkBasalt.json' then -+ if vkbasaltSTR <> '' then - vkbasaltdependencyVALUE := 1 - else - vkbasaltdependencyVALUE := 0; From 34e62a308f64cdc23ea81c2fa29a20e970c7ab61 Mon Sep 17 00:00:00 2001 From: Philip Abernethy Date: Wed, 25 Dec 2024 22:40:18 +0100 Subject: [PATCH 4/4] goverlay: add 25.05 release notes entry --- nixos/doc/manual/release-notes/rl-2505.section.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index d55c94795ea6f..70bbeb8887e50 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -261,6 +261,8 @@ - Overriding Wayland compositor is possible using `enableWaylandSession` option, but you might need to take care [`xfce4-session`](https://gitlab.xfce.org/xfce/xfce4-session/-/merge_requests/49), [`dbus-update-activation-environment`](https://github.com/labwc/labwc/blob/eaf11face68ee1f1bcc7ce1498304ca8c108c8ba/src/config/session.c#L234) and [`systemctl --user import-environment`](https://github.com/labwc/labwc/blob/eaf11face68ee1f1bcc7ce1498304ca8c108c8ba/src/config/session.c#L239) on startup. - For new Xfce installations, default panel layout has [changed](https://gitlab.xfce.org/xfce/xfce4-panel/-/merge_requests/158/diffs) to not include external panel plugins by default. You can still add them yourself using the "Panel Preferences" dialog. +- GOverlay has been updated to 1.2, please check the [upstream changelog](https://github.com/benjamimgois/goverlay/releases) for more details. + - `networking.wireguard` now has an optional networkd backend. It is enabled by default when `networking.useNetworkd` is enabled, and it can be enabled alongside scripted networking with `networking.wireguard.useNetworkd`. Some `networking.wireguard` options have slightly different behavior with the networkd and script-based backends, documented in each option. - `services.avahi.ipv6` now defaults to true.