depot/third_party/nixpkgs/pkgs/development/python-modules/pulsectl/default.nix
Default email 83405b6dd2 Project import generated by Copybara.
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
2023-03-15 17:39:30 +01:00

37 lines
1 KiB
Nix

{ lib, buildPythonPackage, fetchPypi, libpulseaudio, glibc, substituteAll, stdenv, pulseaudio, unittestCheckHook }:
buildPythonPackage rec {
pname = "pulsectl";
version = "22.3.2";
src = fetchPypi {
inherit pname version;
hash = "sha256-zBdOHO69TmIixbePT0FfEugHU8mrdas1QVm0y1lQsIQ=";
};
patches = [
# substitute library paths for libpulse and librt
(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"
];
nativeCheckInputs = [ unittestCheckHook pulseaudio ];
preCheck = ''
export HOME=$TMPDIR
'';
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 ];
};
}