Update flake
This commit is contained in:
parent
4ade2ae9e9
commit
f83a6053da
12
flake.lock
12
flake.lock
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1655122334,
|
||||
"narHash": "sha256-Rwwvo9TDCH0a4m/Jvoq5wZ3FLSLiVLBD1FFfN/3XawA=",
|
||||
"lastModified": 1669597967,
|
||||
"narHash": "sha256-R+2NaDkXsYkOpFOhmVR8jBZ77Pq55Z6ilaqwFLLn000=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e1a1cfb56504d1b82a3953bfb0632b37a1ca8d30",
|
||||
"rev": "be9e3762e719211368d186f547f847737baad720",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -24,11 +24,11 @@
|
|||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1653893745,
|
||||
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
37
flake.nix
37
flake.nix
|
@ -10,18 +10,13 @@
|
|||
utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
buildAdoptLike = with import nixpkgs { system = system; }; name: value:
|
||||
buildAdoptLike = with import nixpkgs { system = system; };
|
||||
name: value:
|
||||
let
|
||||
cpuName = stdenv.hostPlatform.parsed.cpu.name;
|
||||
runtimeDependencies = [
|
||||
pkgs.cups
|
||||
pkgs.cairo
|
||||
pkgs.glib
|
||||
pkgs.gtk3
|
||||
];
|
||||
runtimeDependencies = [ pkgs.cups pkgs.cairo pkgs.glib pkgs.gtk3 ];
|
||||
runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "jdk${toString value.major_version}";
|
||||
src = builtins.fetchurl {
|
||||
url = value.link;
|
||||
|
@ -40,10 +35,7 @@
|
|||
xorg.libXtst
|
||||
zlib
|
||||
];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
makeWrapper
|
||||
];
|
||||
nativeBuildInputs = with pkgs; [ autoPatchelfHook makeWrapper ];
|
||||
dontStrip = 1;
|
||||
installPhase = ''
|
||||
cd ..
|
||||
|
@ -72,7 +64,9 @@
|
|||
for bin in $( find "$out" -executable -type f -not -name jspawnhelper ); do
|
||||
if patchelf --print-interpreter "$bin" &> /dev/null; then
|
||||
wrapProgram "$bin" --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}" \
|
||||
--prefix PATH : ${lib.makeBinPath [ pkgs.util-linux ]}
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [ pkgs.util-linux ]
|
||||
}
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
@ -81,13 +75,9 @@
|
|||
patchelf --add-needed libfontconfig.so {} \;
|
||||
'';
|
||||
};
|
||||
in
|
||||
with import nixpkgs { system = system; };
|
||||
{
|
||||
packages.temurin = (builtins.mapAttrs
|
||||
(name: value:
|
||||
buildAdoptLike name value
|
||||
)
|
||||
in with import nixpkgs { system = system; }; {
|
||||
packages.temurin =
|
||||
(builtins.mapAttrs (name: value: buildAdoptLike name value)
|
||||
sources.${system}.temurin.versions) // {
|
||||
latest = buildAdoptLike "latest" sources.${system}.temurin.latest;
|
||||
stable = buildAdoptLike "stable" sources.${system}.temurin.stable;
|
||||
|
@ -98,9 +88,8 @@
|
|||
packages.temurin-stable = self.packages.${system}.temurin.stable;
|
||||
packages.temurin-lts = self.packages.${system}.temurin.lts;
|
||||
|
||||
packages.semeru = (builtins.mapAttrs
|
||||
(name: value:
|
||||
buildAdoptLike name value)
|
||||
packages.semeru =
|
||||
(builtins.mapAttrs (name: value: buildAdoptLike name value)
|
||||
sources.${system}.semeru.versions) // {
|
||||
latest = buildAdoptLike "latest" sources.${system}.semeru.latest;
|
||||
stable = buildAdoptLike "stable" sources.${system}.semeru.stable;
|
||||
|
|
Loading…
Reference in New Issue