Unverified Commit 8f24b0ab authored by Kira Bruneau's avatar Kira Bruneau Committed by GitHub
Browse files

goverlay: 0.7.1 -> 1.2 (#368202)

parents d283dea7 34e62a30
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -269,6 +269,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.
+19 −36
Original line number Diff line number Diff line
{
  lib,
  writeScriptBin,
  bash,
  stdenv,
  fetchFromGitHub,
  bash,
  coreutils,
  fpc,
  lazarus-qt5,
  wrapQtAppsHook,
  breeze-qt5,
  git,
  gnugrep,
  iproute2,
  lazarus-qt6,
  libGL,
  libGLU,
  libnotify,
  libqtpas,
  libX11,
  coreutils,
  git,
  gnugrep,
  libnotify,
  nix-update-script,
  polkit,
  procps,
  qt6,
  systemd,
  util-linux,
  vulkan-tools,
  which,
  nix-update-script,
  wrapQtAppsHook,
}:

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
+0 −40
Original line number Diff line number Diff line
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;
+2 −3
Original line number Diff line number Diff line
@@ -3579,9 +3579,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 {