summary refs log tree commit diff
path: root/pkgs/tools/audio/volctl/default.nix
blob: dd58671824db0887493feda16885f644a60b9e3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{ stdenv, fetchFromGitHub, pythonPackages, libpulseaudio, glib, gtk3, gobject-introspection, wrapGAppsHook }:

pythonPackages.buildPythonApplication rec {
  pname = "volctl";
  version = "0.6.3";

  src = fetchFromGitHub {
    owner = "buzz";
    repo = pname;
    rev = version;
    sha256 = "0rppqc5wiqxd83z2mgvhi6gdx7yhy9wnav1dbbi1wvm7lzw6fnil";
  };

  nativeBuildInputs = [
    gobject-introspection
    wrapGAppsHook
  ];

  buildInputs = [
    glib
    gtk3
    libpulseaudio
  ];

  pythonPath = with pythonPackages; [
    pygobject3
  ];

  strictDeps = false;

  preBuild = ''
    export LD_LIBRARY_PATH=${libpulseaudio}/lib
  '';

  preFixup = ''
    glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"}

    gappsWrapperArgs+=(
      --prefix LD_LIBRARY_PATH : "${libpulseaudio}/lib"
    )
  '';

  meta = with stdenv.lib; {
    description = "PulseAudio enabled volume control featuring per-app sliders";
    homepage = "https://buzz.github.io/volctl/";
    license = licenses.gpl2;
    platforms = platforms.linux;
    maintainers = [ maintainers.romildo ];
  };
}