feat(zig): init zig template

This commit is contained in:
Artur Manuel 2025-01-25 19:12:23 +00:00
commit 8e52914770
11 changed files with 447 additions and 0 deletions

36
templates/zig/flake.nix Normal file
View file

@ -0,0 +1,36 @@
{
description = "REPLACE_ME";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
zig.url = "github:mitchellh/zig-overlay";
};
outputs = inputs @ {
self,
nixpkgs,
...
}: let
eachSystem = nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"];
makePkgs = system:
import nixpkgs {
inherit system;
overlays = [
inputs.zig.overlays.default
];
};
in {
packages = eachSystem (system: let
pkgs = makePkgs system;
in {
default = pkgs.callPackage ./flake/package.nix {};
REPLACE_ME = self.packages.${system}.default {};
});
devShells = eachSystem (system: let
pkgs = makePkgs system;
in {
default = pkgs.callPackage ./flake/shell.nix {};
});
};
}