nixpkgs/pkgs/development/compilers/lingua-franca/default.nix

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

41 lines
1.2 KiB
Nix
Raw Normal View History

2022-04-18 14:05:29 +00:00
{ lib, pkgs, stdenv, fetchzip, jdk17_headless }:
2021-11-11 07:43:14 +00:00
2022-04-18 14:05:29 +00:00
stdenv.mkDerivation rec {
2021-11-11 07:43:14 +00:00
pname = "lfc";
2022-07-31 16:01:23 +00:00
version = "0.3.0";
2021-11-05 20:21:24 +00:00
2022-04-18 14:05:29 +00:00
src = fetchzip {
url = "https://github.com/lf-lang/lingua-franca/releases/download/v${version}/lfc_${version}.zip";
2022-07-31 16:01:23 +00:00
sha256 = "sha256-jSINlwHfSOPbti3LJTXpSk6lcUtwKfz7CMLtq2OuNns=";
2021-11-05 20:21:24 +00:00
};
2022-04-18 14:05:29 +00:00
buildInputs = [ jdk17_headless ];
2021-11-05 20:21:24 +00:00
2022-04-18 14:05:29 +00:00
_JAVA_HOME = "${jdk17_headless}/";
2021-11-05 20:21:24 +00:00
postPatch = ''
substituteInPlace bin/lfc \
--replace 'base=`dirname $(dirname ''${abs_path})`' "base='$out'" \
2022-04-18 14:05:29 +00:00
--replace "run_lfc_with_args" "${jdk17_headless}/bin/java -jar $out/lib/jars/org.lflang.lfc-${version}-SNAPSHOT-all.jar"
2021-11-05 20:21:24 +00: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";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
2021-11-05 20:21:24 +00:00
license = licenses.bsd2;
2021-11-11 07:43:14 +00:00
platforms = platforms.linux;
2021-11-05 20:21:24 +00:00
maintainers = with maintainers; [ revol-xut ];
};
}