mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
46 lines
1.0 KiB
Nix
46 lines
1.0 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "ferretdb";
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "FerretDB";
|
|
repo = "FerretDB";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-WFGVQWEYQBUzZAc8yHvD3C3bYbH0hVGoz28nVMV1IP8=";
|
|
};
|
|
|
|
postPatch = ''
|
|
echo v${version} > build/version/version.txt
|
|
echo nixpkgs > build/version/package.txt
|
|
'';
|
|
|
|
vendorSha256 = "sha256-jxo8QXw9Ca27VPjC7GYIm8SVxvhSZBQLnW2Kuthu5Rk=";
|
|
|
|
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 ];
|
|
};
|
|
}
|