From d89ed04ea4670664d637fc80129ad03561b53fea Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 6 Apr 2020 10:37:41 +0300 Subject: [PATCH 1/9] guvcview: fix gsettings filechooser errors --- pkgs/os-specific/linux/guvcview/default.nix | 32 ++++++++++++--------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/pkgs/os-specific/linux/guvcview/default.nix b/pkgs/os-specific/linux/guvcview/default.nix index e87768a9ff13..c74978ac0446 100644 --- a/pkgs/os-specific/linux/guvcview/default.nix +++ b/pkgs/os-specific/linux/guvcview/default.nix @@ -1,5 +1,5 @@ { config, stdenv, fetchurl, intltool, pkgconfig -, gtk3, portaudio, SDL2, ffmpeg, udev, libusb1, libv4l, alsaLib, gsl +, gtk3, portaudio, SDL2, ffmpeg, udev, libusb1, libv4l, alsaLib, gsl, wrapGAppsHook , pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null }: assert pulseaudioSupport -> libpulseaudio != null; @@ -13,19 +13,23 @@ stdenv.mkDerivation rec { sha256 = "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m"; }; - buildInputs = - [ SDL2 - alsaLib - ffmpeg - gtk3 - intltool - libusb1 - libv4l - pkgconfig - portaudio - udev - gsl - ] ++ stdenv.lib.optional pulseaudioSupport libpulseaudio; + nativeBuildInputs = [ + wrapGAppsHook + ]; + + buildInputs = [ + SDL2 + alsaLib + ffmpeg + gtk3 + intltool + libusb1 + libv4l + pkgconfig + portaudio + udev + gsl + ] ++ stdenv.lib.optional pulseaudioSupport libpulseaudio; meta = with stdenv.lib; { description = "A simple interface for devices supported by the linux UVC driver"; From 6bac53e691cc0c4ead541977669b420e419cb860 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 6 Apr 2020 19:51:34 +0300 Subject: [PATCH 2/9] guvcview: move some packages to nativeBuildInputs --- pkgs/os-specific/linux/guvcview/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/guvcview/default.nix b/pkgs/os-specific/linux/guvcview/default.nix index c74978ac0446..0f120ba01719 100644 --- a/pkgs/os-specific/linux/guvcview/default.nix +++ b/pkgs/os-specific/linux/guvcview/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ + intltool + pkgconfig wrapGAppsHook ]; @@ -22,10 +24,8 @@ stdenv.mkDerivation rec { alsaLib ffmpeg gtk3 - intltool libusb1 libv4l - pkgconfig portaudio udev gsl From ac0f42dee8e37f9fd54b597c53635a490a7262d8 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 6 Apr 2020 23:45:54 +0300 Subject: [PATCH 3/9] guvcview: format arguments --- pkgs/os-specific/linux/guvcview/default.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/guvcview/default.nix b/pkgs/os-specific/linux/guvcview/default.nix index 0f120ba01719..fa525170056c 100644 --- a/pkgs/os-specific/linux/guvcview/default.nix +++ b/pkgs/os-specific/linux/guvcview/default.nix @@ -1,6 +1,21 @@ -{ config, stdenv, fetchurl, intltool, pkgconfig -, gtk3, portaudio, SDL2, ffmpeg, udev, libusb1, libv4l, alsaLib, gsl, wrapGAppsHook -, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null }: +{ config +, stdenv +, fetchurl +, intltool +, pkgconfig +, gtk3 +, portaudio +, SDL2 +, ffmpeg +, udev +, libusb1 +, libv4l +, alsaLib +, gsl +, wrapGAppsHook +, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux +, libpulseaudio ? null +}: assert pulseaudioSupport -> libpulseaudio != null; From 6aaab573e276e05712ed9552835d4b7cb4232695 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 6 Apr 2020 23:46:21 +0300 Subject: [PATCH 4/9] guvcview: enable to build with both qt5 and gtk3 --- pkgs/os-specific/linux/guvcview/default.nix | 34 +++++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/guvcview/default.nix b/pkgs/os-specific/linux/guvcview/default.nix index fa525170056c..0efdbcede483 100644 --- a/pkgs/os-specific/linux/guvcview/default.nix +++ b/pkgs/os-specific/linux/guvcview/default.nix @@ -3,7 +3,6 @@ , fetchurl , intltool , pkgconfig -, gtk3 , portaudio , SDL2 , ffmpeg @@ -12,9 +11,17 @@ , libv4l , alsaLib , gsl -, wrapGAppsHook +, libpng +, sfml , pulseaudioSupport ? config.pulseaudio or stdenv.isLinux , libpulseaudio ? null +, useQt ? false +, qt5 ? null +, wrapQtAppsHook ? null +# can be turned off if used as a library +, useGtk ? true +, gtk3 ? null +, wrapGAppsHook ? null }: assert pulseaudioSupport -> libpulseaudio != null; @@ -31,20 +38,35 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ intltool pkgconfig - wrapGAppsHook - ]; + ] + ++ stdenv.lib.optionals (useGtk) [ wrapGAppsHook ] + ++ stdenv.lib.optionals (useQt) [ wrapQtAppsHook ] + ; buildInputs = [ SDL2 alsaLib ffmpeg - gtk3 libusb1 libv4l portaudio udev gsl - ] ++ stdenv.lib.optional pulseaudioSupport libpulseaudio; + libpng + sfml + ] + ++ stdenv.lib.optionals (pulseaudioSupport) [ libpulseaudio ] + ++ stdenv.lib.optionals (useGtk) [ gtk3 ] + ++ stdenv.lib.optionals (useQt) [ + qt5.qtbase + ] + ; + configureFlags = [ + "--enable-sfml" + ] + ++ stdenv.lib.optionals (useGtk) [ "--enable-gtk3" ] + ++ stdenv.lib.optionals (useQt) [ "--enable-qt5" ] + ; meta = with stdenv.lib; { description = "A simple interface for devices supported by the linux UVC driver"; From 1bfde2e0ce144059098f9a8c82fd008834c26acd Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 6 Apr 2020 23:47:51 +0300 Subject: [PATCH 5/9] qstopmotion: use more suitable guvcview build --- pkgs/top-level/all-packages.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f182b6d250cf..2a05c25bd861 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21502,7 +21502,12 @@ in qsyncthingtray = libsForQt5.callPackage ../applications/misc/qsyncthingtray { }; - qstopmotion = libsForQt5.callPackage ../applications/video/qstopmotion { }; + qstopmotion = libsForQt5.callPackage ../applications/video/qstopmotion { + guvcview = guvcview.override { + useQt = true; + useGtk = false; + }; + }; qsynth = libsForQt5.callPackage ../applications/audio/qsynth { }; From f04b40ae4be7cb0790839d4539baf636639edbed Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 25 Apr 2020 20:33:40 +0300 Subject: [PATCH 6/9] qstopmotion: format inputs and arguments --- .../video/qstopmotion/default.nix | 50 ++++++++++++++++--- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/video/qstopmotion/default.nix b/pkgs/applications/video/qstopmotion/default.nix index 4a6d2a05a670..ec1df91bbfc3 100644 --- a/pkgs/applications/video/qstopmotion/default.nix +++ b/pkgs/applications/video/qstopmotion/default.nix @@ -1,6 +1,22 @@ -{ mkDerivation, stdenv, fetchurl, qt5, ffmpeg, guvcview, cmake, ninja, libxml2 -, gettext, pkgconfig, libgphoto2, gphoto2, v4l-utils, libv4l, pcre -, qwt, extra-cmake-modules }: +{ stdenv +, mkDerivation +, fetchurl +, qt5 +, ffmpeg +, guvcview +, cmake +, ninja +, libxml2 +, gettext +, pkgconfig +, libgphoto2 +, gphoto2 +, v4l-utils +, libv4l +, pcre +, qwt +, extra-cmake-modules +}: mkDerivation rec { pname = "qstopmotion"; @@ -11,11 +27,31 @@ mkDerivation rec { sha256 = "03r6jxyq0bak2vsy2b78nk27m7fm96hnl8cx11l3l17704j4iglh"; }; - buildInputs = with qt5; [ v4l-utils libv4l pcre qtbase qtmultimedia ffmpeg guvcview - qwt qtquickcontrols qtimageformats qtxmlpatterns ]; + buildInputs = with qt5; [ + v4l-utils + libv4l + pcre + qtbase + qtmultimedia + ffmpeg + guvcview + qwt + qtquickcontrols + qtimageformats + qtxmlpatterns + ]; - nativeBuildInputs = [ pkgconfig cmake extra-cmake-modules ninja - gettext libgphoto2 gphoto2 libxml2 libv4l ]; + nativeBuildInputs = [ + pkgconfig + cmake + extra-cmake-modules + ninja + gettext + libgphoto2 + gphoto2 + libxml2 + libv4l + ]; patchPhase = '' substituteInPlace CMakeLists.txt \ From 59588b68cd185a21b917daabc057dcd42a6803d8 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 25 Apr 2020 21:14:40 +0300 Subject: [PATCH 7/9] guvcview: use libsForQt5.callPackage --- pkgs/os-specific/linux/guvcview/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/guvcview/default.nix b/pkgs/os-specific/linux/guvcview/default.nix index 0efdbcede483..d780cade7865 100644 --- a/pkgs/os-specific/linux/guvcview/default.nix +++ b/pkgs/os-specific/linux/guvcview/default.nix @@ -16,7 +16,7 @@ , pulseaudioSupport ? config.pulseaudio or stdenv.isLinux , libpulseaudio ? null , useQt ? false -, qt5 ? null +, qtbase ? null , wrapQtAppsHook ? null # can be turned off if used as a library , useGtk ? true @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optionals (pulseaudioSupport) [ libpulseaudio ] ++ stdenv.lib.optionals (useGtk) [ gtk3 ] ++ stdenv.lib.optionals (useQt) [ - qt5.qtbase + qtbase ] ; configureFlags = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2a05c25bd861..5b773bf5929a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19848,7 +19848,7 @@ in gvisor-containerd-shim = callPackage ../applications/virtualization/gvisor/containerd-shim.nix { }; - guvcview = callPackage ../os-specific/linux/guvcview { }; + guvcview = libsForQt5.callPackage ../os-specific/linux/guvcview { }; gxmessage = callPackage ../applications/misc/gxmessage { }; From f0b1ace47346edeaade2e271227a5288128e1f8f Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 25 Apr 2020 21:18:23 +0300 Subject: [PATCH 8/9] qstopmotion: use libsForQt5.callPackage properly --- .../video/qstopmotion/default.nix | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/video/qstopmotion/default.nix b/pkgs/applications/video/qstopmotion/default.nix index ec1df91bbfc3..4491e7a1574c 100644 --- a/pkgs/applications/video/qstopmotion/default.nix +++ b/pkgs/applications/video/qstopmotion/default.nix @@ -1,7 +1,11 @@ { stdenv , mkDerivation , fetchurl -, qt5 +, qtbase +, qtmultimedia +, qtquickcontrols +, qtimageformats +, qtxmlpatterns , ffmpeg , guvcview , cmake @@ -27,18 +31,18 @@ mkDerivation rec { sha256 = "03r6jxyq0bak2vsy2b78nk27m7fm96hnl8cx11l3l17704j4iglh"; }; - buildInputs = with qt5; [ - v4l-utils - libv4l - pcre + buildInputs = [ qtbase qtmultimedia - ffmpeg - guvcview - qwt qtquickcontrols qtimageformats qtxmlpatterns + v4l-utils + libv4l + pcre + ffmpeg + guvcview + qwt ]; nativeBuildInputs = [ From 716c07c73c8aa30d58787455f4f20fb408cfe1f9 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sat, 25 Apr 2020 23:04:18 +0300 Subject: [PATCH 9/9] qstopmotion: mark as broken for aarch64 --- pkgs/applications/video/qstopmotion/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/video/qstopmotion/default.nix b/pkgs/applications/video/qstopmotion/default.nix index 4491e7a1574c..98af60c49379 100644 --- a/pkgs/applications/video/qstopmotion/default.nix +++ b/pkgs/applications/video/qstopmotion/default.nix @@ -76,6 +76,7 @@ mkDerivation rec { license = stdenv.lib.licenses.gpl2Plus; maintainers = [ maintainers.leenaars ]; + broken = stdenv.isAarch64; platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; }; }