feat(zig): init zig template
This commit is contained in:
parent
f79afe59c3
commit
8e52914770
11 changed files with 447 additions and 0 deletions
36
templates/zig/flake.nix
Normal file
36
templates/zig/flake.nix
Normal 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 {};
|
||||
});
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue