From 38306315fb439b0adc8dbc0c1f3501f170155721 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sat, 24 Feb 2024 19:19:48 +0100 Subject: [PATCH] yamlscript: init at 0.1.38 --- pkgs/by-name/ya/yamlscript/package.nix | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/by-name/ya/yamlscript/package.nix diff --git a/pkgs/by-name/ya/yamlscript/package.nix b/pkgs/by-name/ya/yamlscript/package.nix new file mode 100644 index 000000000000..dd86546d72d4 --- /dev/null +++ b/pkgs/by-name/ya/yamlscript/package.nix @@ -0,0 +1,40 @@ +{ lib, buildGraalvmNativeImage, fetchurl }: + +buildGraalvmNativeImage rec { + pname = "yamlscript"; + version = "0.1.38"; + + src = fetchurl { + url = "https://github.com/yaml/yamlscript/releases/download/${version}/yamlscript.cli-${version}-standalone.jar"; + hash = "sha256-cdRMmeJTlkEmF4jbElrXgobSU+VIvh/k9Lr9WkOSTl8="; + }; + + executable = "ys"; + + extraNativeImageBuildArgs = [ + "--native-image-info" + "--no-fallback" + "--initialize-at-build-time" + "--enable-preview" + "-H:+ReportExceptionStackTraces" + "-H:IncludeResources=SCI_VERSION" + "-H:Log=registerResource:" + "-J-Dclojure.spec.skip-macros=true" + "-J-Dclojure.compiler.direct-linking=true" + ]; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/ys -e 'say: (+ 1 2)' | fgrep 3 + ''; + + meta = with lib; { + description = "Programming in YAML"; + homepage = "https://github.com/yaml/yamlscript"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + license = licenses.mit; + mainProgram = "ys"; + maintainers = with maintainers; [ sgo ]; + }; +}