feat(zig): init zig template
This commit is contained in:
parent
f79afe59c3
commit
8e52914770
11 changed files with 447 additions and 0 deletions
24
templates/zig/flake/package.nix
Normal file
24
templates/zig/flake/package.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
stdenv,
|
||||
zigpkgs,
|
||||
zig,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "REPLACE_ME";
|
||||
version = "REPLACE_VER";
|
||||
|
||||
src = ../.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
(zig.hook.overrideAttrs (_: {
|
||||
propagatedBuildInputs = [
|
||||
zigpkgs.master
|
||||
];
|
||||
}))
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "REPLACE_DESC";
|
||||
homepage = "REPLACE_HOME";
|
||||
};
|
||||
}
|
9
templates/zig/flake/shell.nix
Normal file
9
templates/zig/flake/shell.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
mkShell,
|
||||
zigpkgs,
|
||||
}:
|
||||
mkShell {
|
||||
packages = [
|
||||
zigpkgs.master
|
||||
];
|
||||
}
|
14
templates/zig/flake/zig.nix
Normal file
14
templates/zig/flake/zig.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
zig,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
zig.overrideAttrs (finalAttrs: {
|
||||
version = "unstable-2025-01-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ziglang";
|
||||
repo = finalAttrs.pname;
|
||||
rev = "d0d5ca2b6c8253c27e945ed8d973a90c28a3cbf5";
|
||||
hash = "sha256-v5B8vS2zA+e9OArPaprrLfIsehiSRCK7aZsziKhygRI=";
|
||||
};
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue