Vitaliy Vlasov fbe30d7b18
Update status-go to v0.167.6
b3213172...e1354016
Signed-off-by: Vitaliy Vlasov <siphiuel@protonmail.com>
2023-10-04 01:16:25 +03:00

31 lines
648 B
Nix

{ buildGoPackage
# object with source attributes
, meta, source}:
buildGoPackage {
pname = source.repo;
version = "${source.cleanVersion}-${source.shortRev}";
inherit meta;
inherit (source) src goPackagePath;
phases = ["unpackPhase" "configurePhase" "buildPhase"];
preBuild = ''
pushd go/src/$goPackagePath
go run cmd/library/*.go > $NIX_BUILD_TOP/main.go
popd
'';
# Build the Go library
buildPhase = ''
runHook preBuild
go build \
-buildmode='c-archive' \
-tags='gowaku_skip_migrations gowaku_no_rln' \
-o "$out/libstatus.a" \
$NIX_BUILD_TOP/main.go
runHook postBuild
'';
}