depot/third_party/nixpkgs/pkgs/servers/nosql/ferretdb/default.nix
Default email ed0c4a69f0 Project import generated by Copybara.
GitOrigin-RevId: e3652e0735fbec227f342712f180f4f21f0594f2
2023-03-31 00:05:00 +02:00

45 lines
1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "ferretdb";
version = "0.9.4";
src = fetchFromGitHub {
owner = "FerretDB";
repo = "FerretDB";
rev = "v${version}";
sha256 = "sha256-DdOZIK1y7WhKigd5u4JGErP53FCQSe3QCZMXIa4ah3I=";
};
postPatch = ''
echo v${version} > build/version/version.txt
echo nixpkgs > build/version/package.txt
'';
vendorSha256 = "sha256-Kmc/xWNrx62Ua87K5tif4s3jpWLbzTqNpw8j/3bYXr4=";
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 ];
};
}