3
0
Fork 0
forked from mirrors/nixpkgs

lingua-franca: 0.1.0 -> 0.2.0

This commit is contained in:
revol-xut 2022-04-18 16:05:29 +02:00
parent df6fa84709
commit 2c54c0602d
No known key found for this signature in database
GPG key ID: 4F56FF7759627D07

View file

@ -1,24 +1,22 @@
{ lib, pkgs, stdenv, fetchFromGitHub, jdk11_headless }:
{ lib, pkgs, stdenv, fetchzip, jdk17_headless }:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "lfc";
version = "0.1.0";
version = "0.2.0";
src = fetchFromGitHub {
owner = "revol-xut";
repo = "lingua-franca-nix-releases";
rev = "d37bbfa530f0189c3e86ce0191134cdf42c6aec7";
sha256 = "/qMBOjffvShCPcbh9rJ7aVgdgZQ1hilHakjLyEhSmgs=";
src = fetchzip {
url = "https://github.com/lf-lang/lingua-franca/releases/download/v${version}/lfc_${version}.zip";
sha256 = "rBx7UnPLufZBO7lG0In5upHqYCyRtI4kQv0V83CZHew=";
};
buildInputs = [ jdk11_headless ];
buildInputs = [ jdk17_headless ];
_JAVA_HOME = "${jdk11_headless}/";
_JAVA_HOME = "${jdk17_headless}/";
postPatch = ''
substituteInPlace bin/lfc \
--replace 'base=`dirname $(dirname ''${abs_path})`' "base='$out'" \
--replace "run_lfc_with_args" "${jdk11_headless}/bin/java -jar $out/lib/jars/org.lflang.lfc-0.1.0-SNAPSHOT-all.jar"
--replace "run_lfc_with_args" "${jdk17_headless}/bin/java -jar $out/lib/jars/org.lflang.lfc-${version}-SNAPSHOT-all.jar"
'';
installPhase = ''