Commit eb8268e6 authored by Erno Hopearuoho's avatar Erno Hopearuoho
Browse files

goxlr-utility: 1.1.1 -> 1.1.1-unstable-2024-08-06

fixes #331319 where user expects xdg desktop entry to continue work as a launcher
hopefully also helps with #332957
parent 31a02bb4
Loading
Loading
Loading
Loading
+18 −7
Original line number Diff line number Diff line
@@ -28,19 +28,30 @@ with lib;
    };
  };

  config = mkIf config.services.goxlr-utility.enable
    {
  config =
    let
      goxlr-autostart = pkgs.stdenv.mkDerivation {
        name = "autostart-goxlr-daemon";
        priority = 5;

        buildCommand = ''
          mkdir -p $out/etc/xdg/autostart
          cp ${cfg.package}/share/applications/goxlr-utility.desktop $out/etc/xdg/autostart/goxlr-daemon.desktop
          chmod +w $out/etc/xdg/autostart/goxlr-daemon.desktop
          echo "X-KDE-autostart-phase=2" >> $out/etc/xdg/autostart/goxlr-daemon.desktop
          substituteInPlace $out/etc/xdg/autostart/goxlr-daemon.desktop \
            --replace-fail goxlr-launcher goxlr-daemon
        '';
      };
    in
    mkIf config.services.goxlr-utility.enable {
      services.udev.packages = [ cfg.package ];

      xdg.autostart.enable = mkIf cfg.autoStart.xdg true;
      environment.systemPackages = mkIf cfg.autoStart.xdg
        [
          cfg.package
          (pkgs.makeAutostartItem
            {
              name = "goxlr-utility";
              package = cfg.package;
            })
          goxlr-autostart
        ];
    };

+1889 −1071

File changed.

Preview size limit exceeded, changes collapsed.

+8 −9
Original line number Diff line number Diff line
@@ -5,27 +5,27 @@
, pkg-config
, libpulseaudio
, dbus
, openssl
, speechd-minimal
}:

rustPlatform.buildRustPackage rec {
  pname = "goxlr-utility";
  version = "1.1.1";
  version = "1.1.1-unstable-2024-08-06";

  src = fetchFromGitHub {
    owner = "GoXLR-on-Linux";
    repo = "goxlr-utility";
    # v1.1.1 was released with broken Cargo.lock so we'll use later commit where it was fixed
    rev = "26a818366e7f28802592baa463bb57fc9eccbe27";
    hash = "sha256-tUAZSfoC9bp7gK884nVGumtcLb2LAw+zQRSoVS8r+QI=";
    rev = "dcd4454a2634f5a2af10f00c1cbcb016241ce2cb";
    hash = "sha256-kWfCFsk0GhqX+pYOTeJd7XHlcWOX4D6fmIU/4nylU3Y=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "ksni-0.2.1" = "sha256-cq3PAqkiYEv4MW5CtT7eau38Mf4uxdJ1C2fw640RXzI=";
      "tasklist-0.2.13" = "sha256-DMaVOo1TSIyjspybok1y07oNxGjHaPSC6qe4NmDfNgE=";
      "xpc-connection-sys-0.1.1" = "sha256-bzxzzTwPwa7flt8Jm9OcoBLwp3zn/V5WS2hTZjXV1/M=";
      "tasklist-0.2.15" = "sha256-YVAXqXuE4azxYi0ObOq4c9ZeMKFa2KjwwjjQlAeIPro=";
      "xpc-connection-sys-0.1.1" = "sha256-VYZyf271sDjnvgIv4iDA6bcPt9dm4Tp8rRxr682iWwU=";
    };
  };

@@ -33,6 +33,7 @@ rustPlatform.buildRustPackage rec {
    libpulseaudio
    dbus
    speechd-minimal
    openssl
  ];

  nativeBuildInputs = [
@@ -45,14 +46,12 @@ rustPlatform.buildRustPackage rec {

  postInstall = ''
    install -Dm644 "50-goxlr.rules" "$out/etc/udev/rules.d/50-goxlr.rules"

    install -Dm644 "daemon/resources/goxlr-utility.png" "$out/share/icons/hicolor/48x48/apps/goxlr-utility.png"
    install -Dm644 "daemon/resources/goxlr-utility.svg" "$out/share/icons/hicolor/scalable/apps/goxlr-utility.svg"
    install -Dm644 "daemon/resources/goxlr-utility-large.png" "$out/share/pixmaps/goxlr-utility.png"
    install -Dm644 "daemon/resources/goxlr-utility.desktop" "$out/share/applications/goxlr-utility.desktop"
    substituteInPlace $out/share/applications/goxlr-utility.desktop \
      --replace /usr/bin $out/bin \
      --replace goxlr-launcher goxlr-daemon
      --replace-fail /usr/bin $out/bin

    completions_dir=$(dirname $(find target -name 'goxlr-client.bash' | head -n 1))
    installShellCompletion --bash $completions_dir/goxlr-client.bash