-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and improve the nix flake (#512)
* fix(flake): `public` assets were moved to `kitsune/assets` Signed-off-by: Harald Hoyer <[email protected]> * feat(flake): use mold linker Signed-off-by: Harald Hoyer <[email protected]> * fix(flake): fix build dependency for openssl Native deps need the tools which run on the build host (when cross compiling). Normal build deps are the libs linked to the binary. OPENSSL_NO_VENDOR ensures that openssl-sys uses the system lib. Remove the rest of the workarounds for openssl. Signed-off-by: Harald Hoyer <[email protected]> * fix(flake): proper `mkYarnPackage` Signed-off-by: Harald Hoyer <[email protected]> * feat(flake): add overlay test Signed-off-by: Harald Hoyer <[email protected]> * fix(flake): skip more tests Signed-off-by: Harald Hoyer <[email protected]> * feat(flake): use the crane nix lib https://crane.dev/ enables caching of artifacts and potentially reducing build time. Even End to End(E2E) testing could be added: https://crane.dev/examples/end-to-end-testing.html Signed-off-by: Harald Hoyer <[email protected]> * ci(flake): add nix github action Signed-off-by: Harald Hoyer <[email protected]> * ci(flake): disable `cargo check` in nix flake Left as a separate commit, so it is easy to revert. Signed-off-by: Harald Hoyer <[email protected]> * ci(flake): run nixci in debug build by default normal flake produces release code still. Signed-off-by: Harald Hoyer <[email protected]> * ci(flake): build heavy stuff sequentially and skip running nixci. Signed-off-by: Harald Hoyer <[email protected]> * feat(flake): add `mrf-tool` and `kitsune-job-runner` Signed-off-by: Harald Hoyer <[email protected]> --------- Signed-off-by: Harald Hoyer <[email protected]>
- Loading branch information
Showing
6 changed files
with
180 additions
and
45 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,44 @@ | ||
name: Nix checks | ||
|
||
on: | ||
merge_group: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_LOG: "debug" | ||
RUSTFLAGS: "-C debuginfo=0" | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v4 | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- run: nix flake check -L --show-trace --keep-going --impure | ||
|
||
build: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@v4 | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: nix build main | ||
run: nix build --override-input debugBuild github:boolean-option/true/6ecb49143ca31b140a5273f1575746ba93c3f698 -L .#main | ||
- name: nix build cli | ||
run: nix build --override-input debugBuild github:boolean-option/true/6ecb49143ca31b140a5273f1575746ba93c3f698 -L .#cli | ||
- name: nix build frontend | ||
run: nix build --override-input debugBuild github:boolean-option/true/6ecb49143ca31b140a5273f1575746ba93c3f698 -L .#frontend | ||
- name: nix build mrf-tool | ||
run: nix build --override-input debugBuild github:boolean-option/true/6ecb49143ca31b140a5273f1575746ba93c3f698 -L .#mrf-tool | ||
|
||
- name: nix check overlay | ||
run: cd test-overlay && nix build --no-write-lock-file -L .#kitsune | ||
|
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 |
---|---|---|
|
@@ -25,3 +25,5 @@ target-analyzer | |
/result | ||
/.devenv | ||
/.pre-commit-config.yaml | ||
/test-overlay/flake.lock | ||
/test-overlay/result |
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
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
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,27 @@ | ||
{ | ||
inputs = { | ||
kitsune-overlay.url = "./.."; | ||
kitsune-overlay.inputs.debugBuild.follows = "debugBuild"; | ||
nixpkgs.follows = "kitsune-overlay/nixpkgs"; | ||
flake-utils.follows = "kitsune-overlay/flake-utils"; | ||
debugBuild.url = "github:boolean-option/true/6ecb49143ca31b140a5273f1575746ba93c3f698"; | ||
}; | ||
outputs = { self, flake-utils, nixpkgs, kitsune-overlay, ... } @ inputs: | ||
flake-utils.lib.eachDefaultSystem | ||
(system: | ||
let | ||
overlays = [ kitsune-overlay.overlays.default ]; | ||
pkgs = import nixpkgs { | ||
inherit overlays system; | ||
}; | ||
in | ||
{ | ||
formatter = pkgs.nixpkgs-fmt; | ||
packages = rec { | ||
default = kitsune; | ||
inherit (pkgs) kitsune; | ||
inherit (pkgs) kitsune-cli; | ||
}; | ||
} | ||
); | ||
} |