depot/third_party/nixpkgs/pkgs/servers/nosql/ferretdb/default.nix

46 lines
1 KiB
Nix
Raw Normal View History

{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "ferretdb";
version = "1.5.0";
src = fetchFromGitHub {
owner = "FerretDB";
repo = "FerretDB";
rev = "v${version}";
hash = "sha256-PBxpb6lXLtOM9nxw2rNlMoevyWbmuTZMIjzr4y3UCMc=";
};
postPatch = ''
echo v${version} > build/version/version.txt
echo nixpkgs > build/version/package.txt
'';
vendorSha256 = "sha256-AsjKqlUwP+IgTErsGhBrELhVHMJ88twU3U4E9U/rP24=";
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 ];
};
}