-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Felix "xq" Queißner
committed
Jun 15, 2024
1 parent
02d2608
commit e39cd84
Showing
4 changed files
with
228 additions
and
2 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,23 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Zig | ||
uses: mlugg/setup-zig@v1 | ||
with: | ||
version: 0.13.0 | ||
|
||
- name: Build | ||
run: | | ||
zig build |
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
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,49 @@ | ||
{ | ||
description = "HyperDoc, a simple hyper document format"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
zig.url = "github:mitchellh/zig-overlay"; | ||
}; | ||
|
||
outputs = { | ||
self, | ||
nixpkgs, | ||
flake-utils, | ||
... | ||
} @ inputs: let | ||
overlays = [ | ||
# 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 let | ||
zig = pkgs.zigpkgs."0.13.0"; | ||
in rec { | ||
packages.default = pkgs.stdenv.mkDerivation { | ||
name = "hyperdoc"; | ||
src = ./.; | ||
nativeBuildInputs = [zig]; | ||
|
||
configurePhase = ""; | ||
|
||
buildPhase = '' | ||
zig build | ||
''; | ||
|
||
installPhase = '' | ||
mv zig-out $out | ||
''; | ||
}; | ||
} | ||
); | ||
} |