Bluemage/flake.nix

80 lines
2.2 KiB
Nix

{
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
};
outputs = { nixpkgs, ... }:
let
system = "x86_64-linux";
# Go-Jet binary in nixos repo is not built with fts5 sqlite enabled
overlays = [
(final: prev: {
go-jet = prev.go-jet.overrideAttrs (oldAttrs: {
tags = oldAttrs.tags ++ [ "fts5" ];
});
})
];
pkgs = import nixpkgs { inherit system overlays; };
goverter = pkgs.buildGoModule rec {
name = "goverter";
version = "1.5.0";
src = pkgs.fetchFromGitHub {
owner = "jmattheis";
repo = "goverter";
rev = "v${version}";
sha256 = "sha256-J0PS4ZxGtOa+0QOOSjfg0WeVYGyf757WuTnpQTWIV1w=";
};
subPackages = [ "cmd/goverter" ];
vendorHash = "sha256-uQ1qKZLRwsgXKqSAERSqf+1cYKp6MTeVbfGs+qcdakE=";
};
bobgen-sqlite = pkgs.buildGoModule rec {
name = "bobgen-sqlite";
version = "0.28.1";
subPackages = [ "gen/bobgen-sqlite" ];
src = pkgs.fetchFromGitHub {
owner = "stephenafamo";
repo = "bob";
rev = "v${version}";
sha256 = "sha256-iLcSY5BBmjuICsIC9u6wyrp7elDt4yY8Ji7UWmsJ688=";
};
vendorHash = "sha256-9vLcyCAhW/Dq0zV8FhM0T3Ofn/8XsUhV5KlphNidGDw=";
};
ogen = pkgs.buildGoModule rec {
name = "ogen";
version = "1.2.2";
subPackages = [ "cmd/ogen" ];
src = pkgs.fetchFromGitHub {
owner = "ogen-go";
repo = "ogen";
rev = "v${version}";
sha256 = "sha256-8HIbMw3G5vuOJMpwfrSiecm9+kmsHDkVqAG6xucoZfs=";
};
vendorHash = "sha256-sZiOo+ZhczWS7xMt2cxdqZM1C2omIYheZPLAJMLSw28=";
};
in
{
devShell.${system} = pkgs.mkShell {
name = "bluemage-shell";
buildInputs = with pkgs; [
go
nodePackages_latest.nodejs
goose
air
upx
buf
buf-language-server
protoc-gen-go
protoc-gen-connect-go
protoc-gen-validate
goverter
bobgen-sqlite
air
gopls
ogen
go-jet
];
};
};
}