base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / li / lingua-franca / package.nix
blobf989a5e9d6be1b7a463eba915bf6ff8072c2c884
1 { lib, stdenv, fetchzip, jdk17_headless }:
3 stdenv.mkDerivation rec {
4   pname = "lfc";
5   version = "0.4.0";
7   src = fetchzip {
8     url = "https://github.com/lf-lang/lingua-franca/releases/download/v${version}/lf-cli-${version}.zip";
9     sha256 = "sha256-LrAm77iPUlqVfRdYy2bZ4mim7DHIr5JxPdbrgxokGvc=";
10   };
12   buildInputs = [ jdk17_headless ];
14   _JAVA_HOME = "${jdk17_headless}/";
16   postPatch = ''
17     substituteInPlace bin/lfc \
18       --replace 'base=`dirname $(dirname ''${abs_path})`' "base='$out'" \
19       --replace "run_lfc_with_args" "${jdk17_headless}/bin/java -jar $out/lib/jars/org.lflang.lfc-${version}-all.jar"
20   '';
22   installPhase = ''
23     cp -r ./ $out/
24     chmod +x $out/bin/lfc
25   '';
27   meta = with lib; {
28     description = "Polyglot coordination language";
29     longDescription = ''
30       Lingua Franca (LF) is a polyglot coordination language for concurrent
31       and possibly time-sensitive applications ranging from low-level
32       embedded code to distributed cloud and edge applications.
33     '';
34     homepage = "https://github.com/lf-lang/lingua-franca";
35     sourceProvenance = with sourceTypes; [ binaryBytecode ];
36     license = licenses.bsd2;
37     platforms = platforms.linux;
38     maintainers = with maintainers; [ revol-xut ];
39   };