Files

95 lines
2.1 KiB
Nix
Raw Permalink Normal View History

2024-05-22 02:47:18 +02:00
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs =
2025-11-04 17:28:59 +01:00
{ nixpkgs, ... }:
let
supportedSystems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
forEachSupportedSystem =
f:
nixpkgs.lib.genAttrs supportedSystems (
system:
let
2025-11-04 17:28:59 +01:00
pkgs = import nixpkgs {
inherit system;
2025-08-14 14:39:38 -04:00
};
in
2025-11-04 17:28:59 +01:00
f { inherit pkgs; }
);
in
{
devShells = forEachSupportedSystem (
{ pkgs, ... }:
{
default =
let
inherit (pkgs) lib;
2025-08-14 14:39:38 -04:00
2025-11-04 17:28:59 +01:00
# only bump toolchain versions here
go = pkgs.go_1_26;
2025-11-04 17:28:59 +01:00
nodejs = pkgs.nodejs_24;
python3 = pkgs.python314;
2025-11-04 17:28:59 +01:00
pnpm = pkgs.pnpm_10;
2025-08-14 14:39:38 -04:00
2025-11-04 17:28:59 +01:00
# Platform-specific dependencies
linuxOnlyInputs = lib.optionals pkgs.stdenv.isLinux [
pkgs.glibc.static
];
2025-08-14 14:39:38 -04:00
2025-11-04 17:28:59 +01:00
linuxOnlyEnv = lib.optionalAttrs pkgs.stdenv.isLinux {
CFLAGS = "-I${pkgs.glibc.static.dev}/include";
LDFLAGS = "-L ${pkgs.glibc.static}/lib";
};
in
pkgs.mkShell {
packages =
with pkgs;
[
# generic
git
git-lfs
gnumake
gnused
gnutar
gzip
zip
2025-08-14 14:39:38 -04:00
2025-11-04 17:28:59 +01:00
# frontend
nodejs
pnpm
cairo
pixman
pkg-config
2025-08-14 14:39:38 -04:00
2025-11-04 17:28:59 +01:00
# linting
python3
uv
# backend
go
gofumpt
sqlite
]
++ linuxOnlyInputs;
env = {
GO = "${go}/bin/go";
GOROOT = "${go}/share/go";
TAGS = "";
2025-11-04 17:28:59 +01:00
STATIC = "true";
}
// linuxOnlyEnv;
};
}
);
};
2024-05-22 02:47:18 +02:00
}