Add Nim env
This commit is contained in:
parent
a19131a042
commit
79fd1fa0b6
6 changed files with 98 additions and 2 deletions
1
nim/.envrc
Normal file
1
nim/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake .
|
60
nim/flake.lock
generated
Normal file
60
nim/flake.lock
generated
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
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue