From 021000482b9e4e25c468faf160536508dd8a72ab Mon Sep 17 00:00:00 2001 From: rewine <1758075541@qq.com> Date: Tue, 26 Apr 2022 19:31:06 +0800 Subject: [PATCH 1/4] libviperfx: init at unstable-2018-01-15 --- .../libraries/libviperfx/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/libraries/libviperfx/default.nix diff --git a/pkgs/development/libraries/libviperfx/default.nix b/pkgs/development/libraries/libviperfx/default.nix new file mode 100644 index 000000000000..3c980823f410 --- /dev/null +++ b/pkgs/development/libraries/libviperfx/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "libviperfx"; + version = "unstable-2018-01-15"; + + src = fetchFromGitHub { + owner = "vipersaudio"; + repo = "viperfx_core_binary"; + rev = "6f7d0da725affe854f083baf5d90c70e172e4488"; + sha256 = "sha256-hfX46Kk91eQgiO3uhew91I6eEHxazhdGwSkhfNZ+HvQ="; + }; + + dontBuild = true; + + installPhase = '' + runHook preInstall + install -D libviperfx_x64_linux.so $out/lib/libviperfx.so + install -D README.md $out/share/licenses/libviperfx/LICENSE + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/vipersaudio/viperfx_core_binary"; + description = "The ViPER FX core"; + license = licenses.unfreeRedistributable; + maintainers = with maintainers; [ rewine ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index db85ec622476..65a5904a58f0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19266,6 +19266,8 @@ with pkgs; libviper = callPackage ../development/libraries/libviper { }; + libviperfx = callPackage ../development/libraries/libviperfx { }; + libvpx = callPackage ../development/libraries/libvpx { }; libvpx_1_8 = callPackage ../development/libraries/libvpx/1_8.nix { }; From a91c02d3752dc9110ee75fe7dfba26708d561745 Mon Sep 17 00:00:00 2001 From: rewine <1758075541@qq.com> Date: Tue, 26 Apr 2022 19:32:29 +0800 Subject: [PATCH 2/4] gst-plugins-viperfx: init at unstable-2020-09-20 --- .../libraries/gstreamer/default.nix | 2 + .../libraries/gstreamer/viperfx/default.nix | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/libraries/gstreamer/viperfx/default.nix diff --git a/pkgs/development/libraries/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/default.nix index d1c7233f0d48..9b67dd49c82b 100644 --- a/pkgs/development/libraries/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/default.nix @@ -13,6 +13,8 @@ gst-plugins-ugly = callPackage ./ugly { inherit CoreFoundation DiskArbitration IOKit; }; + gst-plugins-viperfx = callPackage ./viperfx { }; + gst-rtsp-server = callPackage ./rtsp-server { }; gst-libav = callPackage ./libav { }; diff --git a/pkgs/development/libraries/gstreamer/viperfx/default.nix b/pkgs/development/libraries/gstreamer/viperfx/default.nix new file mode 100644 index 000000000000..83c7d75e98c1 --- /dev/null +++ b/pkgs/development/libraries/gstreamer/viperfx/default.nix @@ -0,0 +1,41 @@ +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, wrapGAppsHook +, gst_all_1 +, cmake +}: +stdenv.mkDerivation rec { + pname = "gst-plugins-viperfx"; + version = "unstable-2020-9-20"; + + src = fetchFromGitHub { + owner = "Audio4Linux"; + repo = "gst-plugin-viperfx"; + rev = "a5c1b03dfe1ab0822b717a5f9392e9f1237fdba0"; + sha256 = "sha256-0so4jV56nl3tZHuZpvtyMrpOZ4tNJ59Pyj6zbV5bJ5Y="; + }; + + nativeBuildInputs = [ cmake pkg-config wrapGAppsHook ]; + + propagatedBuildInputs = [ + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + ]; + + installPhase = '' + runHook preInstall + install -D libgstviperfx.so $out/lib/gstreamer-1.0/libgstviperfx.so + install -D $src/COPYING $out/share/licenses/gst-plugins-viperfx/LICENSE + runHook postInstall + ''; + + meta = with lib; { + description = "ViPER FX core wrapper plug-in for GStreamer1"; + homepage = "https://github.com/Audio4Linux/gst-plugin-viperfx"; + license = licenses.unfreeRedistributable; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ rewine ]; + }; +} From 9fcfb14035fa8d4d77010eff7caf6db61f01a25e Mon Sep 17 00:00:00 2001 From: rewine <1758075541@qq.com> Date: Tue, 26 Apr 2022 19:34:55 +0800 Subject: [PATCH 3/4] viper4linux: init at unstable-2022-03-13 --- .../audio/viper4linux/default.nix | 61 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/applications/audio/viper4linux/default.nix diff --git a/pkgs/applications/audio/viper4linux/default.nix b/pkgs/applications/audio/viper4linux/default.nix new file mode 100644 index 000000000000..118af6853e5a --- /dev/null +++ b/pkgs/applications/audio/viper4linux/default.nix @@ -0,0 +1,61 @@ +{ lib +, stdenv +, fetchFromGitHub +, pkg-config +, gst_all_1 +, libviperfx +, makeWrapper +}: +let + gstPluginPath = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with gst_all_1; [ gstreamer gst-plugins-viperfx gst-plugins-base gst-plugins-good ]); +in +stdenv.mkDerivation rec { + pname = "viper4linux"; + version = "unstable-2022-03-13"; + + src = fetchFromGitHub { + owner = "Audio4Linux"; + repo = "Viper4Linux"; + rev = "5da25644824f88cf0db24378d2c84770ba4f6816"; + sha256 = "sha256-CJNVr/1ehJzX45mxunXcRAypBBGEBdswOzAVG2H+ayg="; + }; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-viperfx + libviperfx + ]; + + dontBuild = true; + + postPatch = '' + substituteInPlace viper --replace "/etc/viper4linux" "$out/etc/viper4linux" + ''; + + installPhase = '' + runHook preInstall + install -D viper -t $out/bin + mkdir -p $out/etc/viper4linux + cp -r viper4linux/* $out/etc/viper4linux + runHook postInstall + ''; + + postFixup = '' + wrapProgram "$out/bin/viper" \ + --prefix PATH : $out/bin:${lib.makeBinPath [ gst_all_1.gstreamer ]} \ + --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${gstPluginPath} \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libviperfx ]} + ''; + + meta = with lib; { + description = "An Adaptive Digital Sound Processor"; + homepage = "https://github.com/Audio4Linux/Viper4Linux"; + license = licenses.gpl3Plus; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ rewine ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 65a5904a58f0..feaabf746aff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30220,6 +30220,8 @@ with pkgs; uvcdynctrl = callPackage ../os-specific/linux/uvcdynctrl { }; + viper4linux = callPackage ../applications/audio/viper4linux { }; + vkeybd = callPackage ../applications/audio/vkeybd {}; vlc = libsForQt5.callPackage ../applications/video/vlc { From 8a61369c4582061f0a9f32cc4bf49b954be1ecdd Mon Sep 17 00:00:00 2001 From: rewine <1758075541@qq.com> Date: Tue, 26 Apr 2022 19:47:09 +0800 Subject: [PATCH 4/4] viper4linux-gui: init at unstable-2022-04-23 --- .../audio/viper4linux-gui/default.nix | 82 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 83 insertions(+) create mode 100644 pkgs/applications/audio/viper4linux-gui/default.nix diff --git a/pkgs/applications/audio/viper4linux-gui/default.nix b/pkgs/applications/audio/viper4linux-gui/default.nix new file mode 100644 index 000000000000..be495aa9c93b --- /dev/null +++ b/pkgs/applications/audio/viper4linux-gui/default.nix @@ -0,0 +1,82 @@ +{ lib +, stdenv +, fetchFromGitHub +, copyDesktopItems +, pkg-config +, qtbase +, qtsvg +, qtmultimedia +, qmake +, gst_all_1 +, libpulseaudio +, makeDesktopItem +, viper4linux +, wrapQtAppsHook +}: +let + gstPluginPath = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with gst_all_1; [ gstreamer gst-plugins-viperfx gst-plugins-base gst-plugins-good ]); +in +stdenv.mkDerivation rec { + pname = "viper4linux-gui"; + version = "unstable-2022-04-23"; + + src = fetchFromGitHub { + owner = "Audio4Linux"; + repo = "Viper4Linux-GUI"; + rev = "2d0c84d7dda76c59e31c850e38120002eb779b7a"; + sha256 = "sha256-5YlLCF598i/sldczPEgCB+1KJDA7jqM964QDSNjgTKM="; + }; + + desktopItems = [ + (makeDesktopItem { + name = pname; + exec = "viper-gui"; + icon = "viper"; + desktopName = "viper4linux"; + genericName = "Equalizer"; + comment = meta.description; + categories = [ "AudioVideo" "Audio" ]; + startupNotify = false; + }) + ]; + + nativeBuildInputs = [ + qmake + pkg-config + wrapQtAppsHook + copyDesktopItems + ]; + + buildInputs = [ + qtbase + qtmultimedia + qtsvg + gst_all_1.gstreamer + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-viperfx + libpulseaudio + viper4linux + ]; + + qmakeFlags = [ "V4L_Frontend.pro" ]; + + qtWrapperArgs = [ + "--prefix PATH : ${lib.makeBinPath [ viper4linux gst_all_1.gstreamer ]}" + "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${gstPluginPath}" + ]; + + installPhase = '' + runHook preInstalli + install -D V4L_Frontend $out/bin/viper-gui + install -D icons/viper.png $out/share/icons/viper.png + runHook postInstall + ''; + + meta = with lib; { + description = "Official UI for Viper4Linux2"; + homepage = "https://github.com/Audio4Linux/Viper4Linux-GUI"; + license = licenses.gpl3Plus; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ rewine ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index feaabf746aff..ceb8d04e1e15 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30221,6 +30221,7 @@ with pkgs; uvcdynctrl = callPackage ../os-specific/linux/uvcdynctrl { }; viper4linux = callPackage ../applications/audio/viper4linux { }; + viper4linux-gui = libsForQt5.callPackage ../applications/audio/viper4linux-gui { }; vkeybd = callPackage ../applications/audio/vkeybd {};