2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ferretdb";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.5.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FerretDB";
|
|
|
|
repo = "FerretDB";
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-PBxpb6lXLtOM9nxw2rNlMoevyWbmuTZMIjzr4y3UCMc=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2023-02-16 17:41:37 +00:00
|
|
|
echo v${version} > build/version/version.txt
|
|
|
|
echo nixpkgs > build/version/package.txt
|
2022-09-09 14:08:57 +00:00
|
|
|
'';
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
vendorSha256 = "sha256-AsjKqlUwP+IgTErsGhBrELhVHMJ88twU3U4E9U/rP24=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
|
|
|
|
subPackages = [ "cmd/ferretdb" ];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
tags = [ "ferretdb_tigris" ];
|
|
|
|
|
2023-03-24 00:07:29 +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-09 14:08:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A truly Open Source MongoDB alternative";
|
2023-02-16 17:41:37 +00:00
|
|
|
homepage = "https://www.ferretdb.io/";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = licenses.asl20;
|
2023-03-04 12:14:45 +00:00
|
|
|
maintainers = with maintainers; [ dit7ya noisersup julienmalka ];
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|