mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 08:14:00 +01:00
flake: Add package support for aarch64
This commit is contained in:
parent
c93a5203b7
commit
dd58dff955
28
flake.nix
28
flake.nix
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user