2021-11-11 08:43:14 +01:00
|
|
|
{ lib, pkgs, stdenv, fetchFromGitHub, jdk11_headless }:
|
|
|
|
|
2021-11-05 21:21:24 +01:00
|
|
|
stdenv.mkDerivation {
|
2021-11-11 08:43:14 +01:00
|
|
|
pname = "lfc";
|
2021-11-05 21:21:24 +01:00
|
|
|
version = "0.1.0";
|
|
|
|
|
2021-11-11 08:43:14 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "revol-xut";
|
|
|
|
repo = "lingua-franca-nix-releases";
|
2022-01-21 21:00:48 +01:00
|
|
|
rev = "d37bbfa530f0189c3e86ce0191134cdf42c6aec7";
|
|
|
|
sha256 = "/qMBOjffvShCPcbh9rJ7aVgdgZQ1hilHakjLyEhSmgs=";
|
2021-11-05 21:21:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ jdk11_headless ];
|
|
|
|
|
|
|
|
_JAVA_HOME = "${jdk11_headless}/";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace bin/lfc \
|
|
|
|
--replace 'base=`dirname $(dirname ''${abs_path})`' "base='$out'" \
|
2021-11-11 08:43:14 +01:00
|
|
|
--replace "run_lfc_with_args" "${jdk11_headless}/bin/java -jar $out/lib/jars/org.lflang.lfc-0.1.0-SNAPSHOT-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";
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|