From 7de490a28a9d4aa8d10ce53323485c1104089127 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 5 Mar 2020 02:07:23 +0100 Subject: [PATCH] gnomeExtensions.sound-output-device-chooser: 24 -> 25 https://github.com/kgshank/gse-sound-output-device-chooser/releases/tag/25 --- .../sound-output-device-chooser/default.nix | 21 ++++++++++++++---- .../fix-paths.patch | 22 +++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 pkgs/desktops/gnome-3/extensions/sound-output-device-chooser/fix-paths.patch diff --git a/pkgs/desktops/gnome-3/extensions/sound-output-device-chooser/default.nix b/pkgs/desktops/gnome-3/extensions/sound-output-device-chooser/default.nix index a5f94288ae57..cc1c2deeef9a 100644 --- a/pkgs/desktops/gnome-3/extensions/sound-output-device-chooser/default.nix +++ b/pkgs/desktops/gnome-3/extensions/sound-output-device-chooser/default.nix @@ -1,16 +1,29 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv +, substituteAll +, fetchFromGitHub +, libpulseaudio +, python3 +}: stdenv.mkDerivation rec { pname = "gnome-shell-extension-sound-output-device-chooser"; - version = "24"; + version = "25"; src = fetchFromGitHub { owner = "kgshank"; repo = "gse-sound-output-device-chooser"; rev = version; - sha256 = "0n1rf4pdf0b78ivmz89x223sqlzv30qydkvlnvn7hwx0j32kyr0x"; + sha256 = "16xaa4r01575ix9lrvww8n6pird8r3ml1j037b3sm6dfrf8kvzxs"; }; + patches = [ + (substituteAll { + src = ./fix-paths.patch; + libpulse = "${libpulseaudio}/lib/libpulse.so"; + python = python3.interpreter; + }) + ]; + dontBuild = true; uuid = "sound-output-device-chooser@kgshank.net"; @@ -23,6 +36,6 @@ stdenv.mkDerivation rec { description = "GNOME Shell extension adding audio device chooser to panel"; license = licenses.gpl3; maintainers = with maintainers; [ jtojnar ]; - homepage = https://github.com/kgshank/gse-sound-output-device-chooser; + homepage = "https://github.com/kgshank/gse-sound-output-device-chooser"; }; } diff --git a/pkgs/desktops/gnome-3/extensions/sound-output-device-chooser/fix-paths.patch b/pkgs/desktops/gnome-3/extensions/sound-output-device-chooser/fix-paths.patch new file mode 100644 index 000000000000..a0a6551fcf81 --- /dev/null +++ b/pkgs/desktops/gnome-3/extensions/sound-output-device-chooser/fix-paths.patch @@ -0,0 +1,22 @@ +--- a/sound-output-device-chooser@kgshank.net/convenience.js ++++ b/sound-output-device-chooser@kgshank.net/convenience.js +@@ -111,7 +111,7 @@ function refreshCards() { + log("New logic"); + let pyLocation = Me.dir.get_child('utils/pa_helper.py').get_path(); + try { +- let [result, out, err, exit_code] = GLib.spawn_command_line_sync('python ' + pyLocation); ++ let [result, out, err, exit_code] = GLib.spawn_command_line_sync('@python@ ' + pyLocation); + // log("result" + result +" out"+out + " exit_code" + exit_code + " + // err" +err); + if(result && !exit_code) { +--- a/sound-output-device-chooser@kgshank.net/utils/libpulse_introspect.py ++++ b/sound-output-device-chooser@kgshank.net/utils/libpulse_introspect.py +@@ -86,7 +86,7 @@ else: + + _libraries = {} + +-libpulse_library_name = find_library('pulse') ++libpulse_library_name = '@libpulse@' + if libpulse_library_name is None: + raise Exception('No libpulse.so library found!') +