mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
38 lines
1,008 B
Nix
38 lines
1,008 B
Nix
{
|
|
description = "JavaScript example flake for Zero to Nix";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-compat }:
|
|
let
|
|
# Systems supported
|
|
allSystems = [
|
|
"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
|
|
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
|
|
pkgs = import nixpkgs { inherit system; };
|
|
});
|
|
in
|
|
{
|
|
devShells = forAllSystems ({ pkgs }: {
|
|
default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
bun
|
|
nodejs
|
|
nodePackages.typescript
|
|
nodePackages.typescript-language-server
|
|
nix-ld
|
|
];
|
|
};
|
|
});
|
|
};
|
|
}
|