2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
libpulseaudio,
|
|
|
|
glibc,
|
|
|
|
substituteAll,
|
|
|
|
stdenv,
|
|
|
|
pulseaudio,
|
|
|
|
unittestCheckHook,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pulsectl";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "24.4.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-aX7VDn1FLnhniuOOKrk1hDAIvsRIlVKDzQ+zYoZ+MWU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2021-09-18 10:52:07 +00:00
|
|
|
# substitute library paths for libpulse and librt
|
2020-04-24 23:36:52 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./library-paths.patch;
|
|
|
|
libpulse = "${libpulseaudio.out}/lib/libpulse${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
librt = "${glibc.out}/lib/librt${stdenv.hostPlatform.extensions.sharedLibrary}";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pulsectl" ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
unittestCheckHook
|
|
|
|
pulseaudio
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
preCheck = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
export HOME=$TMPDIR
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python high-level interface and ctypes-based bindings for PulseAudio (libpulse)";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://github.com/mk-fg/python-pulse-control";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|