nixpkgs/pkgs/os-specific/linux/guvcview/default.nix

79 lines
1.6 KiB
Nix
Raw Normal View History

2020-04-06 20:45:54 +00:00
{ config
, stdenv
, fetchurl
, intltool
, pkgconfig
, portaudio
, SDL2
2020-07-04 08:01:00 +00:00
, ffmpeg
2020-04-06 20:45:54 +00:00
, udev
, libusb1
, libv4l
, alsaLib
, gsl
, libpng
, sfml
2020-04-06 20:45:54 +00:00
, pulseaudioSupport ? config.pulseaudio or stdenv.isLinux
, libpulseaudio ? null
, useQt ? false
2020-04-25 18:14:40 +00:00
, qtbase ? null
, 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
}:
assert pulseaudioSupport -> libpulseaudio != null;
2014-02-06 22:00:59 +00:00
stdenv.mkDerivation rec {
version = "2.0.6";
pname = "guvcview";
2014-02-06 22:00:59 +00:00
src = fetchurl {
url = "mirror://sourceforge/project/guvcview/source/guvcview-src-${version}.tar.gz";
sha256 = "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m";
2014-02-06 22:00:59 +00:00
};
nativeBuildInputs = [
intltool
pkgconfig
]
++ stdenv.lib.optionals (useGtk) [ wrapGAppsHook ]
++ stdenv.lib.optionals (useQt) [ wrapQtAppsHook ]
;
buildInputs = [
SDL2
alsaLib
2020-07-04 08:01:00 +00:00
ffmpeg
libusb1
libv4l
portaudio
udev
gsl
libpng
sfml
]
++ stdenv.lib.optionals (pulseaudioSupport) [ libpulseaudio ]
++ stdenv.lib.optionals (useGtk) [ gtk3 ]
++ stdenv.lib.optionals (useQt) [
2020-04-25 18:14:40 +00:00
qtbase
]
;
configureFlags = [
"--enable-sfml"
]
++ stdenv.lib.optionals (useGtk) [ "--enable-gtk3" ]
++ stdenv.lib.optionals (useQt) [ "--enable-qt5" ]
;
2014-02-06 22:00:59 +00:00
2018-08-29 22:22:31 +00:00
meta = with stdenv.lib; {
2014-02-06 22:00:59 +00:00
description = "A simple interface for devices supported by the linux UVC driver";
homepage = "http://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
};
}