2022-09-04 13:53:06 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ferretdb";
|
2023-06-06 21:40:27 +00:00
|
|
|
version = "1.3.0";
|
2022-09-04 13:53:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FerretDB";
|
|
|
|
repo = "FerretDB";
|
|
|
|
rev = "v${version}";
|
2023-06-06 21:40:27 +00:00
|
|
|
sha256 = "sha256-V33NeNpQZFUN/aUCaaxnCgIYaVgbAI5L6GZQo8ZMvUI=";
|
2022-09-04 13:53:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-11-23 16:58:42 +00:00
|
|
|
echo v${version} > build/version/version.txt
|
|
|
|
echo nixpkgs > build/version/package.txt
|
2022-09-04 13:53:06 +00:00
|
|
|
'';
|
|
|
|
|
2023-06-06 21:40:27 +00:00
|
|
|
vendorSha256 = "sha256-QoDNQXZGfUq/t8fiovCv0+N9e4shJGpwS3y/z0YXMi4=";
|
2022-09-04 13:53:06 +00:00
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
subPackages = [ "cmd/ferretdb" ];
|
|
|
|
|
2022-11-23 16:58:42 +00:00
|
|
|
tags = [ "ferretdb_tigris" ];
|
|
|
|
|
2023-03-17 12:19:51 +00:00
|
|
|
# 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}
|
|
|
|
'';
|
|
|
|
|
2022-09-04 13:53:06 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A truly Open Source MongoDB alternative";
|
2022-11-23 16:58:42 +00:00
|
|
|
homepage = "https://www.ferretdb.io/";
|
2022-09-04 13:53:06 +00:00
|
|
|
license = licenses.asl20;
|
2023-02-27 14:34:17 +00:00
|
|
|
maintainers = with maintainers; [ dit7ya noisersup julienmalka ];
|
2022-09-04 13:53:06 +00:00
|
|
|
};
|
|
|
|
}
|