Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 37 lines 1.0 kB view raw
1{ lib, buildPythonPackage, fetchPypi, libpulseaudio, glibc, substituteAll, stdenv, pulseaudio, python }: 2 3buildPythonPackage rec { 4 pname = "pulsectl"; 5 version = "21.5.17"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "1826wz4d7qnlwl5csnjds1xh9ainicj2s004hlwv54bdvwx2ny1z"; 10 }; 11 12 patches = [ 13 (substituteAll { 14 src = ./library-paths.patch; 15 libpulse = "${libpulseaudio.out}/lib/libpulse${stdenv.hostPlatform.extensions.sharedLibrary}"; 16 librt = "${glibc.out}/lib/librt${stdenv.hostPlatform.extensions.sharedLibrary}"; 17 }) 18 ]; 19 20 pythonImportsCheck = [ 21 "pulsectl" 22 ]; 23 24 checkInputs = [ pulseaudio ]; 25 26 checkPhase = '' 27 export HOME=$TMPDIR 28 ${python.interpreter} -m unittest discover 29 ''; 30 31 meta = with lib; { 32 description = "Python high-level interface and ctypes-based bindings for PulseAudio (libpulse)"; 33 homepage = "https://pypi.python.org/pypi/pulsectl/"; 34 license = licenses.mit; 35 maintainers = with maintainers; [ hexa ]; 36 }; 37}