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