diff --git a/pkgs/applications/video/mediathekview/default.nix b/pkgs/applications/video/mediathekview/default.nix index 93a8d207054..34efffc21d7 100644 --- a/pkgs/applications/video/mediathekview/default.nix +++ b/pkgs/applications/video/mediathekview/default.nix @@ -1,31 +1,31 @@ -{ stdenv, fetchurl, jre, unzip }: +{ stdenv, fetchurl, makeWrapper, jre }: -stdenv.mkDerivation { - name = "mediathekview-9"; +stdenv.mkDerivation rec { + version = "13.2.1"; + name = "mediathekview-${version}"; src = fetchurl { - url = "mirror://sourceforge/zdfmediathk/MediathekView_9.zip"; - sha256 = "1wff0igr33z9p1mjw7yvb6658smdwnp22dv8klz0y8qg116wx7a4"; + url = "https://download.mediathekview.de/stabil/MediathekView-${version}.tar.gz"; + sha256 = "11wg6klviig0h7pprfaygamsgqr7drqra2s4yxgfak6665033l2a"; }; - unpackPhase = "true"; - buildInputs = [ unzip ]; - - # Could use some more love - # Maybe we can also preconfigure locations for vlc and the others. + nativeBuildInputs = [ makeWrapper ]; + installPhase = '' - mkdir -p $out/bin - mkdir -p $out/opt/mediathekview - cd $out/opt/mediathekview - unzip $src - find . -iname '*.exe' -delete - sed -i -e 's, java, ${jre}/bin/java,' MediathekView__Linux.sh - ln -s $out/opt/mediathekview/MediathekView__Linux.sh $out/bin/mediathekview - ''; + mkdir -p $out/{lib,bin,share/mediathekview} + + install -m644 MediathekView.jar $out/ + install -m644 -t $out/lib lib/* + install -m755 bin/flv.sh $out/share/mediathekview + + makeWrapper ${jre}/bin/java $out/bin/mediathek \ + --add-flags "-cp '$out/lib/*' -jar $out/MediathekView.jar" + ''; meta = with stdenv.lib; { - homepage = http://zdfmediathk.sourceforge.net/; - license = stdenv.lib.licenses.gpl3; - maintainers = [ maintainers.chaoflow ]; - platforms = platforms.linux; # also macOS and cygwin, but not investigated, yet + description = "Offers access to the Mediathek of different tv stations (ARD, ZDF, Arte, etc.)"; + homepage = https://mediathekview.de/; + license = licenses.gpl3; + maintainers = with maintainers; [ chaoflow moredread ]; + platforms = platforms.all; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3ca24a99c18..94e2ae3f5e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18129,7 +18129,9 @@ in mediainfo-gui = callPackage ../applications/misc/mediainfo-gui { }; - mediathekview = callPackage ../applications/video/mediathekview { }; + # mediathekview needs JavaFX, which currently only is available inside OracleJRE + # we might be able to get rid of it, as soon as we have an OpenJRE with OpenJFX included + mediathekview = callPackage ../applications/video/mediathekview { jre = oraclejre; }; meteo = callPackage ../applications/networking/weather/meteo { };