1
1
Fork 0
mirror of https://github.com/the-nix-way/dev-templates synced 2024-05-05 20:16:03 +02:00
This commit is contained in:
vieta 2024-02-02 09:35:49 +01:00
parent cb94157e1a
commit 4d56c82096
6 changed files with 62 additions and 3 deletions

View File

@ -56,6 +56,7 @@ Once your preferred template has been initialized, you can use the provided shel
| [Rust] | [`rust`](./rust/) |
| [Scala] | [`scala`](./scala/) |
| [Shell] | [`shell`](./shell/) |
| [Vlang] | [`vlang`](./shell/) |
| [Zig] | [`zig`](./zig/) |
## Template contents
@ -248,6 +249,10 @@ The sections below list what each template includes. In all cases, you're free t
- [shellcheck] 0.9.0
### [`Vlang`](./vlang/)
- [Vlang] 0.4.4
### [`zig`](./zig/)
- [Zig] 0.10.1
@ -358,4 +363,5 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[virtualenv]: https://pypi.org/project/virtualenv
[vulnix]: https://github.com/flyingcircusio/vulnix
[yarn]: https://yarnpkg.com
[vlang]: https://vlang.io/
[zig]: https://ziglang.org

View File

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1689261696,
"narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=",
"lastModified": 1706683685,
"narHash": "sha256-FtPPshEpxH/ewBOsdKBNhlsL2MLEFv1hEnQ19f/bFsQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "df1eee2aa65052a18121ed4971081576b25d6b5c",
"rev": "5ad9903c16126a7d949101687af0aa589b1d7d3d",
"type": "github"
},
"original": {

View File

@ -201,6 +201,11 @@
description = "Shell script development environment";
};
vlang = {
path = ./vlang;
description = "Vlang developent environment";
};
zig = {
path = ./zig;
description = "Zig development environment";

1
vlang/.envrc Normal file
View File

@ -0,0 +1 @@
use flake

25
vlang/flake.lock Normal file
View File

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1706550542,
"narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=",
"rev": "97b17f32362e475016f942bbdfda4a4a72a8a652",
"revCount": 577948,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.577948%2Brev-97b17f32362e475016f942bbdfda4a4a72a8a652/018d5e85-4e02-7200-b411-d764d60cd44e/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

22
vlang/flake.nix Normal file
View File

@ -0,0 +1,22 @@
{
description = "A Nix-flake-based Vlang development environment";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
vlang
];
};
});
};
}