3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/p2p/frostwire/frostwire-bin.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
version = "6.9.7";
pname = "frostwire";
src = fetchurl {
2019-11-03 13:25:33 +00:00
url = "https://dl.frostwire.com/frostwire/${version}/frostwire-${version}.amd64.tar.gz";
sha256 = "sha256-LsmDfNAj10x+txJ4PugyF3Irj/N1reb3ChTvFFIucdc=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/share/java
mv $(ls */*.jar) $out/share/java
makeWrapper $out/share/java/frostwire $out/bin/frostwire \
--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
'';
meta = with lib; {
2020-03-04 23:31:59 +00:00
homepage = "https://www.frostwire.com/";
description = "BitTorrent Client and Cloud File Downloader";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ gavin ];
2019-11-03 13:25:33 +00:00
platforms = [ "x86_64-linux"];
};
}