depot/third_party/nixpkgs/pkgs/servers/nosql/ferretdb/default.nix
Default email 410b979fe2 Project import generated by Copybara.
GitOrigin-RevId: a64e169e396460d6b5763a1de1dd197df8421688
2023-03-24 01:07:29 +01:00

45 lines
1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "ferretdb";
version = "0.9.3";
src = fetchFromGitHub {
owner = "FerretDB";
repo = "FerretDB";
rev = "v${version}";
sha256 = "sha256-UVRrCzgQdr86cc3jG+FSI/y3dxkHxoydMncXMgPMcz4=";
};
postPatch = ''
echo v${version} > build/version/version.txt
echo nixpkgs > build/version/package.txt
'';
vendorSha256 = "sha256-pvRs+X8DbHeThJPZ3St+MzLrQBLHRtdkKSHjBax3V10=";
CGO_ENABLED = 0;
subPackages = [ "cmd/ferretdb" ];
tags = [ "ferretdb_tigris" ];
# 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 ];
};
}