nix/lib/templates/nim/flake.nix

39 lines
770 B
Nix
Raw Normal View History

2024-04-10 21:02:52 -05:00
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2025-02-14 13:31:18 -06:00
outputs =
{
self,
nixpkgs,
}:
let
inherit (self) outputs;
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
2024-04-10 21:02:52 -05:00
2025-02-14 13:31:18 -06:00
"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
];
};
2024-04-10 21:02:52 -05:00
2025-02-14 13:31:18 -06:00
default = outputs.devShells.${system}.nim-dev;
}
);
};
2024-04-10 21:02:52 -05:00
}