2024-08-04 23:16:05 +07:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs@{ nixpkgs, ... }:
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
|
|
|
goverter = pkgs.buildGoModule rec {
|
|
|
|
name = "goverter";
|
|
|
|
version = "1.5.0";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "jmattheis";
|
|
|
|
repo = "goverter";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-J0PS4ZxGtOa+0QOOSjfg0WeVYGyf757WuTnpQTWIV1w=";
|
|
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgs.go ];
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
go build -o goverter ./cmd/goverter
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp goverter $out/bin
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
vendorHash = "sha256-uQ1qKZLRwsgXKqSAERSqf+1cYKp6MTeVbfGs+qcdakE=";
|
|
|
|
};
|
2024-08-05 23:06:32 +07:00
|
|
|
bobgen-sqlite = pkgs.buildGoModule rec {
|
|
|
|
name = "bobgen-sqlite";
|
|
|
|
version = "0.28.1";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "stephenafamo";
|
|
|
|
repo = "bob";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-iLcSY5BBmjuICsIC9u6wyrp7elDt4yY8Ji7UWmsJ688=";
|
|
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgs.go ];
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
go build -o bobgen-sqlite ./gen/bobgen-sqlite
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp bobgen-sqlite $out/bin
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
vendorHash = "sha256-9vLcyCAhW/Dq0zV8FhM0T3Ofn/8XsUhV5KlphNidGDw=";
|
|
|
|
};
|
2024-08-04 23:16:05 +07:00
|
|
|
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
|
2024-08-05 23:06:32 +07:00
|
|
|
impl
|
2024-08-04 23:16:05 +07:00
|
|
|
goverter
|
2024-08-05 23:06:32 +07:00
|
|
|
bobgen-sqlite
|
2024-08-07 10:41:00 +07:00
|
|
|
air
|
|
|
|
gopls
|
2024-08-04 23:16:05 +07:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|