tvbrowser: build from source
This commit changes from a precompiled bundle to a source file. Accordingly, the expression file is renamed to `default.nix` and the old attribute name is changed to `tvbrowser`, the old one being now a throw-message. The upstream build script tries to download the news plugin; so, we provide this and pass it as a parameter. Given that this is still a piece of a precompiled Java bytecode, along with a main readable source bundle, `meta.sourceProvenance` is updated accordingly.
This commit is contained in:
parent
17abe6d26a
commit
b2fdba820a
|
@ -836,6 +836,12 @@
|
|||
<literal>libax25</literal> package.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>tvbrowser-bin</literal> was removed, and now
|
||||
<literal>tvbrowser</literal> is built from source.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>nixos-version</literal> now accepts
|
||||
|
|
|
@ -209,6 +209,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
|||
|
||||
- [Xastir](https://xastir.org/index.php/Main_Page) can now access AX.25 interfaces via the `libax25` package.
|
||||
|
||||
- `tvbrowser-bin` was removed, and now `tvbrowser` is built from source.
|
||||
|
||||
- `nixos-version` now accepts `--configuration-revision` to display more information about the current generation revision
|
||||
|
||||
- The option `services.nomad.extraSettingsPlugins` has been fixed to allow more than one plugin in the path.
|
||||
|
|
|
@ -1,8 +1,21 @@
|
|||
{ lib, stdenv, fetchurl, makeWrapper, jre, makeDesktopItem }:
|
||||
{ lib
|
||||
, fetchurl
|
||||
, makeDesktopItem
|
||||
, stdenv
|
||||
, fetchzip
|
||||
, ant
|
||||
, jdk
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
minimalJavaVersion = "11";
|
||||
|
||||
newsPlugin = fetchurl {
|
||||
url = "https://www.tvbrowser.org/data/uploads/1372016422809_543/NewsPlugin.jar";
|
||||
hash = "sha256-5XoypuMd2AFBE2SJ6EdECuvq6D81HLLuu9UoA9kcKAM=";
|
||||
};
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
name = "tvbrowser";
|
||||
exec = "tvbrowser";
|
||||
|
@ -16,25 +29,32 @@ let
|
|||
};
|
||||
|
||||
in
|
||||
assert lib.versionAtLeast jre.version minimalJavaVersion;
|
||||
assert lib.versionAtLeast jdk.version minimalJavaVersion;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tvbrowser";
|
||||
version = "4.2.7";
|
||||
name = "${pname}-bin-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${pname}/TV-Browser%20Releases%20%28Java%20${minimalJavaVersion}%20and%20higher%29/${version}/${pname}_${version}_bin.tar.gz";
|
||||
hash = "sha256-A1ZLGHA1sSSafwWy6MlPikQMk+6CechftzFTLDaBfrs=";
|
||||
src = fetchzip {
|
||||
url = "mirror://sourceforge/${pname}/TV-Browser%20Releases%20%28Java%20${minimalJavaVersion}%20and%20higher%29/${version}/${pname}_${version}_src.tar.gz";
|
||||
hash = "sha256-dmNfI6T0MU7UtMH+C/2hiAeDwZlFCB4JofQViZezoqI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [ ant jdk makeWrapper ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
ant runtime-linux -Dnewsplugin.url=file://${newsPlugin}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/java/${pname}
|
||||
cp -R * $out/share/java/${pname}
|
||||
rm $out/share/java/${pname}/${pname}.{sh,desktop}
|
||||
cp -R runtime/tvbrowser_linux/* $out/share/java/${pname}
|
||||
rm $out/share/java/${pname}/${pname}.sh
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
||||
|
@ -45,7 +65,7 @@ stdenv.mkDerivation rec {
|
|||
done
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${jre}/bin/java $out/bin/${pname} \
|
||||
makeWrapper ${jdk}/bin/java $out/bin/${pname} \
|
||||
--add-flags "--module-path=lib:${pname}.jar -m ${pname}/tvbrowser.TVBrowser" \
|
||||
--chdir "$out/share/java/${pname}"
|
||||
|
||||
|
@ -55,7 +75,7 @@ stdenv.mkDerivation rec {
|
|||
meta = with lib; {
|
||||
description = "Electronic TV Program Guide";
|
||||
homepage = "https://www.tvbrowser.org/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode fromSource ];
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ jfrankenau yarny ];
|
|
@ -1543,6 +1543,7 @@ mapAliases ({
|
|||
truecrypt = throw "'truecrypt' has been renamed to/replaced by 'veracrypt'"; # Converted to throw 2022-02-22
|
||||
tuijam = throw "tuijam has been removed because Google Play Music was discontinued"; # Added 2021-03-07
|
||||
turbo-geth = throw "turbo-geth has been renamed to erigon"; # Added 2021-08-08
|
||||
tvbrowser-bin = throw "tvbrowser-bin was removed because it is now built from sources; use 'tvbrowser' instead"; # Added 2023-02-04
|
||||
twister = throw "twister has been removed: abandoned by upstream and python2-only"; # Added 2022-04-26
|
||||
tychus = throw "tychus has been dropped due to the lack of maintenance from upstream since 2018"; # Added 2022-06-03
|
||||
typora = throw "Newer versions of typora use anti-user encryption and refuse to start. As such it has been removed"; # Added 2021-09-11
|
||||
|
|
|
@ -38261,7 +38261,7 @@ with pkgs;
|
|||
|
||||
trufflehog = callPackage ../tools/security/trufflehog { };
|
||||
|
||||
tvbrowser-bin = callPackage ../applications/misc/tvbrowser/bin.nix { };
|
||||
tvbrowser = callPackage ../applications/misc/tvbrowser { };
|
||||
|
||||
tvheadend = callPackage ../servers/tvheadend {
|
||||
dtv-scan-tables = dtv-scan-tables_tvheadend;
|
||||
|
|
Loading…
Reference in a new issue