zprint: use buildGraalvmNativeImage
This commit is contained in:
parent
d352856ea2
commit
e9766a85bd
@ -1,40 +1,22 @@
|
||||
{ stdenv, lib, fetchurl, graalvm11-ce, glibcLocales }:
|
||||
{ lib, buildGraalvmNativeImage, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
buildGraalvmNativeImage rec {
|
||||
pname = "zprint";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://github.com/kkinnear/${pname}/releases/download/${version}/${pname}-filter-${version}";
|
||||
url = "https://github.com/kkinnear/${pname}/releases/download/${version}/${pname}-filter-${version}";
|
||||
sha256 = "1wh8jyj7alfa6h0cycfwffki83wqb5d5x0p7kvgdkhl7jx7isrwj";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
nativeBuildInputs = [ graalvm11-ce glibcLocales ];
|
||||
|
||||
buildPhase = ''
|
||||
native-image \
|
||||
--no-server \
|
||||
-J-Xmx7G \
|
||||
-J-Xms4G \
|
||||
-jar ${src} \
|
||||
-H:Name=${pname} \
|
||||
-H:EnableURLProtocols=https,http \
|
||||
-H:+ReportExceptionStackTraces \
|
||||
-H:CLibraryPath=${graalvm11-ce.lib}/lib \
|
||||
${lib.optionalString stdenv.isDarwin ''-H:-CheckToolchain''} \
|
||||
--report-unsupported-elements-at-runtime \
|
||||
--initialize-at-build-time \
|
||||
--no-fallback
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install ${pname} $out/bin
|
||||
'';
|
||||
extraNativeImageBuildArgs = [
|
||||
"--no-server"
|
||||
"-H:EnableURLProtocols=https,http"
|
||||
"-H:+ReportExceptionStackTraces"
|
||||
"--report-unsupported-elements-at-runtime"
|
||||
"--initialize-at-build-time"
|
||||
"--no-fallback"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Clojure/EDN source code formatter and pretty printer";
|
||||
@ -45,7 +27,6 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
homepage = "https://github.com/kkinnear/zprint";
|
||||
license = licenses.mit;
|
||||
platforms = graalvm11-ce.meta.platforms;
|
||||
maintainers = with maintainers; [ stelcodes ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user