flake.nix: make gitea workflows runnable locally through nix run
Build and test / build (push) Successful in 1m0s
Build and test / test (push) Successful in 1m6s
Build and test / build-freebsd-cross (push) Successful in 1m45s

This commit is contained in:
2026-06-11 04:33:44 +09:00
parent 89571ab9a2
commit 4ea2888ddf
+23
View File
@@ -9,6 +9,29 @@
pkgs = import nixpkgs { inherit system; };
inherit (pkgs) lib;
in {
apps.${system} = lib.genAttrs' [
"build"
"build-freebsd-cross"
"test"
] (name: {
name = "gitea-workflows-${name}";
value = {
type = "app";
meta.description = "Run ${name} gitea workflow job locally";
program = toString (pkgs.writeShellScript "wamf-run-gitea-worflows-${name}" ''
${lib.getExe pkgs.gitea-actions-runner} exec --job '${name}' --image node:current-trixie
'');
};
}) // {
gitea-workflows = {
type = "app";
meta.description = "Run all gitea workflow jobs locally";
program = toString (pkgs.writeShellScript "wamf-run-gitea-worflows" ''
${lib.getExe pkgs.gitea-actions-runner} exec --image node:current-trixie
'');
};
};
devShells.${system}.default = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
packages = with pkgs; [
clang-tools