Files
nixpkgs/pkgs/by-name/fe/ferretdb/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.3 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "ferretdb";
version = "1.24.0";
src = fetchFromGitHub {
owner = "FerretDB";
repo = "FerretDB";
tag = "v${finalAttrs.version}";
hash = "sha256-WMejspnk2PvJhvNGi4h+DF+fzipuOMcS1QWim5DnAhQ=";
};
postPatch = ''
echo v${finalAttrs.version} > build/version/version.txt
echo nixpkgs > build/version/package.txt
'';
vendorHash = "sha256-GT6e9yd6LF6GFlGBWVAmcM6ysB/6cIGLbnM0hxfX5TE=";
env.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;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru.tests = nixosTests.ferretdb;
meta = {
description = "Truly Open Source MongoDB alternative";
mainProgram = "ferretdb";
changelog = "https://github.com/FerretDB/FerretDB/releases/tag/v${finalAttrs.version}";
homepage = "https://www.ferretdb.com/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
dit7ya
noisersup
julienmalka
];
};
})