Add Nim env
This commit is contained in:
parent
a19131a042
commit
79fd1fa0b6
|
@ -112,6 +112,11 @@ The sections below list what each template includes. In all cases, you're free t
|
||||||
- [Kotlin] 1.7.10-release-333
|
- [Kotlin] 1.7.10-release-333
|
||||||
- [Gradle] 7.5
|
- [Gradle] 7.5
|
||||||
|
|
||||||
|
### [`nim`](./nim)
|
||||||
|
|
||||||
|
- [Nim] 1.6.6
|
||||||
|
- [nimble] 0.13.1
|
||||||
|
|
||||||
### [`nix`](./nix/)
|
### [`nix`](./nix/)
|
||||||
|
|
||||||
- [Cachix]
|
- [Cachix]
|
||||||
|
@ -181,6 +186,8 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
|
||||||
[lorri]: https://github.com/target/lorri
|
[lorri]: https://github.com/target/lorri
|
||||||
[maven]: https://maven.apache.org
|
[maven]: https://maven.apache.org
|
||||||
[mix]: https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html
|
[mix]: https://elixir-lang.org/getting-started/mix-otp/introduction-to-mix.html
|
||||||
|
[nim]: https://nim-lang.org
|
||||||
|
[nimble]: https://github.com/nim-lang/nimble
|
||||||
[niv]: https://github.com/nmattia/niv
|
[niv]: https://github.com/nmattia/niv
|
||||||
[nix]: https://nixos.org
|
[nix]: https://nixos.org
|
||||||
[nix-cue]: https://github.com/jmgilman/nix-cue
|
[nix-cue]: https://github.com/jmgilman/nix-cue
|
||||||
|
|
|
@ -89,6 +89,11 @@
|
||||||
description = "Kotlin development environment";
|
description = "Kotlin development environment";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nim = {
|
||||||
|
path = ./nim;
|
||||||
|
description = "Nim development environment";
|
||||||
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
path = ./nix;
|
path = ./nix;
|
||||||
description = "Nix development environment";
|
description = "Nix development environment";
|
||||||
|
|
1
nim/.envrc
Normal file
1
nim/.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake .
|
60
nim/flake.lock
Normal file
60
nim/flake.lock
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"dev": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659293557,
|
||||||
|
"narHash": "sha256-isa3F8Dti7A4Vc0dYh3dNLLQhURZ/TPmaFSFGIoUqoY=",
|
||||||
|
"owner": "the-nix-way",
|
||||||
|
"repo": "dev-templates",
|
||||||
|
"rev": "a19131a04299feabd3e11849b481ade3ecd8588f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "the-nix-way",
|
||||||
|
"repo": "dev-templates",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1656928814,
|
||||||
|
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659291823,
|
||||||
|
"narHash": "sha256-8GrIQYelrtzEAXDWdfHpAodwrjL08mVES7nRDXSF9fE=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "4a778d9b98941fe28f0ac4b8400749a16dbb03fe",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"dev": "dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
23
nim/flake.nix
Normal file
23
nim/flake.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
description = "A Nix-flake-based Protobuf development environment";
|
||||||
|
|
||||||
|
inputs = { dev.url = "github:the-nix-way/dev-templates"; };
|
||||||
|
|
||||||
|
outputs = { self, dev }:
|
||||||
|
let inherit (dev.lib) flake-utils nixpkgs;
|
||||||
|
in flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
inherit (pkgs) mkShell nim;
|
||||||
|
in {
|
||||||
|
devShells = {
|
||||||
|
default = mkShell {
|
||||||
|
buildInputs = [ nim ];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
${nim}/bin/nim --version
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
|
@ -8,10 +8,10 @@
|
||||||
in flake-utils.lib.eachDefaultSystem (system:
|
in flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
inherit (pkgs) buf protobuf;
|
inherit (pkgs) buf mkShell protobuf;
|
||||||
in {
|
in {
|
||||||
devShells = {
|
devShells = {
|
||||||
default = pkgs.mkShell {
|
default = mkShell {
|
||||||
buildInputs = [ buf protobuf ];
|
buildInputs = [ buf protobuf ];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
|
Loading…
Reference in a new issue