42c9938f11
GitOrigin-RevId: dcdf30a78a523296b5f9d44fb67afac485b64737
31 lines
942 B
Nix
31 lines
942 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 = "sha256-+qi5M2I3VlmQKY8ghw4T3RZ4pFhoR8paf/Kr8QdS81Y=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|