mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-13 16:57:35 +00:00
Merge pull request #269479 from jcf/remove-more-graalvm-references
Remove more GraalVM references
This commit is contained in:
commit
ddf0003c57
@ -3,6 +3,7 @@
|
||||
, glibcLocales
|
||||
# The GraalVM derivation to use
|
||||
, graalvmDrv
|
||||
, removeReferencesTo
|
||||
, executable ? args.pname
|
||||
# JAR used as input for GraalVM derivation, defaults to src
|
||||
, jar ? args.src
|
||||
@ -38,12 +39,13 @@ let
|
||||
"buildPhase"
|
||||
"nativeBuildInputs"
|
||||
"installPhase"
|
||||
"postInstall"
|
||||
];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
inherit dontUnpack jar;
|
||||
|
||||
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ graalvmDrv glibcLocales ];
|
||||
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ graalvmDrv glibcLocales removeReferencesTo ];
|
||||
|
||||
nativeImageBuildArgs = nativeImageBuildArgs ++ extraNativeImageBuildArgs ++ [ graalvmXmx ];
|
||||
|
||||
@ -63,6 +65,11 @@ stdenv.mkDerivation ({
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
remove-references-to -t ${graalvmDrv} $out/bin/${executable}
|
||||
${args.postInstall or ""}
|
||||
'';
|
||||
|
||||
disallowedReferences = [ graalvmDrv ];
|
||||
|
||||
passthru = { inherit graalvmDrv; };
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ lib
|
||||
, buildGraalvmNativeImage
|
||||
, graalvmCEPackages
|
||||
, removeReferencesTo
|
||||
, fetchurl
|
||||
, writeScript
|
||||
, installShellFiles
|
||||
@ -21,7 +20,7 @@ let
|
||||
|
||||
executable = "bb";
|
||||
|
||||
nativeBuildInputs = [ removeReferencesTo installShellFiles ];
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
extraNativeImageBuildArgs = [
|
||||
"-H:+ReportExceptionStackTraces"
|
||||
@ -39,11 +38,7 @@ let
|
||||
$out/bin/bb '(prn "bépo àê")' | fgrep 'bépo àê'
|
||||
'';
|
||||
|
||||
# As of v1.2.174, this will remove references to ${graalvmDrv}/conf/chronology,
|
||||
# not sure the implications of this but this file is not available in
|
||||
# graalvm-ce anyway.
|
||||
postInstall = ''
|
||||
remove-references-to -t ${graalvmDrv} $out/bin/${executable}
|
||||
installShellCompletion --cmd bb --bash ${./completions/bb.bash}
|
||||
installShellCompletion --cmd bb --zsh ${./completions/bb.zsh}
|
||||
installShellCompletion --cmd bb --fish ${./completions/bb.fish}
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ lib, buildGraalvmNativeImage, fetchurl }:
|
||||
{ lib
|
||||
, buildGraalvmNativeImage
|
||||
, fetchurl
|
||||
, testers
|
||||
, jet
|
||||
}:
|
||||
|
||||
buildGraalvmNativeImage rec {
|
||||
pname = "jet";
|
||||
@ -16,6 +21,12 @@ buildGraalvmNativeImage rec {
|
||||
"--no-server"
|
||||
];
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
inherit version;
|
||||
package = jet;
|
||||
command = "jet --version";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI to transform between JSON, EDN, YAML and Transit, powered with a minimal query language";
|
||||
homepage = "https://github.com/borkdude/jet";
|
||||
|
@ -1,4 +1,14 @@
|
||||
{ lib, stdenv, buildGraalvmNativeImage, babashka, fetchurl, fetchFromGitHub, clojure, writeScript }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildGraalvmNativeImage
|
||||
, babashka
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, clojure
|
||||
, writeScript
|
||||
, testers
|
||||
, clojure-lsp
|
||||
}:
|
||||
|
||||
buildGraalvmNativeImage rec {
|
||||
pname = "clojure-lsp";
|
||||
@ -28,12 +38,18 @@ buildGraalvmNativeImage rec {
|
||||
export HOME="$(mktemp -d)"
|
||||
./${pname} --version | fgrep -q '${version}'
|
||||
''
|
||||
# TODO: fix classpath issue per https://github.com/NixOS/nixpkgs/pull/153770
|
||||
#${babashka}/bin/bb integration-test ./${pname}
|
||||
# TODO: fix classpath issue per https://github.com/NixOS/nixpkgs/pull/153770
|
||||
#${babashka}/bin/bb integration-test ./${pname}
|
||||
+ ''
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
inherit version;
|
||||
package = clojure-lsp;
|
||||
command = "clojure-lsp --version";
|
||||
};
|
||||
|
||||
passthru.updateScript = writeScript "update-clojure-lsp" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl common-updater-scripts gnused jq nix
|
||||
|
@ -1,4 +1,9 @@
|
||||
{ lib, buildGraalvmNativeImage, fetchurl }:
|
||||
{ lib
|
||||
, buildGraalvmNativeImage
|
||||
, fetchurl
|
||||
, testers
|
||||
, zprint
|
||||
}:
|
||||
|
||||
buildGraalvmNativeImage rec {
|
||||
pname = "zprint";
|
||||
@ -18,6 +23,12 @@ buildGraalvmNativeImage rec {
|
||||
"--no-fallback"
|
||||
];
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
inherit version;
|
||||
package = zprint;
|
||||
command = "zprint --version";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Clojure/EDN source code formatter and pretty printer";
|
||||
longDescription = ''
|
||||
|
Loading…
Reference in New Issue
Block a user