diff options
Diffstat (limited to 'pkgs/development/python-modules/pulsectl/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pulsectl/default.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pulsectl/default.nix b/pkgs/development/python-modules/pulsectl/default.nix new file mode 100644 index 000000000000..dec80abda151 --- /dev/null +++ b/pkgs/development/python-modules/pulsectl/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchPypi, libpulseaudio, glibc, substituteAll, stdenv, pulseaudio, python }: + +buildPythonPackage rec { + pname = "pulsectl"; + version = "20.4.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "1m5fz740r4rk2i8qsnblsn16hai7givqxbx21swhpflan1yzvzzm"; + }; + + patches = [ + (substituteAll { + src = ./library-paths.patch; + libpulse = "${libpulseaudio.out}/lib/libpulse${stdenv.hostPlatform.extensions.sharedLibrary}"; + librt = "${glibc.out}/lib/librt${stdenv.hostPlatform.extensions.sharedLibrary}"; + }) + ]; + + checkInputs = [ pulseaudio ]; + checkPhase = '' + ${python.interpreter} -m unittest pulsectl.tests.all + ''; + + meta = with lib; { + description = "Python high-level interface and ctypes-based bindings for PulseAudio (libpulse)"; + homepage = "https://pypi.python.org/pypi/pulsectl/"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} |