diff options
author | José Romildo Malaquias <malaquias@gmail.com> | 2019-12-19 12:05:27 -0300 |
---|---|---|
committer | Matthieu Coudron <mattator@gmail.com> | 2019-12-20 16:03:10 +0100 |
commit | 306c31afedce690b4c6040657b9072616dfbcd20 (patch) | |
tree | f7a4507f92d57be0f7ac31497a04721915b0b6d9 /pkgs/tools/audio/volctl | |
parent | aa934faff2b140dc1074456c80da72e8ca4ce192 (diff) | |
download | nixpkgs-306c31afedce690b4c6040657b9072616dfbcd20.tar nixpkgs-306c31afedce690b4c6040657b9072616dfbcd20.tar.gz nixpkgs-306c31afedce690b4c6040657b9072616dfbcd20.tar.bz2 nixpkgs-306c31afedce690b4c6040657b9072616dfbcd20.tar.lz nixpkgs-306c31afedce690b4c6040657b9072616dfbcd20.tar.xz nixpkgs-306c31afedce690b4c6040657b9072616dfbcd20.tar.zst nixpkgs-306c31afedce690b4c6040657b9072616dfbcd20.zip |
volctl: init at 0.6.2
Diffstat (limited to 'pkgs/tools/audio/volctl')
-rw-r--r-- | pkgs/tools/audio/volctl/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/tools/audio/volctl/default.nix b/pkgs/tools/audio/volctl/default.nix new file mode 100644 index 00000000000..7b4cdd6b531 --- /dev/null +++ b/pkgs/tools/audio/volctl/default.nix @@ -0,0 +1,58 @@ +{ stdenv, fetchFromGitHub, pythonPackages, libpulseaudio, glib, gtk3, gobject-introspection, wrapGAppsHook }: + +pythonPackages.buildPythonApplication rec { + pname = "volctl"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "buzz"; + repo = pname; + rev = version; + sha256 = "1bqq5mrpi7qxzl37z6fj67pqappjmwhi8d8db95j3lmf16svm2xk"; + }; + + nativeBuildInputs = [ + gobject-introspection + wrapGAppsHook + ]; + + buildInputs = [ + glib + gtk3 + libpulseaudio + ]; + + pythonPath = with pythonPackages; [ + pygobject3 + ]; + + strictDeps = false; + + postPatch = '' + # The user can set a mixer application in the preferences. The + # default is pavucontrol. Do not hard code its path and hope it + # can be found in $PATH. + + substituteInPlace volctl/app.py --replace /usr/bin/pavucontrol pavucontrol + ''; + + 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 ]; + }; +} |