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