2020-05-03 17:38:23 +00:00
|
|
|
{ config
|
2021-01-15 22:18:51 +00:00
|
|
|
, lib, stdenv
|
2020-05-03 17:38:23 +00:00
|
|
|
, fetchurl
|
|
|
|
, intltool
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-05-03 17:38:23 +00:00
|
|
|
, portaudio
|
|
|
|
, SDL2
|
2020-07-18 16:06:22 +00:00
|
|
|
, ffmpeg
|
2020-05-03 17:38:23 +00:00
|
|
|
, 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
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
assert pulseaudioSupport -> libpulseaudio != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "2.0.6";
|
|
|
|
pname = "guvcview";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/guvcview/source/guvcview-src-${version}.tar.gz";
|
|
|
|
sha256 = "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m";
|
|
|
|
};
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
intltool
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-05-03 17:38:23 +00:00
|
|
|
]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optionals (useGtk) [ wrapGAppsHook ]
|
|
|
|
++ lib.optionals (useQt) [ wrapQtAppsHook ]
|
2020-05-03 17:38:23 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
alsaLib
|
2020-07-18 16:06:22 +00:00
|
|
|
ffmpeg
|
2020-05-03 17:38:23 +00:00
|
|
|
libusb1
|
|
|
|
libv4l
|
|
|
|
portaudio
|
|
|
|
udev
|
|
|
|
gsl
|
|
|
|
libpng
|
|
|
|
sfml
|
2021-01-15 22:18:51 +00:00
|
|
|
]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optionals (pulseaudioSupport) [ libpulseaudio ]
|
|
|
|
++ lib.optionals (useGtk) [ gtk3 ]
|
|
|
|
++ lib.optionals (useQt) [
|
2020-05-03 17:38:23 +00:00
|
|
|
qtbase
|
|
|
|
]
|
|
|
|
;
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-sfml"
|
|
|
|
]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optionals (useGtk) [ "--enable-gtk3" ]
|
|
|
|
++ lib.optionals (useQt) [ "--enable-qt5" ]
|
2020-05-03 17:38:23 +00:00
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A simple interface for devices supported by the linux UVC driver";
|
|
|
|
homepage = "http://guvcview.sourceforge.net";
|
|
|
|
maintainers = [ maintainers.coconnor ];
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|