Skip to content

Commit

Permalink
Add default Nix overlay (#3847)
Browse files Browse the repository at this point in the history
Adding an overlay allows to easily change the version of `ghostty`
provided by `nixpkgs`:

```nix
pkgs = import nixpkgs {
  inherit system;
  overlays = [ ghostty.overlays.default ];
}
```

Then, all references to `pkgs.ghostty` would refer to this project's
package definition.
  • Loading branch information
mitchellh authored Dec 29, 2024
2 parents 9bef43f + 16f8135 commit d359231
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@
formatter.${system} = pkgs-stable.alejandra;

# Our supported systems are the same supported systems as the Zig binaries.
}) (builtins.attrNames zig.packages));
}) (builtins.attrNames zig.packages))
// {
overlays.default = final: prev: {
ghostty = self.packages.${prev.system}.default;
};
};

nixConfig = {
extra-substituters = ["https://ghostty.cachix.org"];
Expand Down

0 comments on commit d359231

Please sign in to comment.