Skip to content

Commit

Permalink
Merge pull request #84449 from doronbehar/improve-guvcview
Browse files Browse the repository at this point in the history
guvcview: fix gsettings filechooser errors
  • Loading branch information
worldofpeace authored Apr 28, 2020
2 parents e257a92 + 716c07c commit d85aabf
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 25 deletions.
55 changes: 48 additions & 7 deletions pkgs/applications/video/qstopmotion/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
{ mkDerivation, stdenv, fetchurl, qt5, ffmpeg, guvcview, cmake, ninja, libxml2
, gettext, pkgconfig, libgphoto2, gphoto2, v4l-utils, libv4l, pcre
, qwt, extra-cmake-modules }:
{ stdenv
, mkDerivation
, fetchurl
, qtbase
, qtmultimedia
, qtquickcontrols
, qtimageformats
, qtxmlpatterns
, ffmpeg
, guvcview
, cmake
, ninja
, libxml2
, gettext
, pkgconfig
, libgphoto2
, gphoto2
, v4l-utils
, libv4l
, pcre
, qwt
, extra-cmake-modules
}:

mkDerivation rec {
pname = "qstopmotion";
Expand All @@ -11,11 +31,31 @@ mkDerivation rec {
sha256 = "03r6jxyq0bak2vsy2b78nk27m7fm96hnl8cx11l3l17704j4iglh";
};

buildInputs = with qt5; [ v4l-utils libv4l pcre qtbase qtmultimedia ffmpeg guvcview
qwt qtquickcontrols qtimageformats qtxmlpatterns ];
buildInputs = [
qtbase
qtmultimedia
qtquickcontrols
qtimageformats
qtxmlpatterns
v4l-utils
libv4l
pcre
ffmpeg
guvcview
qwt
];

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 \
Expand All @@ -36,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;
};
}
73 changes: 57 additions & 16 deletions pkgs/os-specific/linux/guvcview/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
{ config, stdenv, fetchurl, intltool, pkgconfig
, gtk3, portaudio, SDL2, ffmpeg, udev, libusb1, libv4l, alsaLib, gsl
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null }:
{ config
, stdenv
, fetchurl
, intltool
, pkgconfig
, portaudio
, SDL2
, ffmpeg
, udev
, libusb1
, libv4l
, alsaLib
, gsl
, libpng
, sfml
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
, libpulseaudio ? null
, useQt ? false
, qtbase ? null
, wrapQtAppsHook ? null
# can be turned off if used as a library
, useGtk ? true
, gtk3 ? null
, wrapGAppsHook ? null
}:

assert pulseaudioSupport -> libpulseaudio != null;

Expand All @@ -13,19 +35,38 @@ stdenv.mkDerivation rec {
sha256 = "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m";
};

buildInputs =
[ SDL2
alsaLib
ffmpeg
gtk3
intltool
libusb1
libv4l
pkgconfig
portaudio
udev
gsl
] ++ stdenv.lib.optional pulseaudioSupport libpulseaudio;
nativeBuildInputs = [
intltool
pkgconfig
]
++ stdenv.lib.optionals (useGtk) [ wrapGAppsHook ]
++ stdenv.lib.optionals (useQt) [ wrapQtAppsHook ]
;

buildInputs = [
SDL2
alsaLib
ffmpeg
libusb1
libv4l
portaudio
udev
gsl
libpng
sfml
]
++ stdenv.lib.optionals (pulseaudioSupport) [ libpulseaudio ]
++ stdenv.lib.optionals (useGtk) [ gtk3 ]
++ stdenv.lib.optionals (useQt) [
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";
Expand Down
9 changes: 7 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19819,7 +19819,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 { };

Expand Down Expand Up @@ -21473,7 +21473,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 { };

Expand Down

0 comments on commit d85aabf

Please sign in to comment.