Files
3a040d0b25 chore: upgrade Go to 1.26 (#88)
* chore: upgrade Go to 1.26 from pkgs-unstable

* chore: upgrade caddy to v2.11.2 and fix ClaimsFromRequest call

Upgrade caddy from v2.9.1 to v2.11.2 to fix quic-go v0.57.0
incompatibility. Adapt auth.ClaimsFromRequest call to match the
updated go-libs v3.6.1 signature (map[string]oidc.KeySet).

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-03-25 10:59:21 +01:00

67 lines
1.7 KiB
Nix

{
description = "A Nix-flake-based Go 1.26 development environment";
inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2511";
nixpkgs-unstable.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, nur }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forEachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ nur.overlays.default ];
config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [
"goreleaser-pro"
];
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
};
in
f { pkgs = pkgs; pkgs-unstable = pkgs-unstable; system = system; }
);
in
{
devShells = forEachSupportedSystem ({ pkgs, pkgs-unstable, system }:
let
stablePackages = with pkgs; [
ginkgo
go_1_26
gomarkdoc
goperf
gotools
just
mockgen
];
unstablePackages = with pkgs-unstable; [
golangci-lint
];
otherPackages = [
pkgs.nur.repos.goreleaser.goreleaser-pro
];
in
{
default = pkgs.mkShell {
packages = stablePackages ++ unstablePackages ++ otherPackages;
};
}
);
};
}