mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-24 01:21:11 +00:00
Merge pull request #299046 from ShamrockLee/jre-minimal-fix
jre_minimal: convert `passthru.tests` to an attribute set and fix pre/post hook running
This commit is contained in:
@@ -30,10 +30,10 @@ let
|
||||
|
||||
passthru = {
|
||||
home = "${jre}";
|
||||
tests = [
|
||||
(callPackage ./tests/test_jre_minimal.nix {})
|
||||
(callPackage ./tests/test_jre_minimal_with_logging.nix {})
|
||||
];
|
||||
tests = {
|
||||
jre_minimal-hello = callPackage ./tests/test_jre_minimal.nix {};
|
||||
jre_minimal-hello-logging = callPackage ./tests/test_jre_minimal_with_logging.nix {};
|
||||
};
|
||||
};
|
||||
};
|
||||
in jre
|
||||
|
||||
@@ -25,12 +25,12 @@ in
|
||||
src = source;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuildPhase
|
||||
runHook preBuild
|
||||
${jdk}/bin/javac src/Hello.java
|
||||
runHook postBuildPhase
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstallPhase
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib
|
||||
cp src/Hello.class $out/lib
|
||||
@@ -42,6 +42,6 @@ in
|
||||
EOF
|
||||
chmod a+x $out/bin/hello
|
||||
|
||||
runHook postInstallPhase
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@ in
|
||||
src = source;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuildPhase
|
||||
runHook preBuild
|
||||
${jdk}/bin/javac src/Hello.java
|
||||
runHook postBuildPhase
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstallPhase
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib
|
||||
cp src/Hello.class $out/lib
|
||||
@@ -37,6 +37,6 @@ in
|
||||
EOF
|
||||
chmod a+x $out/bin/hello
|
||||
|
||||
runHook postInstallPhase
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user