2022-04-18 16:05:29 +02:00
|
|
|
{ lib, pkgs, stdenv, fetchzip, jdk17_headless }:
|
2021-11-11 08:43:14 +01:00
|
|
|
|
2022-04-18 16:05:29 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2021-11-11 08:43:14 +01:00
|
|
|
pname = "lfc";
|
2023-05-10 15:00:25 +02:00
|
|
|
version = "0.4.0";
|
2021-11-05 21:21:24 +01:00
|
|
|
|
2022-04-18 16:05:29 +02:00
|
|
|
src = fetchzip {
|
2023-05-10 15:00:25 +02:00
|
|
|
url = "https://github.com/lf-lang/lingua-franca/releases/download/v${version}/lf-cli-${version}.zip";
|
|
|
|
sha256 = "sha256-LrAm77iPUlqVfRdYy2bZ4mim7DHIr5JxPdbrgxokGvc=";
|
2021-11-05 21:21:24 +01:00
|
|
|
};
|
|
|
|
|
2022-04-18 16:05:29 +02:00
|
|
|
buildInputs = [ jdk17_headless ];
|
2021-11-05 21:21:24 +01:00
|
|
|
|
2022-04-18 16:05:29 +02:00
|
|
|
_JAVA_HOME = "${jdk17_headless}/";
|
2021-11-05 21:21:24 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bin/lfc \
|
|
|
|
--replace 'base=`dirname $(dirname ''${abs_path})`' "base='$out'" \
|
2022-09-20 00:14:10 +02:00
|
|
|
--replace "run_lfc_with_args" "${jdk17_headless}/bin/java -jar $out/lib/jars/org.lflang.lfc-${version}-all.jar"
|
2021-11-05 21:21:24 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cp -r ./ $out/
|
|
|
|
chmod +x $out/bin/lfc
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Polyglot coordination language";
|
|
|
|
longDescription = ''
|
|
|
|
Lingua Franca (LF) is a polyglot coordination language for concurrent
|
|
|
|
and possibly time-sensitive applications ranging from low-level
|
|
|
|
embedded code to distributed cloud and edge applications.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/lf-lang/lingua-franca";
|
2022-06-02 15:38:41 +02:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2021-11-05 21:21:24 +01:00
|
|
|
license = licenses.bsd2;
|
2021-11-11 08:43:14 +01:00
|
|
|
platforms = platforms.linux;
|
2021-11-05 21:21:24 +01:00
|
|
|
maintainers = with maintainers; [ revol-xut ];
|
|
|
|
};
|
|
|
|
}
|