1 { lib, stdenv, fetchurl, makeWrapper, jre, makeDesktopItem }:
4 desktopItem = makeDesktopItem {
8 comment = "Themeable and easy to use TV Guide";
9 desktopName = "TV-Browser";
10 genericName = "Electronic TV Program Guide";
11 categories = [ "AudioVideo" "TV" "Java" ];
13 startupWMClass = "tvbrowser-TVBrowser";
16 in stdenv.mkDerivation rec {
19 name = "${pname}-bin-${version}";
22 url = "mirror://sourceforge/${pname}/TV-Browser%20Releases%20%28Java%208%20and%20higher%29/${version}/${pname}_${version}_bin.tar.gz";
23 sha256 = "0ahsirf6cazs5wykgbwsc6n35w6jprxyphzqmm7d370n37sb07pm";
26 nativeBuildInputs = [ makeWrapper ];
29 mkdir -p $out/share/java/${pname}
30 cp -R * $out/share/java/${pname}
31 rm $out/share/java/${pname}/${pname}.{sh,desktop}
33 mkdir -p $out/share/applications
34 ln -s ${desktopItem}/share/applications/* $out/share/applications/
36 for i in 16 32 48 128; do
37 mkdir -p $out/share/icons/hicolor/''${i}x''${i}/apps
38 ln -s $out/share/java/${pname}/imgs/${pname}$i.png $out/share/icons/hicolor/''${i}x''${i}/apps/${pname}.png
42 makeWrapper ${jre}/bin/java $out/bin/${pname} \
43 --add-flags "-jar $out/share/java/${pname}/${pname}.jar" \
44 --chdir "$out/share/java/${pname}"
48 description = "Electronic TV Program Guide";
49 homepage = "https://www.tvbrowser.org/";
50 sourceProvenance = with sourceTypes; [ binaryBytecode ];
51 license = licenses.gpl3;
52 platforms = platforms.linux;
53 maintainers = with maintainers; [ jfrankenau ];