Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 89 lines 1.6 kB view raw
1{ 2 stdenv, 3 fetchgit, 4 fontconfig, 5 libjpeg, 6 libcap, 7 freetype, 8 fribidi, 9 pkg-config, 10 gettext, 11 systemd, 12 perl, 13 lib, 14 enableSystemd ? true, 15 enableBidi ? true, 16}: 17stdenv.mkDerivation rec { 18 19 pname = "vdr"; 20 version = "2.6.9"; 21 22 src = fetchgit { 23 url = "git://git.tvdr.de/vdr.git"; 24 rev = version; 25 hash = "sha256-0Metur3+fQhomf+ClY9zXijNsr5wWkaqnzjUNXjsjss="; 26 }; 27 28 enableParallelBuilding = true; 29 30 postPatch = "substituteInPlace Makefile --replace libsystemd-daemon libsystemd"; 31 32 buildInputs = [ 33 fontconfig 34 libjpeg 35 libcap 36 freetype 37 perl 38 ] 39 ++ lib.optional enableSystemd systemd 40 ++ lib.optional enableBidi fribidi; 41 42 buildFlags = [ 43 "vdr" 44 "i18n" 45 ] 46 ++ lib.optional enableSystemd "SDNOTIFY=1" 47 ++ lib.optional enableBidi "BIDI=1"; 48 49 nativeBuildInputs = [ perl ]; 50 51 # plugins uses the same build environment as vdr 52 propagatedNativeBuildInputs = [ 53 pkg-config 54 gettext 55 ]; 56 57 installFlags = [ 58 "DESTDIR=$(out)" 59 "PREFIX=" # needs to be empty, otherwise plugins try to install at same prefix 60 ]; 61 62 installTargets = [ 63 "install-pc" 64 "install-bin" 65 "install-doc" 66 "install-i18n" 67 "install-includes" 68 ]; 69 70 postInstall = '' 71 mkdir -p $out/lib/vdr # only needed if vdr is started without any plugin 72 mkdir -p $out/share/vdr/conf 73 cp *.conf $out/share/vdr/conf 74 ''; 75 76 outputs = [ 77 "out" 78 "dev" 79 "man" 80 ]; 81 82 meta = with lib; { 83 homepage = "https://www.tvdr.de/"; 84 description = "Video Disc Recorder"; 85 maintainers = [ maintainers.ck3d ]; 86 platforms = platforms.linux; 87 license = licenses.gpl2Plus; 88 }; 89}