2020-04-06 21:45:54 +01:00
|
|
|
{ config
|
2021-01-11 07:54:33 +00:00
|
|
|
, lib, stdenv
|
2020-04-06 21:45:54 +01:00
|
|
|
, fetchurl
|
|
|
|
, intltool
|
|
|
|
, pkgconfig
|
|
|
|
, portaudio
|
|
|
|
, SDL2
|
2020-07-04 09:01:00 +01:00
|
|
|
, ffmpeg
|
2020-04-06 21:45:54 +01:00
|
|
|
, udev
|
|
|
|
, libusb1
|
|
|
|
, libv4l
|
|
|
|
, alsaLib
|
|
|
|
, gsl
|
2020-04-06 21:46:21 +01:00
|
|
|
, libpng
|
|
|
|
, sfml
|
2020-04-06 21:45:54 +01:00
|
|
|
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
|
|
|
, libpulseaudio ? null
|
2020-04-06 21:46:21 +01:00
|
|
|
, useQt ? false
|
2020-04-25 19:14:40 +01:00
|
|
|
, qtbase ? null
|
2020-04-06 21:46:21 +01:00
|
|
|
, wrapQtAppsHook ? null
|
|
|
|
# can be turned off if used as a library
|
|
|
|
, useGtk ? true
|
|
|
|
, gtk3 ? null
|
|
|
|
, wrapGAppsHook ? null
|
2020-04-06 21:45:54 +01:00
|
|
|
}:
|
2016-01-05 08:59:26 +00:00
|
|
|
|
|
|
|
assert pulseaudioSupport -> libpulseaudio != null;
|
2014-02-06 22:00:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-02-06 07:52:43 +00:00
|
|
|
version = "2.0.6";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "guvcview";
|
2014-02-06 22:00:59 +00:00
|
|
|
|
2016-01-05 08:44:18 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/guvcview/source/guvcview-src-${version}.tar.gz";
|
2019-02-06 07:52:43 +00:00
|
|
|
sha256 = "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m";
|
2014-02-06 22:00:59 +00:00
|
|
|
};
|
|
|
|
|
2020-04-06 08:37:41 +01:00
|
|
|
nativeBuildInputs = [
|
2020-04-06 17:51:34 +01:00
|
|
|
intltool
|
|
|
|
pkgconfig
|
2020-04-06 21:46:21 +01:00
|
|
|
]
|
|
|
|
++ stdenv.lib.optionals (useGtk) [ wrapGAppsHook ]
|
|
|
|
++ stdenv.lib.optionals (useQt) [ wrapQtAppsHook ]
|
|
|
|
;
|
2020-04-06 08:37:41 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
alsaLib
|
2020-07-04 09:01:00 +01:00
|
|
|
ffmpeg
|
2020-04-06 08:37:41 +01:00
|
|
|
libusb1
|
|
|
|
libv4l
|
|
|
|
portaudio
|
|
|
|
udev
|
|
|
|
gsl
|
2020-04-06 21:46:21 +01:00
|
|
|
libpng
|
|
|
|
sfml
|
2021-01-11 07:54:33 +00:00
|
|
|
]
|
2020-04-06 21:46:21 +01:00
|
|
|
++ stdenv.lib.optionals (pulseaudioSupport) [ libpulseaudio ]
|
|
|
|
++ stdenv.lib.optionals (useGtk) [ gtk3 ]
|
|
|
|
++ stdenv.lib.optionals (useQt) [
|
2020-04-25 19:14:40 +01:00
|
|
|
qtbase
|
2020-04-06 21:46:21 +01:00
|
|
|
]
|
|
|
|
;
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-sfml"
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optionals (useGtk) [ "--enable-gtk3" ]
|
|
|
|
++ stdenv.lib.optionals (useQt) [ "--enable-qt5" ]
|
|
|
|
;
|
2014-02-06 22:00:59 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-02-06 22:00:59 +00:00
|
|
|
description = "A simple interface for devices supported by the linux UVC driver";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://guvcview.sourceforge.net";
|
2018-08-29 23:22:31 +01:00
|
|
|
maintainers = [ maintainers.coconnor ];
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2014-02-06 22:00:59 +00:00
|
|
|
};
|
|
|
|
}
|