Merge pull request #181319 from eigengrau/add-ballerina
This commit is contained in:
commit
7b06baf385
@ -3744,6 +3744,12 @@
|
|||||||
githubId = 537775;
|
githubId = 537775;
|
||||||
name = "Emery Hemingway";
|
name = "Emery Hemingway";
|
||||||
};
|
};
|
||||||
|
eigengrau = {
|
||||||
|
email = "seb@schattenkopie.de";
|
||||||
|
name = "Sebastian Reuße";
|
||||||
|
github = "eigengrau";
|
||||||
|
githubId = 4939947;
|
||||||
|
};
|
||||||
eikek = {
|
eikek = {
|
||||||
email = "eike.kettner@posteo.de";
|
email = "eike.kettner@posteo.de";
|
||||||
github = "eikek";
|
github = "eikek";
|
||||||
|
45
pkgs/development/compilers/ballerina/default.nix
Normal file
45
pkgs/development/compilers/ballerina/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{ ballerina, lib, writeText, runCommand, makeWrapper, fetchzip, stdenv, openjdk }:
|
||||||
|
let
|
||||||
|
version = "2201.1.0";
|
||||||
|
codeName = "swan-lake";
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
pname = "ballerina";
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
src = fetchzip {
|
||||||
|
url = "https://dist.ballerina.io/downloads/${version}/ballerina-${version}-${codeName}.zip";
|
||||||
|
sha256 = "sha256-WZ6CvgnES1indYeMSuC3odDqwR2J27k+D8RktvHsELs=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
cp -rv distributions/ballerina-${version} $out
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
preFixup = ''
|
||||||
|
wrapProgram $out/bin/bal --set JAVA_HOME ${openjdk}/lib/openjdk
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.tests.smokeTest = let
|
||||||
|
helloWorld = writeText "hello-world.bal" ''
|
||||||
|
import ballerina/io;
|
||||||
|
public function main() {
|
||||||
|
io:println("Hello, World!");
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
in runCommand "ballerina-${version}-smoketest" { } ''
|
||||||
|
${ballerina}/bin/bal run ${helloWorld} >$out
|
||||||
|
read result <$out
|
||||||
|
[[ $result = "Hello, World!" ]]
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "An open-source programming language for the cloud";
|
||||||
|
license = licenses.asl20;
|
||||||
|
platforms = openjdk.meta.platforms;
|
||||||
|
maintainers = with maintainers; [ eigengrau ];
|
||||||
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||||
|
};
|
||||||
|
}
|
@ -12818,6 +12818,8 @@ with pkgs;
|
|||||||
|
|
||||||
avra = callPackage ../development/compilers/avra { };
|
avra = callPackage ../development/compilers/avra { };
|
||||||
|
|
||||||
|
ballerina = callPackage ../development/compilers/ballerina { };
|
||||||
|
|
||||||
beekeeper-studio = callPackage ../development/tools/database/beekeeper-studio { };
|
beekeeper-studio = callPackage ../development/tools/database/beekeeper-studio { };
|
||||||
|
|
||||||
bigloo = callPackage ../development/compilers/bigloo { };
|
bigloo = callPackage ../development/compilers/bigloo { };
|
||||||
|
Loading…
Reference in New Issue
Block a user