27 lines
808 B
Nix
27 lines
808 B
Nix
|
{ lib, stdenv, fetchzip, makeWrapper, jdk14, steam-run, ... }:
|
||
|
|
||
|
stdenv.mkDerivation rec {
|
||
|
|
||
|
pname = "downlords-faf-client";
|
||
|
version = "v1.2.3";
|
||
|
|
||
|
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";
|
||
|
sha256 = "0snbqn6qngjrb1s4knxq5k48816zk975h6b19fnpja2pabwkxzpc";
|
||
|
};
|
||
|
|
||
|
nativeBuildInputs = [ makeWrapper ];
|
||
|
buildInputs = [ jdk14 ];
|
||
|
|
||
|
installPhase = ''
|
||
|
mkdir -p $out/lib/ $out/bin
|
||
|
cp -r ${src} $out/lib/downlords
|
||
|
|
||
|
makeWrapper $out/lib/downlords/downlords-faf-client $out/bin/dowlords \
|
||
|
--set INSTALL4J_JAVA_HOME "${jdk14}/lib/openjdk" \
|
||
|
--set PWD $out/lib/downlords \
|
||
|
--run "cd $out/lib/downlords"
|
||
|
'';
|
||
|
|
||
|
}
|