-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e534a32
commit 013ddc5
Showing
4 changed files
with
313 additions
and
0 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 @@ | ||
use flake |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
zig-cache | ||
zig-out | ||
.direnv |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
description = "For lua environment"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
zig-overlay.url = "github:mitchellh/zig-overlay"; | ||
zls-overlay.url = "github:zigtools/zls"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, ... }@ inputs: | ||
let | ||
systems = [ | ||
# "aarch64-linux" | ||
# "i686-linux" | ||
# "aarch64-darwin" | ||
# "x86_64-darwin" | ||
"x86_64-linux" | ||
]; | ||
# This is a function that generates an attribute by calling a function you | ||
# pass to it, with each system as an argument | ||
forAllSystems = nixpkgs.lib.genAttrs systems; | ||
in | ||
{ | ||
# This is for using nix direnv and flake develop environment | ||
devShells = forAllSystems (system: | ||
let | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
overlays = [ | ||
inputs.zig-overlay.overlays.default | ||
(final: prev: { | ||
zlspkgs = inputs.zls-overlay.packages.${system}.default; | ||
}) | ||
]; | ||
}; | ||
in | ||
{ | ||
default = | ||
pkgs.mkShell { | ||
packages = with pkgs; [ | ||
zigpkgs.default | ||
zls | ||
nodePackages.live-server | ||
]; | ||
}; | ||
|
||
nightly = | ||
pkgs.mkShell { | ||
packages = with pkgs;[ | ||
zigpkgs.master | ||
zlspkgs | ||
nodePackages.live-server | ||
]; | ||
}; | ||
}); | ||
}; | ||
} |