summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2021-10-11 15:25:13 -0700
committerRobert Schütz <nix@dotlambda.de>2021-10-14 09:11:26 -0700
commit1984b89dfeaabefb854be94ac6309fb781b2b7f5 (patch)
tree8d668a15f57a8014597683c6763cf8f33d864f6e
parent28331311a337023fcc38cd4ad0c0d9a30ddcb67b (diff)
downloadnixpkgs-1984b89dfeaabefb854be94ac6309fb781b2b7f5.tar
nixpkgs-1984b89dfeaabefb854be94ac6309fb781b2b7f5.tar.gz
nixpkgs-1984b89dfeaabefb854be94ac6309fb781b2b7f5.tar.bz2
nixpkgs-1984b89dfeaabefb854be94ac6309fb781b2b7f5.tar.lz
nixpkgs-1984b89dfeaabefb854be94ac6309fb781b2b7f5.tar.xz
nixpkgs-1984b89dfeaabefb854be94ac6309fb781b2b7f5.tar.zst
nixpkgs-1984b89dfeaabefb854be94ac6309fb781b2b7f5.zip
mousai: 0.4.2 -> 0.6.6
-rw-r--r--pkgs/applications/audio/mousai/default.nix14
-rw-r--r--pkgs/applications/audio/mousai/paths.patch13
2 files changed, 25 insertions, 2 deletions
diff --git a/pkgs/applications/audio/mousai/default.nix b/pkgs/applications/audio/mousai/default.nix
index 9044d201c45..f61b7c5b7b9 100644
--- a/pkgs/applications/audio/mousai/default.nix
+++ b/pkgs/applications/audio/mousai/default.nix
@@ -1,6 +1,7 @@
 { lib
 , python3
 , fetchFromGitHub
+, substituteAll
 , appstream-glib
 , desktop-file-utils
 , gettext
@@ -13,12 +14,13 @@
 , meson
 , ninja
 , pkg-config
+, pulseaudio
 , wrapGAppsHook
 }:
 
 python3.pkgs.buildPythonApplication rec {
   pname = "mousai";
-  version = "0.4.2";
+  version = "0.6.6";
 
   format = "other";
 
@@ -26,9 +28,16 @@ python3.pkgs.buildPythonApplication rec {
     owner = "SeaDve";
     repo = "Mousai";
     rev = "v${version}";
-    sha256 = "sha256-zH++GGFIz3oxkKOYB4zhY6yL3vENEXxtrv8mZZ+41kU=";
+    sha256 = "sha256-nCbFVFg+nVF8BOBfdzQVgdTRXR5UF18PJFC266yTFwg=";
   };
 
+  patches = [
+    (substituteAll {
+      src = ./paths.patch;
+      pactl = "${lib.getBin pulseaudio}/bin/pactl";
+    })
+  ];
+
   postPatch = ''
     patchShebangs build-aux/meson
   '';
@@ -53,6 +62,7 @@ python3.pkgs.buildPythonApplication rec {
     gtk4
     libadwaita
     librsvg
+    pulseaudio
   ];
 
   propagatedBuildInputs = with python3.pkgs; [
diff --git a/pkgs/applications/audio/mousai/paths.patch b/pkgs/applications/audio/mousai/paths.patch
new file mode 100644
index 00000000000..35b328ad0ea
--- /dev/null
+++ b/pkgs/applications/audio/mousai/paths.patch
@@ -0,0 +1,13 @@
+diff --git a/src/backend/utils.py b/src/backend/utils.py
+index cebc009..0087c09 100644
+--- a/src/backend/utils.py
++++ b/src/backend/utils.py
+@@ -79,7 +79,7 @@ class Utils:
+     @staticmethod
+     def get_default_audio_sources():
+         pactl_output = subprocess.run(
+-            ['/usr/bin/pactl', 'info'],
++            ['@pactl@', 'info'],
+             stdout=subprocess.PIPE,
+             text=True
+         ).stdout.splitlines()