2018-12-08 09:18:26 +00:00
|
|
|
{ stdenv, fetchurl, fontconfig, libjpeg, libcap, freetype, fribidi, pkgconfig
|
2019-04-07 14:09:38 +01:00
|
|
|
, gettext, systemd, perl, lib
|
2018-12-08 09:18:26 +00:00
|
|
|
, enableSystemd ? true
|
|
|
|
, enableBidi ? true
|
2019-04-07 14:09:38 +01:00
|
|
|
}: stdenv.mkDerivation rec {
|
2018-12-08 09:18:26 +00:00
|
|
|
|
|
|
|
name = "vdr-${version}";
|
2019-04-07 14:09:38 +01:00
|
|
|
version = "2.4.0";
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "ftp://ftp.tvdr.de/vdr/${name}.tar.bz2";
|
|
|
|
sha256 = "1klcgy9kr7n6z8d2c77j63bl8hvhx5qnqppg73f77004hzz4kbwk";
|
2018-12-08 09:18:26 +00:00
|
|
|
};
|
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
enableParallelBuilding = true;
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
postPatch = "substituteInPlace Makefile --replace libsystemd-daemon libsystemd";
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
buildInputs = [ fontconfig libjpeg libcap freetype ]
|
|
|
|
++ lib.optional enableSystemd systemd
|
|
|
|
++ lib.optional enableBidi fribidi;
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
buildFlags = [ "vdr" "i18n" ]
|
|
|
|
++ lib.optional enableSystemd "SDNOTIFY=1"
|
|
|
|
++ lib.optional enableBidi "BIDI=1";
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
nativeBuildInputs = [ perl ];
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
# plugins uses the same build environment as vdr
|
|
|
|
propagatedNativeBuildInputs = [ pkgconfig gettext ];
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
installFlags = [
|
|
|
|
"DESTDIR=$(out)"
|
|
|
|
"PREFIX=" # needs to be empty, otherwise plugins try to install at same prefix
|
|
|
|
];
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
installTargets = [ "install-pc" "install-bin" "install-doc" "install-i18n"
|
|
|
|
"install-includes" ];
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/lib/vdr # only needed if vdr is started without any plugin
|
|
|
|
mkdir -p $out/share/vdr/conf
|
|
|
|
cp *.conf $out/share/vdr/conf
|
|
|
|
'';
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
outputs = [ "out" "dev" "man" ];
|
2018-12-08 09:18:26 +00:00
|
|
|
|
2019-04-07 14:09:38 +01:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = http://www.tvdr.de/;
|
|
|
|
description = "Video Disc Recorder";
|
|
|
|
maintainers = [ maintainers.ck3d ];
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
license = licenses.gpl2;
|
2018-12-08 09:18:26 +00:00
|
|
|
};
|
|
|
|
}
|