2021-05-03 14:46:48 +02:00
|
|
|
{ lib, stdenv, fetchzip, makeWrapper, jdk16, steam-run, ... }:
|
2020-12-12 23:44:33 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
pname = "downlords-faf-client";
|
2021-05-03 14:12:58 +02:00
|
|
|
version = "v1.4.3";
|
2020-12-12 23:44:33 +01:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/FAForever/downlords-faf-client/releases/download/${version}/dfc_unix_${lib.stringAsChars (x: if x == "." then "_" else if x == "v" then "" else x) version}.tar.gz";
|
2021-05-03 14:12:58 +02:00
|
|
|
sha256 = "146p9r3fk4ini8xhbb24m8h6wrcw3dwcjj9j4jxc6l60pv3qsscd";
|
2020-12-12 23:44:33 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2021-05-03 14:46:48 +02:00
|
|
|
buildInputs = [ jdk16 ];
|
2020-12-12 23:44:33 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/ $out/bin
|
|
|
|
cp -r ${src} $out/lib/downlords
|
|
|
|
|
|
|
|
makeWrapper $out/lib/downlords/downlords-faf-client $out/bin/dowlords \
|
2021-05-03 14:46:48 +02:00
|
|
|
--set INSTALL4J_JAVA_HOME "${jdk16}/lib/openjdk" \
|
2020-12-12 23:44:33 +01:00
|
|
|
--set PWD $out/lib/downlords \
|
|
|
|
--run "cd $out/lib/downlords"
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|