2020-04-06 20:45:54 +00:00
|
|
|
{ config
|
2021-01-11 07:54:33 +00:00
|
|
|
, lib, stdenv
|
2020-04-06 20:45:54 +00:00
|
|
|
, fetchurl
|
|
|
|
, intltool
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2020-04-06 20:45:54 +00:00
|
|
|
, portaudio
|
|
|
|
, SDL2
|
2023-03-03 18:41:10 +00:00
|
|
|
, ffmpeg_4
|
2020-04-06 20:45:54 +00:00
|
|
|
, udev
|
|
|
|
, libusb1
|
|
|
|
, libv4l
|
2021-06-10 02:57:09 +00:00
|
|
|
, alsa-lib
|
2020-04-06 20:45:54 +00:00
|
|
|
, gsl
|
2020-04-06 20:46:21 +00:00
|
|
|
, libpng
|
|
|
|
, sfml
|
2020-04-06 20:45:54 +00:00
|
|
|
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
|
|
|
|
, libpulseaudio ? null
|
2020-04-06 20:46:21 +00:00
|
|
|
, useQt ? false
|
2020-04-25 18:14:40 +00:00
|
|
|
, qtbase ? null
|
2020-04-06 20:46:21 +00:00
|
|
|
, wrapQtAppsHook ? null
|
|
|
|
# can be turned off if used as a library
|
|
|
|
, useGtk ? true
|
|
|
|
, gtk3 ? null
|
|
|
|
, wrapGAppsHook ? null
|
2020-04-06 20:45:54 +00: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 12:41:18 +00: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 07:37:41 +00:00
|
|
|
nativeBuildInputs = [
|
2020-04-06 16:51:34 +00:00
|
|
|
intltool
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2020-04-06 20:46:21 +00:00
|
|
|
]
|
2021-01-15 14:45:37 +00:00
|
|
|
++ lib.optionals (useGtk) [ wrapGAppsHook ]
|
|
|
|
++ lib.optionals (useQt) [ wrapQtAppsHook ]
|
2020-04-06 20:46:21 +00:00
|
|
|
;
|
2020-04-06 07:37:41 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
2021-06-10 02:57:09 +00:00
|
|
|
alsa-lib
|
2023-03-03 18:41:10 +00:00
|
|
|
ffmpeg_4
|
2020-04-06 07:37:41 +00:00
|
|
|
libusb1
|
|
|
|
libv4l
|
|
|
|
portaudio
|
|
|
|
udev
|
|
|
|
gsl
|
2020-04-06 20:46:21 +00:00
|
|
|
libpng
|
|
|
|
sfml
|
2021-01-11 07:54:33 +00:00
|
|
|
]
|
2021-01-15 14:45:37 +00:00
|
|
|
++ lib.optionals (pulseaudioSupport) [ libpulseaudio ]
|
|
|
|
++ lib.optionals (useGtk) [ gtk3 ]
|
|
|
|
++ lib.optionals (useQt) [
|
2020-04-25 18:14:40 +00:00
|
|
|
qtbase
|
2020-04-06 20:46:21 +00:00
|
|
|
]
|
|
|
|
;
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-sfml"
|
|
|
|
]
|
2021-01-15 14:45:37 +00:00
|
|
|
++ lib.optionals (useGtk) [ "--enable-gtk3" ]
|
|
|
|
++ lib.optionals (useQt) [ "--enable-qt5" ]
|
2020-04-06 20:46:21 +00:00
|
|
|
;
|
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";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "guvcview";
|
2023-02-19 20:43:38 +00:00
|
|
|
homepage = "https://guvcview.sourceforge.net";
|
2018-08-29 22:22:31 +00:00
|
|
|
maintainers = [ maintainers.coconnor ];
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2014-02-06 22:00:59 +00:00
|
|
|
};
|
|
|
|
}
|