feat: support multiple system architectures
This commit is contained in:
parent
3b14c37a52
commit
9e1adfa944
2 changed files with 16 additions and 22 deletions
20
flake.nix
20
flake.nix
|
@ -1,17 +1,27 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
inputs.systems.url = "github:nix-systems/default-linux";
|
||||
outputs =
|
||||
inputs:
|
||||
let
|
||||
inherit (inputs.nixpkgs) lib legacyPackages;
|
||||
forEachSystem = lib.genAttrs (import inputs.systems);
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
inherit (builtins) map listToAttrs;
|
||||
forAllSystems =
|
||||
f:
|
||||
listToAttrs (
|
||||
map (system: {
|
||||
name = system;
|
||||
value = f system;
|
||||
}) systems
|
||||
);
|
||||
in
|
||||
{
|
||||
packages = forEachSystem (
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = legacyPackages.${system};
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
default = pkgs.callPackage ./nix/package.nix { };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue