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

79 lines
1.5 KiB
Nix
Raw Normal View History

2020-04-06 20:45:54 +00:00
{ config
, lib, stdenv
2020-04-06 20:45:54 +00:00
, fetchurl
, intltool
, pkg-config
2020-04-06 20:45:54 +00:00
, 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
pkg-config
]
2021-01-15 14:45:37 +00:00
++ lib.optionals (useGtk) [ wrapGAppsHook ]
++ lib.optionals (useQt) [ wrapQtAppsHook ]
;
buildInputs = [
SDL2
alsaLib
2020-07-04 08:01:00 +00:00
ffmpeg
libusb1
libv4l
portaudio
udev
gsl
libpng
sfml
]
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
]
;
configureFlags = [
"--enable-sfml"
]
2021-01-15 14:45:37 +00:00
++ lib.optionals (useGtk) [ "--enable-gtk3" ]
++ lib.optionals (useQt) [ "--enable-qt5" ]
;
2014-02-06 22:00:59 +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";
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
};
}