Update from source

This commit is contained in:
Lillian Violet 2024-04-25 12:26:02 +02:00
parent c0a10971eb
commit 89ab4c3423
17 changed files with 321 additions and 146 deletions

View file

@ -28,18 +28,19 @@ Once your preferred template has been initialized, you can use the provided shel
## Available templates ## Available templates
| Language/framework/tool | Template | | Language/framework/tool | Template |
| :----------------------- | :-----------------------------| | :----------------------- | :---------------------------- |
| [Clojure] | [`clojure`](./clojure/) | | [Clojure] | [`clojure`](./clojure/) |
| [C#][csharp] | [`csharp`](./csharp/) | | [C#][csharp] | [`csharp`](./csharp/) |
| [Cue] | [`cue`](./cue/) | | [Cue] | [`cue`](./cue/) |
| [Dhall] | [`dhall`](./dhall/) | | [Dhall] | [`dhall`](./dhall/) |
| [Elixir] | [`elixir`](./elixir/) | | [Elixir] | [`elixir`](./elixir/) |
| [Elm] | [`elm`](./elm/) | | [Elm] | [`elm`](./elm/) |
| Empty (change at will) | [`empty`](./empty) |
| [Gleam] | [`gleam`](./gleam/) | | [Gleam] | [`gleam`](./gleam/) |
| [Go] | [`go`](./go/) | | [Go] | [`go`](./go/) |
| [Hashicorp] tools | [`hashi`](./hashi/) | | [Hashicorp] tools | [`hashi`](./hashi/) |
| [Haxe] | [`haxe`](./haxe/) |
| [Java] | [`java`](./java/) | | [Java] | [`java`](./java/) |
| [Jupyter] | [`jupyter`](./jupyter/) |
| [Kotlin] | [`kotlin`](./kotlin/) | | [Kotlin] | [`kotlin`](./kotlin/) |
| [LaTeX] | [`latex`](./latex/) | | [LaTeX] | [`latex`](./latex/) |
| [Nickel] | [`nickel`](./nickel/) | | [Nickel] | [`nickel`](./nickel/) |
@ -56,6 +57,7 @@ Once your preferred template has been initialized, you can use the provided shel
| [Rust] | [`rust`](./rust/) | | [Rust] | [`rust`](./rust/) |
| [Scala] | [`scala`](./scala/) | | [Scala] | [`scala`](./scala/) |
| [Shell] | [`shell`](./shell/) | | [Shell] | [`shell`](./shell/) |
| [Vlang] | [`vlang`](./vlang/) |
| [Zig] | [`zig`](./zig/) | | [Zig] | [`zig`](./zig/) |
## Template contents ## Template contents
@ -102,6 +104,10 @@ The sections below list what each template includes. In all cases, you're free t
- [Elm] 0.19.1 - [Elm] 0.19.1
- [elm2nix] - [elm2nix]
### [Empty](./empty/)
A dev template that's fully customizable.
### [`gleam`](./gleam/) ### [`gleam`](./gleam/)
- [Gleam] 0.30.0 - [Gleam] 0.30.0
@ -130,11 +136,16 @@ The sections below list what each template includes. In all cases, you're free t
- [GHC][haskell] 9.2.8 - [GHC][haskell] 9.2.8
- [cabal] 3.10.1.0 - [cabal] 3.10.1.0
### [`haxe`](./haxe/)
- [Haxe] 4.2.5
### [`java`](./java) ### [`java`](./java)
- [Java] 20.0.1+9 - [Java] 20.0.1+9
- [Maven] 3.9.2 - [Maven] 3.9.2
- [Gradle] 9.0.1 - [Gradle] 9.0.1
- [jdtls] 1.31.0
### [`kotlin`](./kotlin/) ### [`kotlin`](./kotlin/)
@ -217,7 +228,6 @@ The sections below list what each template includes. In all cases, you're free t
- [Python] 3.11.4 - [Python] 3.11.4
- [pip] 23.0.1 - [pip] 23.0.1
- [Virtualenv] 20.19.0
### [`ruby`](./ruby/) ### [`ruby`](./ruby/)
@ -244,6 +254,10 @@ The sections below list what each template includes. In all cases, you're free t
- [shellcheck] 0.9.0 - [shellcheck] 0.9.0
### [`Vlang`](./vlang/)
- [Vlang] 0.4.4
### [`zig`](./zig/) ### [`zig`](./zig/)
- [Zig] 0.10.1 - [Zig] 0.10.1
@ -292,8 +306,10 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[gradle]: https://gradle.org [gradle]: https://gradle.org
[hashicorp]: https://hashicorp.com [hashicorp]: https://hashicorp.com
[haskell]: https://haskell.org [haskell]: https://haskell.org
[haxe]: https://haxe.org/
[iex]: https://hexdocs.pm/iex/IEx.html [iex]: https://hexdocs.pm/iex/IEx.html
[java]: https://java.com [java]: https://java.com
[jdtls]: https://projects.eclipse.org/projects/eclipse.jdt.ls
[jq]: https://jqlang.github.io/jq [jq]: https://jqlang.github.io/jq
[kotlin]: https://kotlinlang.org [kotlin]: https://kotlinlang.org
[latex]: https://www.latex-project.org/ [latex]: https://www.latex-project.org/
@ -350,8 +366,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[texlive]: https://www.tug.org/texlive/ [texlive]: https://www.tug.org/texlive/
[tflint]: https://github.com/terraform-linters/tflint [tflint]: https://github.com/terraform-linters/tflint
[vault]: https://www.vaultproject.io [vault]: https://www.vaultproject.io
[virtualenv]: https://pypi.org/project/virtualenv
[vulnix]: https://github.com/flyingcircusio/vulnix [vulnix]: https://github.com/flyingcircusio/vulnix
[yarn]: https://yarnpkg.com [yarn]: https://yarnpkg.com
[vlang]: https://vlang.io/
[zig]: https://ziglang.org [zig]: https://ziglang.org

View file

@ -15,10 +15,12 @@
default = pkgs.mkShell { default = pkgs.mkShell {
packages = (with pkgs; [ elixir ]) ++ packages = (with pkgs; [ elixir ]) ++
# Linux only # Linux only
pkgs.lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [ gigalixir inotify-tools libnotify ]) ++ (pkgs.lib.optionals (pkgs.stdenv.isLinux)
(with pkgs; [ gigalixir inotify-tools libnotify ])) ++
# macOS only # macOS only
pkgs.lib.optionals (pkgs.stdenv.isDarwin) (with pkgs; [ terminal-notifier ]) ++ pkgs.lib.optionals (pkgs.stdenv.isDarwin)
(with pkgs.darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]); ((with pkgs; [ terminal-notifier ]) ++
(with pkgs.darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices ]));
}; };
}); });
}; };

25
empty/flake.lock Normal file
View file

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1712963716,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
"revCount": 611350,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/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
}

39
empty/flake.nix Normal file
View file

@ -0,0 +1,39 @@
{
description = "An empty flake template that you can adapt to your own environment";
# Flake inputs
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
# Flake outputs
outputs = { self, nixpkgs }:
let
# The systems supported for this flake
supportedSystems = [
"x86_64-linux" # 64-bit Intel/AMD Linux
"aarch64-linux" # 64-bit ARM Linux
"x86_64-darwin" # 64-bit Intel macOS
"aarch64-darwin" # 64-bit ARM macOS
];
# Helper to provide system-specific attributes
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
# The Nix packages provided in the environment
# Add any you need here
packages = with pkgs; [ ];
# Set any environment variables for your dev shell
env = { };
# Add any shell logic you want executed any time the environment is activated
shellHook = ''
'';
};
});
};
}

114
flake.nix
View file

@ -3,18 +3,53 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { outputs = { self, nixpkgs }:
self, let
nixpkgs,
}: let
overlays = [ overlays = [
(final: prev: let (final: prev:
exec = pkg: "${prev.${pkg}}/bin/${pkg}"; let
in { getSystem = "SYSTEM=$(nix eval --impure --raw --expr 'builtins.currentSystem')";
format = prev.writeScriptBin "format" '' forEachDir = exec: ''
${exec "nixpkgs-fmt"} **/*.nix for dir in */; do
(
cd "''${dir}"
${exec}
)
done
''; '';
dvt = prev.writeScriptBin "dvt" '' in
{
format = final.writeShellApplication {
name = "format";
runtimeInputs = with final; [ nixpkgs-fmt ];
text = "nixpkgs-fmt '**/*.nix'";
};
# only run this locally, as Actions will run out of disk space
build = final.writeShellApplication {
name = "build";
text = ''
${getSystem}
${forEachDir ''
echo "building ''${dir}"
nix build ".#devShells.''${SYSTEM}.default"
''}
'';
};
check = final.writeShellApplication {
name = "check";
text = forEachDir ''
echo "checking ''${dir}"
nix flake check --all-systems --no-build
'';
};
dvt = final.writeShellApplication {
name = "dvt";
text = ''
if [ -z $1 ]; then if [ -z $1 ]; then
echo "no template specified" echo "no template specified"
exit 1 exit 1
@ -22,43 +57,44 @@
TEMPLATE=$1 TEMPLATE=$1
${exec "nix"} \ nix \
--experimental-features 'nix-command flakes' \ --experimental-features 'nix-command flakes' \
flake init \ flake init \
--template \ --template \
"git+https://git.lillianviolet.dev/Lillian-Violet/dev-templates.git#''${TEMPLATE}" "github:the-nix-way/dev-templates#''${TEMPLATE}"
''; '';
update = prev.writeScriptBin "update" '' };
for dir in `ls -d */`; do # Iterate through all the templates
( update = final.writeShellApplication {
cd $dir name = "update";
${exec "nix"} flake update # Update flake.lock text = forEachDir ''
${exec "nix"} flake check # Make sure things work after the update echo "updating ''${dir}"
) nix flake update
done
''; '';
};
}) })
]; ];
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
nixpkgs.lib.genAttrs supportedSystems (system: pkgs = import nixpkgs { inherit overlays system; };
f {
pkgs = import nixpkgs {inherit overlays system;};
}); });
in in
{ {
devShells = forEachSupportedSystem ({pkgs}: { devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; [format update]; packages = with pkgs; [ build check format update ];
}; };
}); });
packages = forEachSupportedSystem ({pkgs}: rec { packages = forEachSupportedSystem ({ pkgs }: rec {
default = dvt; default = dvt;
inherit (pkgs) dvt; inherit (pkgs) dvt;
}); });
} }
// {
//
{
templates = rec { templates = rec {
clojure = { clojure = {
path = ./clojure; path = ./clojure;
@ -90,6 +126,11 @@
description = "Elm development environment"; description = "Elm development environment";
}; };
empty = {
path = ./empty;
description = "Empty dev template that you can customize at will";
};
gleam = { gleam = {
path = ./gleam; path = ./gleam;
description = "Gleam development environment"; description = "Gleam development environment";
@ -115,11 +156,6 @@
description = "Java development environment"; description = "Java development environment";
}; };
jupyter = {
path = ./jupyter;
description = "Jupyter development environment";
};
kotlin = { kotlin = {
path = ./kotlin; path = ./kotlin;
description = "Kotlin development environment"; description = "Kotlin development environment";
@ -190,11 +226,6 @@
description = "Rust development environment"; description = "Rust development environment";
}; };
rustpython = {
path = ./rustpython;
description = "Rustpython development environment";
};
rust-toolchain = { rust-toolchain = {
path = ./rust-toolchain; path = ./rust-toolchain;
description = "Rust development environment with Rust version defined by a rust-toolchain.toml file"; description = "Rust development environment with Rust version defined by a rust-toolchain.toml file";
@ -210,6 +241,11 @@
description = "Shell script development environment"; description = "Shell script development environment";
}; };
vlang = {
path = ./vlang;
description = "Vlang developent environment";
};
zig = { zig = {
path = ./zig; path = ./zig;
description = "Zig development environment"; description = "Zig development environment";

View file

@ -1,11 +1,11 @@
{ {
description = "A Nix-flake-based Go 1.17 development environment"; description = "A Nix-flake-based Go 1.22 development environment";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = { self, nixpkgs }: outputs = { self, nixpkgs }:
let let
goVersion = 20; # Change this to update the whole stack goVersion = 22; # Change this to update the whole stack
overlays = [ (final: prev: { go = prev."go_1_${toString goVersion}"; }) ]; overlays = [ (final: prev: { go = prev."go_1_${toString goVersion}"; }) ];
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
@ -16,8 +16,8 @@
devShells = forEachSupportedSystem ({ pkgs }: { devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
# go 1.20 (specified by overlay) # go 1.22 (specified by overlay)
go go_1_22
# goimports, godoc, etc. # goimports, godoc, etc.
gotools gotools

25
haxe/flake.lock Normal file
View file

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1712963716,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
"revCount": 611350,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/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
}

26
haxe/flake.nix Normal file
View file

@ -0,0 +1,26 @@
{
description = "A Nix-flake-based Haxe 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; [ haxe ];
};
});
};
}

View file

@ -3,11 +3,7 @@
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = outputs = { self, nixpkgs }:
{ self
, nixpkgs
,
}:
let let
javaVersion = 20; # Change this value to update the whole stack javaVersion = 20; # Change this value to update the whole stack
overlays = [ overlays = [
@ -18,22 +14,14 @@
}) })
]; ];
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
}); });
in in
{ {
devShells = forEachSupportedSystem ({ pkgs }: { devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; [ gradle jdk maven ]; packages = with pkgs; [ gradle jdk maven jdt-language-server ];
programs.vscode = {
extensions = with pkgs.vscode-extensions; [
mkhl.direnv
redhat.java
];
};
}; };
}); });
}; };

View file

@ -17,11 +17,10 @@
cachix cachix
lorri lorri
niv niv
nixfmt nixfmt-classic
statix statix
vulnix vulnix
haskellPackages.dhall-nix haskellPackages.dhall-nix
rnix-lsp
]; ];
}; };
}); });

View file

@ -25,7 +25,7 @@
python311 python311
# Go SDK # Go SDK
go_1_20 go_1_22
# Node.js SDK # Node.js SDK
nodejs nodejs

View file

@ -9,17 +9,10 @@
}; };
}; };
outputs = outputs = { self, nixpkgs, easy-purescript-nix }:
{ self
, nixpkgs
, easy-purescript-nix
,
}:
let let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; # "aarch64-linux" not supported supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; # "aarch64-linux" not supported
forEachSupportedSystem = f: forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
}); });
in in
@ -30,9 +23,7 @@
easy-ps = import easy-purescript-nix { inherit pkgs; }; easy-ps = import easy-purescript-nix { inherit pkgs; };
in in
pkgs.mkShell { pkgs.mkShell {
packages = packages = (with pkgs; [ nodejs ]) ++ (with easy-ps; [
(with pkgs; [ nodejs ])
++ (with easy-ps; [
purs purs
spago spago
purescript-language-server purescript-language-server

View file

@ -3,25 +3,22 @@
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = outputs = { self, nixpkgs }:
{ self
, nixpkgs
,
}:
let let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
}); });
in in
{ {
devShells = forEachSupportedSystem ({ pkgs }: { devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; venvDir = "venv";
[ python312 virtualenv ] packages = with pkgs; [ python311 ] ++
++ (with pkgs.python312Packages; [ pip ]); (with pkgs.python311Packages; [
pip
venvShellHook
]);
}; };
}); });
}; };

View file

@ -9,12 +9,7 @@
}; };
}; };
outputs = outputs = { self, nixpkgs, rust-overlay }:
{ self
, nixpkgs
, rust-overlay
,
}:
let let
overlays = [ overlays = [
rust-overlay.overlays.default rust-overlay.overlays.default
@ -23,9 +18,7 @@
}) })
]; ];
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
}); });
in in

View file

@ -9,12 +9,7 @@
}; };
}; };
outputs = outputs = { self, nixpkgs, rust-overlay }:
{ self
, nixpkgs
, rust-overlay
,
}:
let let
overlays = [ overlays = [
rust-overlay.overlays.default rust-overlay.overlays.default
@ -23,10 +18,10 @@
let let
rust = prev.rust-bin; rust = prev.rust-bin;
in in
if builtins.pathExists ./rust-toolchain.toml if builtins.pathExists ./rust-toolchain.toml then
then rust.fromRustupToolchainFile ./rust-toolchain.toml rust.fromRustupToolchainFile ./rust-toolchain.toml
else if builtins.pathExists ./rust-toolchain else if builtins.pathExists ./rust-toolchain then
then rust.fromRustupToolchainFile ./rust-toolchain rust.fromRustupToolchainFile ./rust-toolchain
else else
rust.stable.latest.default.override { rust.stable.latest.default.override {
extensions = [ "rust-src" "rustfmt" ]; extensions = [ "rust-src" "rustfmt" ];
@ -34,9 +29,7 @@
}) })
]; ];
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
}); });
in in
@ -45,7 +38,6 @@
default = pkgs.mkShell { default = pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
rustToolchain rustToolchain
rustup
openssl openssl
pkg-config pkg-config
cargo-deny cargo-deny

25
vlang/flake.lock Normal file
View file

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1712963716,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
"revCount": 611350,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/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
];
};
});
};
}