diff options
| author | seth <[email protected]> | 2023-05-27 15:33:46 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-05-27 15:33:46 -0400 |
| commit | 8bbc8d7a95b72d8fb8846a00cb0f3450fedaebe7 (patch) | |
| tree | 688698c2b301632c642a16ba321566df857d5e63 | |
| parent | abd5527cb52b2a7d0226b569ffd5a3e9f40ce5a8 (diff) | |
flake: add forEachSystem fn
| -rw-r--r-- | flake.nix | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -28,6 +28,7 @@ forAllSystems = nixpkgs.lib.genAttrs systems; nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); + forEachSystem = fn: forAllSystems (s: fn nixpkgsFor.${s}); packageSet = pkgs: with pkgs; { @@ -49,7 +50,7 @@ hydraJobs = import ./modules/flake/hydraJobs.nix; }; - formatter = forAllSystems (system: nixpkgsFor.${system}.alejandra); + formatter = forEachSystem (pkgs: pkgs.alejandra); hydraJobs = let supportedSystems = [ @@ -63,9 +64,8 @@ packages = mkCompatiblePkgs self.packages; }; - packages = forAllSystems ( - system: let - pkgs = nixpkgsFor.${system}; + packages = forEachSystem ( + pkgs: let p = packageSet pkgs; in p // {default = p.treefetch;} |
