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