fix: filter packages by system in outputs
All checks were successful
Build packages / Build derivations (push) Successful in 1m50s
All checks were successful
Build packages / Build derivations (push) Successful in 1m50s
This commit is contained in:
parent
e73f7fc797
commit
f7c31b5b91
1 changed files with 13 additions and 2 deletions
15
flake.nix
15
flake.nix
|
@ -18,8 +18,19 @@
|
|||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
||||
|
||||
perSystem = {pkgs, ...}: {
|
||||
packages = self.overlays.default {} pkgs;
|
||||
perSystem = {
|
||||
lib,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
# output packages only if they are available on the system
|
||||
packages = let
|
||||
isAvailable = name: drv: lib.meta.availableOn {inherit system;} drv;
|
||||
flakePkgs = self.overlays.default {} pkgs;
|
||||
in
|
||||
lib.filterAttrs isAvailable flakePkgs;
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue