go rewrite

This commit is contained in:
raf 2024-01-11 22:51:07 +03:00
commit d4290ff553
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
21 changed files with 437 additions and 552 deletions

11
nix/package.nix Normal file
View file

@ -0,0 +1,11 @@
{buildGoModule}:
buildGoModule {
pname = "sample-go";
version = "0.0.1";
src = ./.;
vendorHash = null;
ldflags = ["-s" "-w"];
}

15
nix/shell.nix Normal file
View file

@ -0,0 +1,15 @@
{
callPackage,
gopls,
go,
}: let
mainPkg = callPackage ./default.nix {};
in
mainPkg.overrideAttrs (oa: {
nativeBuildInputs =
(oa.nativeBuildInputs or [])
++ [
gopls
go
];
})