mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 16:53:21 +00:00
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{ lib
|
|
, buildGo121Module
|
|
, fetchFromGitHub
|
|
, nixosTests
|
|
}:
|
|
|
|
buildGo121Module rec {
|
|
pname = "ferretdb";
|
|
version = "1.15.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "FerretDB";
|
|
repo = "FerretDB";
|
|
rev = "v${version}";
|
|
hash = "sha256-J9pY84jaVsi31XdoAh3+fNgFNS88Nxxcs+hRV+bPn/M=";
|
|
};
|
|
|
|
postPatch = ''
|
|
echo v${version} > build/version/version.txt
|
|
echo nixpkgs > build/version/package.txt
|
|
'';
|
|
|
|
vendorHash = "sha256-NDLxf8aobamtR5/xn7YPgWQid4NZvj7v249tP1VGXfs=";
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
subPackages = [ "cmd/ferretdb" ];
|
|
|
|
# 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}
|
|
'';
|
|
|
|
passthru.tests = nixosTests.ferretdb;
|
|
|
|
meta = with lib; {
|
|
description = "A truly Open Source MongoDB alternative";
|
|
homepage = "https://www.ferretdb.io/";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ dit7ya noisersup julienmalka ];
|
|
};
|
|
}
|