Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, python3Packages, fetchFromGitHub, wrapGAppsHook, gobject-introspection, libpulseaudio, glib, gtk3, pango, xorg }: 2 3python3Packages.buildPythonApplication rec { 4 pname = "volctl"; 5 version = "0.9.4"; 6 7 src = fetchFromGitHub { 8 owner = "buzz"; 9 repo = pname; 10 rev = "v${version}"; 11 sha256 = "sha256-jzS97KV17wKeBI6deKE4rEj5lvqC38fq1JGundHn2So="; 12 }; 13 14 postPatch = '' 15 substituteInPlace volctl/xwrappers.py \ 16 --replace 'libXfixes.so' "${xorg.libXfixes}/lib/libXfixes.so" \ 17 --replace 'libXfixes.so.3' "${xorg.libXfixes}/lib/libXfixes.so.3" 18 ''; 19 20 preBuild = '' 21 export LD_LIBRARY_PATH=${libpulseaudio}/lib 22 ''; 23 24 nativeBuildInputs = [ 25 gobject-introspection 26 wrapGAppsHook 27 ]; 28 29 propagatedBuildInputs = [ pango gtk3 ] ++ (with python3Packages; [ 30 pulsectl 31 click 32 pycairo 33 pygobject3 34 pyyaml 35 ]); 36 37 # with strictDeps importing "gi.repository.Gtk" fails with "gi.RepositoryError: Typelib file for namespace 'Pango', version '1.0' not found" 38 strictDeps = false; 39 40 # no tests included 41 doCheck = false; 42 43 pythonImportsCheck = [ "volctl" ]; 44 45 preFixup = '' 46 glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"} 47 gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${libpulseaudio}/lib") 48 ''; 49 50 meta = with lib; { 51 description = "PulseAudio enabled volume control featuring per-app sliders"; 52 homepage = "https://buzz.github.io/volctl/"; 53 license = licenses.gpl2; 54 platforms = platforms.linux; 55 maintainers = [ maintainers.romildo ]; 56 }; 57}