3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pulsectl/default.nix
2020-04-21 16:17:36 -07:00

32 lines
943 B
Nix

{ 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 ];
};
}