@@ -1,31 +1,31 @@
1−{ stdenv, fetchurl, jre, unzip }:
1+{ stdenv, fetchurl, makeWrapper, jre }:
22
3−stdenv.mkDerivation {
4− name = "mediathekview-9";
3+stdenv.mkDerivation rec {
4+ version = "13.2.1";
5+ name = "mediathekview-${version}";
56 src = fetchurl {
6− url = "mirror://sourceforge/zdfmediathk/MediathekView_9.zip";
7− sha256 = "1wff0igr33z9p1mjw7yvb6658smdwnp22dv8klz0y8qg116wx7a4";
7+ url = "https://download.mediathekview.de/stabil/MediathekView-${version}.tar.gz";
8+ sha256 = "11wg6klviig0h7pprfaygamsgqr7drqra2s4yxgfak6665033l2a";
89 };
9− unpackPhase = "true";
1010
11− buildInputs = [ unzip ];
12−
13− # Could use some more love
14− # Maybe we can also preconfigure locations for vlc and the others.
11+ nativeBuildInputs = [ makeWrapper ];
12+
1513 installPhase = ''
16− mkdir -p $out/bin
17− mkdir -p $out/opt/mediathekview
18− cd $out/opt/mediathekview
19− unzip $src
20− find . -iname '*.exe' -delete
21− sed -i -e 's, java, ${jre}/bin/java,' MediathekView__Linux.sh
22− ln -s $out/opt/mediathekview/MediathekView__Linux.sh $out/bin/mediathekview
23− '';
14+ mkdir -p $out/{lib,bin,share/mediathekview}
15+
16+ install -m644 MediathekView.jar $out/
17+ install -m644 -t $out/lib lib/*
18+ install -m755 bin/flv.sh $out/share/mediathekview
19+
20+ makeWrapper ${jre}/bin/java $out/bin/mediathek \
21+ --add-flags "-cp '$out/lib/*' -jar $out/MediathekView.jar"
22+ '';
2423
2524 meta = with stdenv.lib; {
26− homepage = http://zdfmediathk.sourceforge.net/;
27− license = stdenv.lib.licenses.gpl3;
28− maintainers = [ maintainers.chaoflow ];
29− platforms = platforms.linux; # also macOS and cygwin, but not investigated, yet
25+ description = "Offers access to the Mediathek of different tv stations (ARD, ZDF, Arte, etc.)";
26+ homepage = https://mediathekview.de/;
27+ license = licenses.gpl3;
28+ maintainers = with maintainers; [ chaoflow moredread ];
29+ platforms = platforms.all;
3030 };
3131}