Skip to content

Commit

Permalink
nix: replace flake-utils with polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
FalsePattern authored and Techatrix committed Feb 8, 2025
1 parent b733071 commit 4b4aafc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 39 deletions.
36 changes: 1 addition & 35 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,23 @@

gitignore.url = "github:hercules-ci/gitignore.nix";
gitignore.inputs.nixpkgs.follows = "nixpkgs";

flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, zig-overlay, gitignore, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
outputs = { self, nixpkgs, zig-overlay, gitignore }: let
inherit (nixpkgs) lib;

# flake-utils polyfill
eachSystem = systems: fn:
lib.foldl' (
acc: system:
lib.recursiveUpdate
acc
(lib.mapAttrs (_: value: {${system} = value;}) (fn system))
) {}
systems;

systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
in eachSystem systems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
zig = zig-overlay.packages.${system}.master;
Expand Down

0 comments on commit 4b4aafc

Please sign in to comment.