2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, jre, makeWrapper }:
|
2018-02-27 14:28:45 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-03-01 23:15:14 +00:00
|
|
|
version = "6.9.7";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "frostwire";
|
2018-02-27 14:28:45 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-11-03 13:25:33 +00:00
|
|
|
url = "https://dl.frostwire.com/frostwire/${version}/frostwire-${version}.amd64.tar.gz";
|
2022-03-01 23:15:14 +00:00
|
|
|
sha256 = "sha256-LsmDfNAj10x+txJ4PugyF3Irj/N1reb3ChTvFFIucdc=";
|
2018-02-27 14:28:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-01 23:15:14 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2018-02-27 14:28:45 +00:00
|
|
|
mkdir -p $out/share/java
|
|
|
|
mv $(ls */*.jar) $out/share/java
|
|
|
|
|
|
|
|
makeWrapper $out/share/java/frostwire $out/bin/frostwire \
|
2022-03-01 23:15:14 +00:00
|
|
|
--prefix PATH : ${jre}/bin \
|
|
|
|
--prefix LD_LIBRARY_PATH : $out/share/java \
|
|
|
|
--set JAVA_HOME "${jre}"
|
|
|
|
|
|
|
|
substituteInPlace $out/share/java/frostwire \
|
|
|
|
--replace "export JAVA_PROGRAM_DIR=/usr/lib/frostwire/jre/bin" \
|
|
|
|
"export JAVA_PROGRAM_DIR=${jre}/bin/"
|
|
|
|
|
|
|
|
substituteInPlace $out/share/java/frostwire.desktop \
|
|
|
|
--replace "Exec=/usr/bin/frostwire %U" "Exec=${placeholder "out"}/bin/frostwire %U"
|
|
|
|
|
|
|
|
runHook postInstall
|
2018-02-27 14:28:45 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-04 23:31:59 +00:00
|
|
|
homepage = "https://www.frostwire.com/";
|
2018-02-27 14:28:45 +00:00
|
|
|
description = "BitTorrent Client and Cloud File Downloader";
|
2022-03-01 23:15:14 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2018-02-27 14:28:45 +00:00
|
|
|
maintainers = with maintainers; [ gavin ];
|
2019-11-03 13:25:33 +00:00
|
|
|
platforms = [ "x86_64-linux"];
|
2018-02-27 14:28:45 +00:00
|
|
|
};
|
|
|
|
}
|