templates: init nim
This commit is contained in:
parent
867cacfe49
commit
91e9d48c82
4 changed files with 38 additions and 0 deletions
|
@ -19,4 +19,8 @@
|
||||||
path = ./godot;
|
path = ./godot;
|
||||||
description = "A template for working on a Godot game or project";
|
description = "A template for working on a Godot game or project";
|
||||||
};
|
};
|
||||||
|
nim = {
|
||||||
|
path = ./nim;
|
||||||
|
description = "A template for working on a Nim project";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
1
templates/nim/.envrc
Normal file
1
templates/nim/.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
2
templates/nim/.gitignore
vendored
Normal file
2
templates/nim/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/target
|
||||||
|
/.direnv
|
31
templates/nim/flake.nix
Normal file
31
templates/nim/flake.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
}: let
|
||||||
|
inherit (self) outputs;
|
||||||
|
supportedSystems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
forEachSupportedSystem = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
in {
|
||||||
|
devShells = forEachSupportedSystem (system: let
|
||||||
|
pkgs = import nixpkgs {inherit system;};
|
||||||
|
in {
|
||||||
|
nim-dev = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
nim
|
||||||
|
nimble
|
||||||
|
nimlangserver
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
default = outputs.devShells.${system}.nim-dev;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue