2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2020-07-16 07:10:59 +01:00
|
|
|
, cmake, pkg-config
|
|
|
|
# required
|
|
|
|
, libupnp, libuuid, pugixml, libiconv, sqlite, zlib, spdlog, fmt
|
|
|
|
# options
|
2021-02-02 09:24:27 +00:00
|
|
|
, enableDuktape ? true, duktape
|
|
|
|
, enableCurl ? true, curl
|
|
|
|
, enableTaglib ? true, taglib
|
|
|
|
, enableLibmagic ? true, file
|
|
|
|
, enableLibmatroska ? true, libmatroska, libebml
|
2021-02-02 09:25:06 +00:00
|
|
|
, enableAvcodec ? false, ffmpeg
|
2021-02-02 09:24:27 +00:00
|
|
|
, enableLibexif ? true, libexif
|
|
|
|
, enableExiv2 ? false, exiv2
|
|
|
|
, enableFFmpegThumbnailer ? false, ffmpegthumbnailer
|
|
|
|
, enableInotifyTools ? true, inotify-tools
|
2020-07-16 07:10:59 +01:00
|
|
|
}:
|
|
|
|
|
2021-01-15 07:07:56 +00:00
|
|
|
with lib;
|
2020-07-16 07:10:59 +01:00
|
|
|
let
|
|
|
|
optionOnOff = option: if option then "on" else "off";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "gerbera";
|
2020-10-18 10:03:52 +01:00
|
|
|
version = "1.6.4";
|
2020-07-16 07:10:59 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "gerbera";
|
|
|
|
owner = "gerbera";
|
|
|
|
rev = "v${version}";
|
2020-10-18 10:03:52 +01:00
|
|
|
sha256 = "0vkgbw2ibvfr0zffnmmws7389msyqsiw8anfad6awvkda3z3rxjm";
|
2020-07-16 07:10:59 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DWITH_JS=${optionOnOff enableDuktape}"
|
|
|
|
"-DWITH_CURL=${optionOnOff enableCurl}"
|
|
|
|
"-DWITH_TAGLIB=${optionOnOff enableTaglib}"
|
|
|
|
"-DWITH_MAGIC=${optionOnOff enableLibmagic}"
|
|
|
|
"-DWITH_MATROSKA=${optionOnOff enableLibmatroska}"
|
|
|
|
"-DWITH_AVCODEC=${optionOnOff enableAvcodec}"
|
|
|
|
"-DWITH_EXIF=${optionOnOff enableLibexif}"
|
|
|
|
"-DWITH_EXIV2=${optionOnOff enableExiv2}"
|
|
|
|
"-DWITH_FFMPEGTHUMBNAILER=${optionOnOff enableFFmpegThumbnailer}"
|
|
|
|
"-DWITH_INOTIFY=${optionOnOff enableInotifyTools}"
|
|
|
|
# systemd service will be generated alongside the service
|
|
|
|
"-DWITH_SYSTEMD=OFF"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libupnp libuuid pugixml libiconv sqlite zlib fmt.dev
|
|
|
|
spdlog
|
|
|
|
]
|
2021-02-02 09:24:27 +00:00
|
|
|
++ optionals enableDuktape [ duktape ]
|
|
|
|
++ optionals enableCurl [ curl ]
|
|
|
|
++ optionals enableTaglib [ taglib ]
|
|
|
|
++ optionals enableLibmagic [ file ]
|
|
|
|
++ optionals enableLibmatroska [ libmatroska libebml ]
|
2021-02-02 09:25:06 +00:00
|
|
|
++ optionals enableAvcodec [ ffmpeg.dev ]
|
2021-02-02 09:24:27 +00:00
|
|
|
++ optionals enableLibexif [ libexif ]
|
|
|
|
++ optionals enableExiv2 [ exiv2 ]
|
|
|
|
++ optionals enableInotifyTools [ inotify-tools ]
|
|
|
|
++ optionals enableFFmpegThumbnailer [ ffmpegthumbnailer ];
|
2020-07-16 07:10:59 +01:00
|
|
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-18 10:03:52 +01:00
|
|
|
homepage = "https://docs.gerbera.io/";
|
2020-07-16 07:10:59 +01:00
|
|
|
description = "UPnP Media Server for 2020";
|
|
|
|
longDescription = ''
|
|
|
|
Gerbera is a Mediatomb fork.
|
|
|
|
It allows to stream your digital media through your home network and consume it on all kinds
|
|
|
|
of UPnP supporting devices.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.ardumont ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|