{ lib , buildGo121Module , fetchFromGitHub }: buildGo121Module rec { pname = "ferretdb"; version = "1.10.1"; src = fetchFromGitHub { owner = "FerretDB"; repo = "FerretDB"; rev = "v${version}"; hash = "sha256-Pw3rusnFYlVPL55dj7VM8kGxE2c+72jgEXCoS4+hufY="; }; postPatch = '' echo v${version} > build/version/version.txt echo nixpkgs > build/version/package.txt ''; vendorHash = "sha256-1hkJMkMgDrjOgKgGX96hv5PALqx0KyjUZXXiIvUh5VA="; CGO_ENABLED = 0; subPackages = [ "cmd/ferretdb" ]; # tests in cmd/ferretdb are not production relevant doCheck = false; # the binary panics if something required wasn't set during compilation doInstallCheck = true; installCheckPhase = '' $out/bin/ferretdb --version | grep ${version} ''; meta = with lib; { description = "A truly Open Source MongoDB alternative"; homepage = "https://www.ferretdb.io/"; license = licenses.asl20; maintainers = with maintainers; [ dit7ya noisersup julienmalka ]; }; }