2021-02-05 17:12:51 +00:00
|
|
|
|
{ lib, stdenv, fetchFromGitHub, zlib, jdk, CoreServices, Foundation }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
pname = "avian";
|
|
|
|
|
version = "1.2.0";
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "readytalk";
|
|
|
|
|
repo = "avian";
|
|
|
|
|
rev = "v${version}";
|
|
|
|
|
sha256 = "1j2y45cpqk3x6a743mgpg7z3ivwm7qc9jy6xirvay7ah1qyxmm48";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
buildInputs = [ zlib jdk ]
|
2021-02-05 17:12:51 +00:00
|
|
|
|
++ lib.optionals stdenv.isDarwin [ CoreServices Foundation ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error";
|
|
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace makefile \
|
|
|
|
|
--replace 'g++' 'c++' \
|
|
|
|
|
--replace 'gcc' 'cc'
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
cp build/*/avian $out/bin/
|
|
|
|
|
cp build/*/avian-dynamic $out/bin/
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
description = "Lightweight Java virtual machine";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
Avian is a lightweight virtual machine and class library designed
|
|
|
|
|
to provide a useful subset of Java’s features, suitable for
|
|
|
|
|
building self-contained applications.
|
|
|
|
|
'';
|
|
|
|
|
homepage = "https://readytalk.github.io/avian/";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
license = lib.licenses.isc;
|
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
|
maintainers = [ lib.maintainers.earldouglas ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|