forked from mirrors/nixpkgs
32 lines
943 B
Nix
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 ];
|
||
|
};
|
||
|
}
|