audiobookshelf: 2.18.1 -> 2.19.0 (#378967)
[NixPkgs.git] / pkgs / by-name / vo / volctl / package.nix
blob9be2580032c4b0cd7f76460e6a8ab5d57a8c32c0
2   lib,
3   python3Packages,
4   fetchFromGitHub,
5   wrapGAppsHook3,
6   gobject-introspection,
7   libpulseaudio,
8   glib,
9   gtk3,
10   pango,
11   xorg,
14 python3Packages.buildPythonApplication rec {
15   pname = "volctl";
16   version = "0.9.4";
18   src = fetchFromGitHub {
19     owner = "buzz";
20     repo = pname;
21     rev = "v${version}";
22     sha256 = "sha256-jzS97KV17wKeBI6deKE4rEj5lvqC38fq1JGundHn2So=";
23   };
25   postPatch = ''
26     substituteInPlace volctl/xwrappers.py \
27       --replace 'libXfixes.so' "${xorg.libXfixes}/lib/libXfixes.so" \
28       --replace 'libXfixes.so.3' "${xorg.libXfixes}/lib/libXfixes.so.3"
29   '';
31   preBuild = ''
32     export LD_LIBRARY_PATH=${libpulseaudio}/lib
33   '';
35   nativeBuildInputs = [
36     gobject-introspection
37     wrapGAppsHook3
38   ];
40   propagatedBuildInputs =
41     [
42       pango
43       gtk3
44     ]
45     ++ (with python3Packages; [
46       pulsectl
47       click
48       pycairo
49       pygobject3
50       pyyaml
51     ]);
53   # with strictDeps importing "gi.repository.Gtk" fails with "gi.RepositoryError: Typelib file for namespace 'Pango', version '1.0' not found"
54   strictDeps = false;
56   # no tests included
57   doCheck = false;
59   pythonImportsCheck = [ "volctl" ];
61   preFixup = ''
62     glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"}
63     gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${libpulseaudio}/lib")
64   '';
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   };