depot/third_party/nixpkgs/pkgs/development/python-modules/pulsectl/default.nix

32 lines
955 B
Nix
Raw Normal View History

{ lib, buildPythonPackage, fetchPypi, libpulseaudio, glibc, substituteAll, stdenv, pulseaudio, python }:
buildPythonPackage rec {
pname = "pulsectl";
version = "20.5.1";
src = fetchPypi {
inherit pname version;
sha256 = "39b0a0e7974a7d6468d826a838822f78b00ac9c3803f0d7bfa9b1cad08ee22db";
};
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 ];
};
}