3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pulsectl/default.nix
2021-05-08 18:06:19 -07:00

37 lines
990 B
Nix

{ lib, buildPythonPackage, fetchPypi, libpulseaudio, glibc, substituteAll, stdenv, pulseaudio, python }:
buildPythonPackage rec {
pname = "pulsectl";
version = "21.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "11dw8hij1vzqawlv5l1ax6i2zw6p4ccn4ww3v6q1kdmrwk46vi7r";
};
patches = [
(substituteAll {
src = ./library-paths.patch;
libpulse = "${libpulseaudio.out}/lib/libpulse${stdenv.hostPlatform.extensions.sharedLibrary}";
librt = "${glibc.out}/lib/librt${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];
pythonImportsCheck = [
"pulsectl"
];
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 ];
};
}