Fix naming descripency
This commit is contained in:
parent
3381edd754
commit
e69cb04ba8
16
flake.nix
16
flake.nix
|
@ -83,19 +83,19 @@
|
||||||
in
|
in
|
||||||
with import nixpkgs { system = system; };
|
with import nixpkgs { system = system; };
|
||||||
{
|
{
|
||||||
packages.adoptium = (builtins.mapAttrs
|
packages.temurin = (builtins.mapAttrs
|
||||||
(name: value:
|
(name: value:
|
||||||
buildAdoptLike name value
|
buildAdoptLike name value
|
||||||
)
|
)
|
||||||
sources.${system}.adoptium.versions) // {
|
sources.${system}.temurin.versions) // {
|
||||||
latest = buildAdoptLike "latest" sources.${system}.adoptium.latest;
|
latest = buildAdoptLike "latest" sources.${system}.temurin.latest;
|
||||||
stable = buildAdoptLike "stable" sources.${system}.adoptium.stable;
|
stable = buildAdoptLike "stable" sources.${system}.temurin.stable;
|
||||||
lts = buildAdoptLike "lts" sources.${system}.adoptium.lts;
|
lts = buildAdoptLike "lts" sources.${system}.temurin.lts;
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.adoptium-latest = self.packages.${system}.adoptium.latest;
|
packages.temurin-latest = self.packages.${system}.temurin.latest;
|
||||||
packages.adoptium-stable = self.packages.${system}.adoptium.stable;
|
packages.temurin-stable = self.packages.${system}.temurin.stable;
|
||||||
packages.adoptium-lts = self.packages.${system}.adoptium.lts;
|
packages.temurin-lts = self.packages.${system}.temurin.lts;
|
||||||
|
|
||||||
defaultPackage = self.packages.${system}.stable;
|
defaultPackage = self.packages.${system}.stable;
|
||||||
});
|
});
|
||||||
|
|
66
sources.json
66
sources.json
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"x86_64-linux": {
|
"x86_64-linux": {
|
||||||
"adoptium": {
|
"temurin": {
|
||||||
"versions": {
|
"versions": {
|
||||||
"jdk19": {
|
"jdk11": {
|
||||||
"link": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-2022-06-09-19-11-beta/OpenJDK-jdk_x64_linux_hotspot_2022-06-09-03-31.tar.gz",
|
"link": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz",
|
||||||
"major_version": 19,
|
"major_version": 11,
|
||||||
"java_version": "19-beta+25-202206090350",
|
"java_version": "11.0.15+10",
|
||||||
"early_access": true,
|
"early_access": false,
|
||||||
"sha256": "0bdyx7dj9n6qmja3qqaznc6kfg1x8g56b91hmdv8nyhxik720cid"
|
"sha256": "02sdnmk9zswi5skhyik1zaqm08v6cyggjc7c7ykwrw322rd4vnsz"
|
||||||
},
|
},
|
||||||
"jdk17": {
|
"jdk17": {
|
||||||
"link": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.3%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.3_7.tar.gz",
|
"link": "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.3%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.3_7.tar.gz",
|
||||||
|
@ -16,20 +16,6 @@
|
||||||
"early_access": false,
|
"early_access": false,
|
||||||
"sha256": "0wvbvv01jiwkj84kqnbnqfivjy0cca8h7d8996qgpybp239bxxc1"
|
"sha256": "0wvbvv01jiwkj84kqnbnqfivjy0cca8h7d8996qgpybp239bxxc1"
|
||||||
},
|
},
|
||||||
"jdk11": {
|
|
||||||
"link": "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz",
|
|
||||||
"major_version": 11,
|
|
||||||
"java_version": "11.0.15+10",
|
|
||||||
"early_access": false,
|
|
||||||
"sha256": "02sdnmk9zswi5skhyik1zaqm08v6cyggjc7c7ykwrw322rd4vnsz"
|
|
||||||
},
|
|
||||||
"jdk8": {
|
|
||||||
"link": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u332-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u332b09.tar.gz",
|
|
||||||
"major_version": 8,
|
|
||||||
"java_version": "1.8.0_332-b09",
|
|
||||||
"early_access": false,
|
|
||||||
"sha256": "1nl37nyy6bcw91ym0529mpjh7chysq88zd416h57zms00l53mhdd"
|
|
||||||
},
|
|
||||||
"jdk18": {
|
"jdk18": {
|
||||||
"link": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.1%2B10/OpenJDK18U-jdk_x64_linux_hotspot_18.0.1_10.tar.gz",
|
"link": "https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.1%2B10/OpenJDK18U-jdk_x64_linux_hotspot_18.0.1_10.tar.gz",
|
||||||
"major_version": 18,
|
"major_version": 18,
|
||||||
|
@ -37,12 +23,26 @@
|
||||||
"early_access": false,
|
"early_access": false,
|
||||||
"sha256": "18mhq6bqhbig58w2n0iw2ssz9ir48dk9rzd10jpmgh92bzbxkc8n"
|
"sha256": "18mhq6bqhbig58w2n0iw2ssz9ir48dk9rzd10jpmgh92bzbxkc8n"
|
||||||
},
|
},
|
||||||
|
"jdk19": {
|
||||||
|
"link": "https://github.com/adoptium/temurin19-binaries/releases/download/jdk-2022-06-09-19-11-beta/OpenJDK-jdk_x64_linux_hotspot_2022-06-09-03-31.tar.gz",
|
||||||
|
"major_version": 19,
|
||||||
|
"java_version": "19-beta+25-202206090350",
|
||||||
|
"early_access": true,
|
||||||
|
"sha256": "0bdyx7dj9n6qmja3qqaznc6kfg1x8g56b91hmdv8nyhxik720cid"
|
||||||
|
},
|
||||||
"jdk16": {
|
"jdk16": {
|
||||||
"link": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz",
|
"link": "https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz",
|
||||||
"major_version": 16,
|
"major_version": 16,
|
||||||
"java_version": "16.0.2+7",
|
"java_version": "16.0.2+7",
|
||||||
"early_access": false,
|
"early_access": false,
|
||||||
"sha256": "0b1wayg38rckzm1fy4pdm1a1bmjvwvw0vpbxzy7a4nd3fis6sg9j"
|
"sha256": "0b1wayg38rckzm1fy4pdm1a1bmjvwvw0vpbxzy7a4nd3fis6sg9j"
|
||||||
|
},
|
||||||
|
"jdk8": {
|
||||||
|
"link": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u332-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u332b09.tar.gz",
|
||||||
|
"major_version": 8,
|
||||||
|
"java_version": "1.8.0_332-b09",
|
||||||
|
"early_access": false,
|
||||||
|
"sha256": "1nl37nyy6bcw91ym0529mpjh7chysq88zd416h57zms00l53mhdd"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"latest": {
|
"latest": {
|
||||||
|
@ -66,6 +66,30 @@
|
||||||
"early_access": false,
|
"early_access": false,
|
||||||
"sha256": "0wvbvv01jiwkj84kqnbnqfivjy0cca8h7d8996qgpybp239bxxc1"
|
"sha256": "0wvbvv01jiwkj84kqnbnqfivjy0cca8h7d8996qgpybp239bxxc1"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"semeru": {
|
||||||
|
"versions": {},
|
||||||
|
"latest": {
|
||||||
|
"link": "",
|
||||||
|
"major_version": 0,
|
||||||
|
"java_version": "",
|
||||||
|
"early_access": false,
|
||||||
|
"sha256": ""
|
||||||
|
},
|
||||||
|
"stable": {
|
||||||
|
"link": "",
|
||||||
|
"major_version": 0,
|
||||||
|
"java_version": "",
|
||||||
|
"early_access": false,
|
||||||
|
"sha256": ""
|
||||||
|
},
|
||||||
|
"lts": {
|
||||||
|
"link": "",
|
||||||
|
"major_version": 0,
|
||||||
|
"java_version": "",
|
||||||
|
"early_access": false,
|
||||||
|
"sha256": ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ use surf::Client;
|
||||||
pub mod adoptium;
|
pub mod adoptium;
|
||||||
|
|
||||||
/// Java release struct
|
/// Java release struct
|
||||||
#[derive(Deserialize, Serialize, Debug, Clone)]
|
#[derive(Deserialize, Serialize, Debug, Clone, Default)]
|
||||||
pub struct Release {
|
pub struct Release {
|
||||||
link: String,
|
link: String,
|
||||||
major_version: u64,
|
major_version: u64,
|
||||||
|
@ -21,7 +21,7 @@ pub struct Release {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sources serialization struct
|
/// Sources serialization struct
|
||||||
#[derive(Deserialize, Serialize, Debug, Clone)]
|
#[derive(Deserialize, Serialize, Debug, Clone, Default)]
|
||||||
pub struct Sources {
|
pub struct Sources {
|
||||||
versions: HashMap<String, Release>,
|
versions: HashMap<String, Release>,
|
||||||
latest: Release,
|
latest: Release,
|
||||||
|
@ -30,9 +30,10 @@ pub struct Sources {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// System serialization struct
|
/// System serialization struct
|
||||||
#[derive(Deserialize, Serialize, Debug, Clone)]
|
#[derive(Deserialize, Serialize, Debug, Clone, Default)]
|
||||||
pub struct System {
|
pub struct System {
|
||||||
adoptium: Sources,
|
temurin: Sources,
|
||||||
|
semeru: Sources,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TryFrom<adoptium::Release> for Release {
|
impl TryFrom<adoptium::Release> for Release {
|
||||||
|
@ -93,7 +94,10 @@ async fn main() -> Result<()> {
|
||||||
.expect("Missing release")
|
.expect("Missing release")
|
||||||
.clone(),
|
.clone(),
|
||||||
};
|
};
|
||||||
let system = System { adoptium };
|
let system = System {
|
||||||
|
temurin: adoptium,
|
||||||
|
..Default::default()
|
||||||
|
};
|
||||||
let mut systems = HashMap::new();
|
let mut systems = HashMap::new();
|
||||||
systems.insert("x86_64-linux".to_string(), system);
|
systems.insert("x86_64-linux".to_string(), system);
|
||||||
let output = serde_json::to_string_pretty(&systems).context("Failed to encode sources")?;
|
let output = serde_json::to_string_pretty(&systems).context("Failed to encode sources")?;
|
||||||
|
|
Loading…
Reference in New Issue