about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/video/vdr/xineliboutput/default.nix
blob: 98fcd2b5d40827ae23284704a36047a5811b1b06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ stdenv, fetchurl, lib, vdr
, libav, libcap, libvdpau
, xineLib, libjpeg, libextractor, mesa, libGLU
, libX11, libXext, libXrender, libXrandr
, makeWrapper
}: let
  name = "vdr-xineliboutput-2.1.0";

  makeXinePluginPath = l: lib.concatStringsSep ":" (map (p: "${p}/lib/xine/plugins") l);

  self =  stdenv.mkDerivation {
    inherit name;

    src = fetchurl {
      url = "mirror://sourceforge/project/xineliboutput/xineliboutput/${name}/${name}.tgz";
      sha256 = "1phrxpaz8li7z0qy241spawalhcmwkv5hh3gdijbv4h7mm899yba";
    };

    # configure don't accept argument --prefix
    dontAddPrefix = true;

    postConfigure = ''
      sed -i config.mak \
        -e 's,XINEPLUGINDIR=/[^/]*/[^/]*/[^/]*/,XINEPLUGINDIR=/,'
    '';

    makeFlags = [ "DESTDIR=$(out)" ];

    postFixup = ''
      for f in $out/bin/*; do
        wrapProgram $f \
          --prefix XINE_PLUGIN_PATH ":" "${makeXinePluginPath [ "$out" xineLib ]}"
      done
    '';

    nativeBuildInputs = [ makeWrapper ];

    buildInputs = [
      libav
      libcap
      libextractor
      libjpeg
      libGLU
      libvdpau
      libXext
      libXrandr
      libXrender
      libX11
      mesa
      vdr
      xineLib
    ];

    passthru.requiredXinePlugins = [ xineLib self ];

    meta = with lib;{
      homepage = "https://sourceforge.net/projects/xineliboutput/";
      description = "Xine-lib based software output device for VDR";
      maintainers = [ maintainers.ck3d ];
      license = licenses.gpl2;
      inherit (vdr.meta) platforms;
    };
  };
in self