Skip to content

Commit

Permalink
chore: drop flake-utils
Browse files Browse the repository at this point in the history
flake-utils' main utility is making flakes easier to make. but more
modernly they don't provide much utility above of overrideable systems,
which is not being utlised here. So instead lets remove the input and
vendor our own "forAllSystems" function to recreate what we previously
used flake-utils for.
  • Loading branch information
isabelroses committed Jan 4, 2025
1 parent ac3945e commit 77d8887
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 45 deletions.
34 changes: 0 additions & 34 deletions flake.lock

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

27 changes: 16 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,40 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nix-darwin.url = "github:LnL7/nix-darwin";
flake-utils.url = "github:numtide/flake-utils";
brew-src = {
url = "github:Homebrew/brew/4.4.5";
flake = false;
};
};

outputs = { self, nixpkgs, nix-darwin, flake-utils, brew-src, ... } @ inputs: let
outputs = { self, nixpkgs, nix-darwin, brew-src, ... } @ inputs: let
# System types to support.
supportedSystems = [ "x86_64-darwin" "aarch64-darwin" ];

flakeLock = builtins.fromJSON (builtins.readFile ./flake.lock);
brewVersion = flakeLock.nodes.brew-src.original.ref;
in flake-utils.lib.eachSystem supportedSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};

forAllSystems =
function:
nixpkgs.lib.genAttrs supportedSystems (
system: function nixpkgs.legacyPackages.${system}
);
in {
packages = pkgs.callPackage ./pkgs {
packages = forAllSystems (pkgs: pkgs.callPackage ./pkgs {
inherit inputs;
};
devShell = pkgs.mkShell {
});

devShell = forAllSystems (pkgs: pkgs.mkShell {
nativeBuildInputs = with pkgs; [
];

BREW_SRC = brew-src;
};
ci = import ./ci (inputs // {
inherit pkgs;
});
}) // {

ci = forAllSystems (pkgs: import ./ci (inputs // {
inherit pkgs;
}));

darwinModules = {
nix-homebrew = { lib, ... }: {
imports = [
Expand Down

0 comments on commit 77d8887

Please sign in to comment.