aboutsummaryrefslogtreecommitdiffstats
path: root/flake.nix
diff options
context:
space:
mode:
authorsadbeast <sadbeast@sadbeast.com>2024-04-15 18:08:28 -0700
committersadbeast <sadbeast@sadbeast.com>2024-04-29 03:24:18 +0000
commitae440a8108ec8ed4b01b6f53fa2aab4d7f0df661 (patch)
treed0204bdf27618c77c7fb4372d3f453df0a0ae57b /flake.nix
downloadtmz-ae440a8108ec8ed4b01b6f53fa2aab4d7f0df661.tar.gz
tmz-ae440a8108ec8ed4b01b6f53fa2aab4d7f0df661.tar.bz2
initial mistake
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..53dec5f
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,53 @@
+{
+ description = "tmz - a library for loading Tiled Maps and Tilesets";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+
+ flake-parts.url = "github:hercules-ci/flake-parts";
+
+ devshell.url = "github:numtide/devshell";
+ treefmt-nix.url = "github:numtide/treefmt-nix";
+ };
+
+ outputs = inputs @ {flake-parts, ...}:
+ flake-parts.lib.mkFlake {inherit inputs;} {
+ imports = [
+ inputs.devshell.flakeModule
+ inputs.treefmt-nix.flakeModule
+ ];
+ systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
+ perSystem = {
+ config,
+ self',
+ inputs',
+ pkgs,
+ system,
+ ...
+ }: {
+ treefmt.config = {
+ projectRootFile = "flake.nix";
+
+ flakeCheck = true;
+ flakeFormatter = true;
+
+ programs.zig.enable = true;
+ programs.alejandra.enable = true;
+ };
+
+ devshells.default = {
+ commands = [
+ {
+ name = "fmt";
+ help = "format the repo";
+ command = "nix fmt";
+ }
+ ];
+
+ packages = [
+ pkgs.zig_0_12
+ ];
+ };
+ };
+ };
+}