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 = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }: {
packages.x86_64-linux = let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
in {
outputs = { self, nixpkgs, ... }: let
forAllSystems = f: (nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: let
pkgs = import nixpkgs { inherit system; };
in f { inherit pkgs system; } ));
in {
packages = forAllSystems ({ pkgs, system, ... }: {
nixos-exporter = pkgs.rustPlatform.buildRustPackage rec {
pname = "nixos-exporter";
version = "0.6.0";
@ -25,20 +25,20 @@
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 = {
type = "app";
program = self.packages.x86_64-linux.nixos-exporter + "/bin/nixos-exporter";
program = self.packages."${system}".nixos-exporter + "/bin/nixos-exporter";
};
nixos-validator = {
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 = {
@ -166,7 +166,8 @@
};
hydraJobs = {
packages.x86_64-linux.nixos-exporter = self.packages.x86_64-linux.nixos-exporter;
inherit (self)
packages;
};
};
}