Files
payments/flake.nix
CrimsonandGitHub d24fc1391f fix(API): Handle SQLSTATE 22P02 in storage as HTTP 400 (#556)
* Handle SQLSTATE 22P02 in storage as HTTP 400

* Disable profiler in e2e tests to remove unneeded overhead
2025-09-29 08:41:18 +00:00

108 lines
3.1 KiB
Nix

{
description = "A Nix-flake-based Go 1.24 development environment";
inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nur }:
let
goVersion = 24;
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 = [ self.overlays.default nur.overlays.default ];
config.allowUnfree = true;
};
in
f { pkgs = pkgs; system = system; }
);
speakeasyVersion = "1.525.0";
speakeasyPlatforms = {
"x86_64-linux" = "linux_amd64";
"aarch64-linux" = "linux_arm64";
"x86_64-darwin" = "darwin_amd64";
"aarch64-darwin" = "darwin_arm64";
};
speakeasyHashes = {
"x86_64-linux" = "f17c88ae5fa2ffc15f4a3b23085fbf9faaeaee562450cc8a3f7cdda06c8c889f";
"aarch64-linux" = "e935ecf74a9bc9b380bec4ec9455d05cb83f258108a28f3e2e61f2f362c32553";
"x86_64-darwin" = "1904add9ff7ff0026245240f7bc7a4644b10dc4e6ef8620d6f4475bdc5b59f00";
"aarch64-darwin" = "0d6660931eea7d86ac1fdff0c001913d82139fd3c5e62cea818a3c559ca9cccc";
};
in
{
overlays.default = final: prev: {
go = final."go_1_${toString goVersion}";
};
packages = forEachSupportedSystem ({ pkgs, system }:
{
speakeasy = pkgs.stdenv.mkDerivation {
pname = "speakeasy";
version = speakeasyVersion;
src = pkgs.fetchurl {
url = "https://github.com/speakeasy-api/speakeasy/releases/download/v${speakeasyVersion}/speakeasy_${speakeasyPlatforms.${system}}.zip";
sha256 = speakeasyHashes.${system};
};
nativeBuildInputs = [ pkgs.unzip ];
dontUnpack = true;
installPhase = ''
mkdir -p $out/bin
unzip $src
ls -al
install -m755 speakeasy $out/bin/
'';
name = "speakeasy";
};
}
);
defaultPackage.x86_64-linux = self.packages.x86_64-linux.speakeasy;
defaultPackage.aarch64-linux = self.packages.aarch64-linux.speakeasy;
defaultPackage.x86_64-darwin = self.packages.x86_64-darwin.speakeasy;
defaultPackage.aarch64-darwin = self.packages.aarch64-darwin.speakeasy;
devShells = forEachSupportedSystem ({ pkgs, system }:
{
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
];
};
}
);
};
}