mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
38 lines
1005 B
Nix
38 lines
1005 B
Nix
{ lib, buildPythonPackage, fetchPypi, libpulseaudio, glibc, substituteAll, stdenv, pulseaudio, python }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pulsectl";
|
|
version = "21.5.17";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "1826wz4d7qnlwl5csnjds1xh9ainicj2s004hlwv54bdvwx2ny1z";
|
|
};
|
|
|
|
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 = ''
|
|
export HOME=$TMPDIR
|
|
${python.interpreter} -m unittest discover
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|