Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "2"

linters:
default: standard
exclusions:
presets:
- std-error-handling
settings:
staticcheck:
checks:
- "all"
- "-ST*"
8 changes: 4 additions & 4 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Development Dockerfile for payments service
# Based on ebics-bridge structure but optimized for development workflow

FROM golang:1.24.7-alpine as development
FROM golang:1.26.1-alpine as development

# Install minimal dependencies including build tools
RUN apk add --no-cache \
Expand All @@ -16,8 +16,8 @@ RUN apk add --no-cache \
make

# Install delve (debugger) and air (hot reload)
RUN CGO_ENABLED=0 go install github.com/go-delve/delve/cmd/dlv@v1.25.2
RUN CGO_ENABLED=0 go install github.com/air-verse/air@v1.61.7
RUN CGO_ENABLED=0 go install github.com/go-delve/delve/cmd/dlv@v1.26.1
RUN CGO_ENABLED=0 go install github.com/air-verse/air@v1.64.5

# Create a custom user with appropriate permissions
RUN addgroup -g 1001 -S appgroup && \
Expand Down Expand Up @@ -61,4 +61,4 @@ EXPOSE 8080 9090 2345
# Switch to the custom user
USER appuser

# No command, it needs to be set by docker-compose (different use cases)
# No command, it needs to be set by docker-compose (different use cases)
57 changes: 25 additions & 32 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 34 additions & 27 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
description = "A Nix-flake-based Go 1.24 development environment";
description = "A Nix-flake-based Go 1.26 development environment";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd also need to change the various docker files

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before I forget -- I'm OK with the rest of the PR, but we should also change the dockerfiles :)


inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
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, nur }:
outputs = { self, nixpkgs, nixpkgs-unstable, nur }:
let
goVersion = 24;

supportedSystems = [
"x86_64-linux"
"aarch64-linux"
Expand All @@ -26,11 +25,16 @@
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default nur.overlays.default ];
config.allowUnfree = true;
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; system = system; }
f { pkgs = pkgs; pkgs-unstable = pkgs-unstable; system = system; }
);

speakeasyVersion = "1.525.0";
Expand All @@ -49,11 +53,7 @@

in
{
overlays.default = final: prev: {
go = final."go_1_${toString goVersion}";
};

packages = forEachSupportedSystem ({ pkgs, system }:
packages = forEachSupportedSystem ({ pkgs, pkgs-unstable, system }:
{
speakeasy = pkgs.stdenv.mkDerivation {
pname = "speakeasy";
Expand Down Expand Up @@ -84,22 +84,29 @@
defaultPackage.x86_64-darwin = self.packages.x86_64-darwin.speakeasy;
defaultPackage.aarch64-darwin = self.packages.aarch64-darwin.speakeasy;

devShells = forEachSupportedSystem ({ pkgs, system }:
devShells = forEachSupportedSystem ({ pkgs, pkgs-unstable, system }:
let
stablePackages = with pkgs; [
ginkgo
go_1_26
gotools
jq
just
mockgen
nodejs_22
yq-go
];
unstablePackages = with pkgs-unstable; [
golangci-lint
];
otherPackages = [
pkgs.nur.repos.goreleaser.goreleaser-pro
self.packages.${system}.speakeasy
];
in
{
default = pkgs.mkShell {
packages = with pkgs; [
go
gotools
golangci-lint
mockgen
ginkgo
yq-go
jq
pkgs.nur.repos.goreleaser.goreleaser-pro
self.packages.${system}.speakeasy
just
nodejs_22
];
packages = stablePackages ++ unstablePackages ++ otherPackages;
};
}
);
Expand Down
Loading
Loading