1
0

Build for aarch64-linux

This commit is contained in:
clerie 2024-08-25 14:37:20 +02:00
parent 5e86139ee4
commit d3d2f6bf5e

View File

@ -2,12 +2,12 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
}; };
outputs = { self, nixpkgs, ... }: { outputs = { self, nixpkgs, ... }: let
packages.x86_64-linux = let forAllSystems = f: (nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: let
pkgs = import nixpkgs { pkgs = import nixpkgs { inherit system; };
system = "x86_64-linux"; in f { inherit pkgs system; } ));
}; in {
in { packages = forAllSystems ({ pkgs, system, ... }: {
nixos-exporter = pkgs.rustPlatform.buildRustPackage rec { nixos-exporter = pkgs.rustPlatform.buildRustPackage rec {
pname = "nixos-exporter"; pname = "nixos-exporter";
version = "0.6.0"; version = "0.6.0";
@ -25,20 +25,20 @@
cargoLock.lockFile = ./Cargo.lock; cargoLock.lockFile = ./Cargo.lock;
}; };
default = self.packages.x86_64-linux.nixos-exporter; default = self.packages."${system}".nixos-exporter;
}; });
apps.x86_64-linux = { apps = forAllSystems ({ pkgs, system, ... }: {
nixos-exporter = { nixos-exporter = {
type = "app"; type = "app";
program = self.packages.x86_64-linux.nixos-exporter + "/bin/nixos-exporter"; program = self.packages."${system}".nixos-exporter + "/bin/nixos-exporter";
}; };
nixos-validator = { nixos-validator = {
type = "app"; type = "app";
program = self.packages.x86_64-linux.nixos-exporter + "/bin/nixos-validator"; program = self.packages."${system}".nixos-exporter + "/bin/nixos-validator";
}; };
default = self.apps.x86_64-linux.nixos-exporter; default = self.apps."${system}".nixos-exporter;
}; });
nixosModules = { nixosModules = {
@ -166,7 +166,8 @@
}; };
hydraJobs = { hydraJobs = {
packages.x86_64-linux.nixos-exporter = self.packages.x86_64-linux.nixos-exporter; inherit (self)
packages;
}; };
}; };
} }