nixpkgs/pkgs/development/python-modules/pulsectl/default.nix
2021-04-03 17:49:05 +02:00

32 lines
955 B
Nix

{ lib, buildPythonPackage, fetchPypi, libpulseaudio, glibc, substituteAll, stdenv, pulseaudio, python }:
buildPythonPackage rec {
pname = "pulsectl";
version = "21.3.4";
src = fetchPypi {
inherit pname version;
sha256 = "faa8b9336237565990298f20870e13dd1678a4586847ca5a7ff2abf10752f356";
};
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 ];
};
}