-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f8b0000
Showing
9 changed files
with
196 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# If we are a computer with nix-shell available, then use that to setup | ||
# the build environment with exactly what we need. | ||
if has nix-shell; then | ||
use nix | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
zig-cache/ | ||
zig-out/ | ||
/result* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "vendor/mach-glfw"] | ||
path = vendor/mach-glfw | ||
url = https://github.com/hexops/mach-glfw.git |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
description = "ghostty"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
zig.url = "github:roarkanize/zig-overlay"; | ||
|
||
# Used for shell.nix | ||
flake-compat = { url = github:edolstra/flake-compat; flake = false; }; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, ... }@inputs: | ||
let | ||
overlays = [ | ||
# Our repo overlay | ||
(import ./nix/overlay.nix) | ||
|
||
# Other overlays | ||
(final: prev: { | ||
zigpkgs = inputs.zig.packages.${prev.system}; | ||
}) | ||
]; | ||
|
||
# Our supported systems are the same supported systems as the Zig binaries | ||
systems = builtins.attrNames inputs.zig.packages; | ||
in flake-utils.lib.eachSystem systems (system: | ||
let pkgs = import nixpkgs { inherit overlays system; }; | ||
in rec { | ||
devShell = pkgs.devShell; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ mkShell | ||
|
||
, pkg-config | ||
, scdoc | ||
, zig | ||
}: mkShell rec { | ||
name = "ghostty"; | ||
|
||
nativeBuildInputs = [ | ||
pkg-config | ||
scdoc | ||
zig | ||
]; | ||
|
||
buildInputs = [ | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
final: prev: rec { | ||
# Notes: | ||
# | ||
# When determining a SHA256, use this to set a fake one until we know | ||
# the real value: | ||
# | ||
# vendorSha256 = nixpkgs.lib.fakeSha256; | ||
# | ||
|
||
devShell = prev.callPackage ./devshell.nix { }; | ||
|
||
# zig we want to be the latest nightly since 0.9.0 is not released yet. | ||
zig = final.zigpkgs.master.latest; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(import | ||
( | ||
let flake-compat = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.flake-compat; in | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/${flake-compat.locked.rev}.tar.gz"; | ||
sha256 = flake-compat.locked.narHash; | ||
} | ||
) | ||
{ src = ./.; }).shellNix |