openjfx{17,21,23}: add update script
This commit is contained in:
parent
bb161ee138
commit
f3b30d484e
@ -5,7 +5,6 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
|
||||||
fetchFromGitHub,
|
|
||||||
fetchpatch2,
|
fetchpatch2,
|
||||||
|
|
||||||
gradle,
|
gradle,
|
||||||
@ -28,6 +27,11 @@
|
|||||||
|
|
||||||
writeText,
|
writeText,
|
||||||
|
|
||||||
|
_experimental-update-script-combinators,
|
||||||
|
nixpkgs-openjdk-updater,
|
||||||
|
writeShellScript,
|
||||||
|
path,
|
||||||
|
|
||||||
withMedia ? true,
|
withMedia ? true,
|
||||||
withWebKit ? false,
|
withWebKit ? false,
|
||||||
|
|
||||||
@ -45,7 +49,10 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
sourceFile = ./. + "/${featureVersion}/source.json";
|
sourceFile = ./. + "/${featureVersion}/source.json";
|
||||||
sourceInfo = lib.importJSON sourceFile;
|
source = nixpkgs-openjdk-updater.openjdkSource {
|
||||||
|
inherit sourceFile;
|
||||||
|
featureVersionPrefix = featureVersion;
|
||||||
|
};
|
||||||
|
|
||||||
atLeast21 = lib.versionAtLeast featureVersion "21";
|
atLeast21 = lib.versionAtLeast featureVersion "21";
|
||||||
atLeast23 = lib.versionAtLeast featureVersion "23";
|
atLeast23 = lib.versionAtLeast featureVersion "23";
|
||||||
@ -58,10 +65,9 @@ assert lib.assertMsg (lib.pathExists sourceFile)
|
|||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "openjfx-modular-sdk";
|
pname = "openjfx-modular-sdk";
|
||||||
version = lib.removePrefix "refs/tags/" sourceInfo.rev;
|
version = lib.removePrefix "refs/tags/" source.src.rev;
|
||||||
|
|
||||||
# TODO: Tighten up after update scripts are run.
|
inherit (source) src;
|
||||||
src = fetchFromGitHub sourceInfo;
|
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
if featureVersion == "23" then
|
if featureVersion == "23" then
|
||||||
@ -166,6 +172,32 @@ stdenv.mkDerivation {
|
|||||||
gradle_openjfx.jdk
|
gradle_openjfx.jdk
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru.updateScript = _experimental-update-script-combinators.sequence [
|
||||||
|
source.updateScript
|
||||||
|
|
||||||
|
{
|
||||||
|
command = [
|
||||||
|
# We need to do this separate script rather than simply using
|
||||||
|
# `finalAttrs.mitmCache.updateScript` because the Gradle update
|
||||||
|
# script captures the source at the time of evaluation, making
|
||||||
|
# it miss the update.
|
||||||
|
(writeShellScript "update-openjfx-deps.sh" ''
|
||||||
|
eval "$(
|
||||||
|
nix-build "$1" \
|
||||||
|
-A openjfx${featureVersion}.mitmCache.updateScript
|
||||||
|
)"
|
||||||
|
'')
|
||||||
|
|
||||||
|
# This has to be a separate argument so that
|
||||||
|
# `maintainers/scripts/update.py` can rewrite it to the
|
||||||
|
# appropriate Git work tree.
|
||||||
|
path
|
||||||
|
];
|
||||||
|
|
||||||
|
supportedFeatures = [ "silent" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Next-generation Java client toolkit";
|
description = "Next-generation Java client toolkit";
|
||||||
homepage = "https://openjdk.org/projects/openjfx/";
|
homepage = "https://openjdk.org/projects/openjfx/";
|
||||||
|
Loading…
Reference in New Issue
Block a user