flake: Add package support for aarch64

This commit is contained in:
Donovan Glover 2024-06-16 12:21:59 -04:00
parent c93a5203b7
commit dd58dff955
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -100,14 +100,33 @@
name = replaceStrings [ ".nix" ] [ "" ] file; name = replaceStrings [ ".nix" ] [ "" ] file;
value = value =
if directory == "packages" if directory == "packages"
then callPackage ./${directory}/${file} { } then x86_64-linux.callPackage ./${directory}/${file} { }
else else
if directory == "tests" if directory == "tests"
then then
import ./${directory}/${file} import ./${directory}/${file}
{ {
inherit self; inherit self;
pkgs = nixpkgs.legacyPackages.x86_64-linux; pkgs = x86_64-linux;
}
else import ./${directory}/${file};
})
(attrNames (readDir ./${directory}))));
aarch64Packages = (listToAttrs
(map
(file: {
name = replaceStrings [ ".nix" ] [ "" ] file;
value =
if directory == "packages"
then aarch64-linux.callPackage ./${directory}/${file} { }
else
if directory == "tests"
then
import ./${directory}/${file}
{
inherit self;
pkgs = aarch64-linux;
} }
else import ./${directory}/${file}; else import ./${directory}/${file};
}) })
@ -115,7 +134,10 @@
attributeSet = attributeSet =
if directory == "packages" || directory == "tests" if directory == "packages" || directory == "tests"
then { x86_64-linux = attributeValue; } then {
x86_64-linux = attributeValue;
aarch64-linux = aarch64Packages;
}
else attributeValue; else attributeValue;
in in
(attributeSet); (attributeSet);