nixpkgs/pkgs/by-name/fe/ferretdb/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, buildGoModule
, fetchFromGitHub
2023-10-15 08:40:11 +00:00
, nixosTests
}:
buildGoModule rec {
pname = "ferretdb";
2024-08-29 04:53:20 +00:00
version = "1.24.0";
src = fetchFromGitHub {
owner = "FerretDB";
repo = "FerretDB";
rev = "v${version}";
2024-08-29 04:53:20 +00:00
hash = "sha256-WMejspnk2PvJhvNGi4h+DF+fzipuOMcS1QWim5DnAhQ=";
};
postPatch = ''
echo v${version} > build/version/version.txt
echo nixpkgs > build/version/package.txt
'';
2024-08-29 04:53:20 +00:00
vendorHash = "sha256-GT6e9yd6LF6GFlGBWVAmcM6ysB/6cIGLbnM0hxfX5TE=";
CGO_ENABLED = 0;
subPackages = [ "cmd/ferretdb" ];
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}
'';
2023-10-15 08:40:11 +00:00
passthru.tests = nixosTests.ferretdb;
meta = with lib; {
description = "Truly Open Source MongoDB alternative";
mainProgram = "ferretdb";
2024-03-18 10:19:31 +00:00
changelog = "https://github.com/FerretDB/FerretDB/releases/tag/v${version}";
homepage = "https://www.ferretdb.com/";
license = licenses.asl20;
2023-02-27 14:34:17 +00:00
maintainers = with maintainers; [ dit7ya noisersup julienmalka ];
};
}