nixpkgs/pkgs/servers/nosql/eventstore/default.nix

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

85 lines
2.3 KiB
Nix
Raw Normal View History

2022-06-26 08:00:53 +00:00
{ lib
, git
, dotnetCorePackages
, glibcLocales
, buildDotnetModule
, fetchFromGitHub
, bintools
, stdenv
, mono
}:
2023-05-30 11:58:38 +00:00
let
mainProgram = "EventStore.ClusterNode";
in
2019-04-27 12:57:38 +00:00
buildDotnetModule rec {
pname = "EventStore";
2023-08-26 14:40:31 +00:00
version = "23.6.0";
2019-04-27 12:57:38 +00:00
src = fetchFromGitHub {
2019-04-27 12:57:38 +00:00
owner = "EventStore";
repo = "EventStore";
rev = "oss-v${version}";
2023-08-26 14:40:31 +00:00
sha256 = "sha256-+Wxm6yusaCoqXIbsi0ZoALAviKUyNMQwbzsQtBK/PCo=";
2022-06-26 08:00:53 +00:00
leaveDotGit = true;
};
2022-06-26 08:00:53 +00:00
# Fixes application reporting 0.0.0.0 as its version.
MINVERVERSIONOVERRIDE = version;
2022-11-23 18:27:38 +00:00
dotnet-sdk = dotnetCorePackages.sdk_6_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;
2022-06-26 08:00:53 +00:00
nativeBuildInputs = [ git glibcLocales bintools ];
runtimeDeps = [ mono ];
2023-05-30 11:58:38 +00:00
executables = [ mainProgram ];
2022-11-23 18:27:38 +00:00
# This test has a problem running on macOS
disabledTests = lib.optionals stdenv.isDarwin [
"EventStore.Projections.Core.Tests.Services.grpc_service.ServerFeaturesTests<LogFormat+V2,String>.should_receive_expected_endpoints"
"EventStore.Projections.Core.Tests.Services.grpc_service.ServerFeaturesTests<LogFormat+V3,UInt32>.should_receive_expected_endpoints"
];
2022-06-26 08:00:53 +00:00
postConfigure = ''
# Fixes git execution by GitInfo on mac os
substituteInPlace "$HOME/.nuget/packages/gitinfo/2.0.26/build/GitInfo.targets" \
--replace "<GitExe Condition=\"Exists('/usr/bin/git')\">/usr/bin/git</GitExe>" " " \
--replace "<GitExe Condition=\"Exists('/usr/local/bin/git')\">/usr/local/bin/git</GitExe>" ""
2019-04-27 12:57:38 +00:00
'';
nugetDeps = ./deps.nix;
projectFile = "src/EventStore.ClusterNode/EventStore.ClusterNode.csproj";
2019-04-27 12:57:38 +00:00
doCheck = true;
testProjectFile = "src/EventStore.Projections.Core.Tests/EventStore.Projections.Core.Tests.csproj";
2022-06-26 08:00:53 +00:00
doInstallCheck = true;
installCheckPhase = ''
$out/bin/EventStore.ClusterNode --insecure \
--db "$HOME/data" \
--index "$HOME/index" \
--log "$HOME/log" \
-runprojections all --startstandardprojections \
--EnableAtomPubOverHttp &
PID=$!
sleep 30s;
kill "$PID";
'';
2022-09-21 14:25:59 +00:00
passthru.updateScript = ./updater.sh;
2022-06-26 08:00:53 +00:00
meta = with lib; {
2020-02-23 11:06:36 +00:00
homepage = "https://geteventstore.com/";
2015-06-29 14:20:58 +00:00
description = "Event sourcing database with processing logic in JavaScript";
2022-06-26 08:00:53 +00:00
license = licenses.bsd3;
maintainers = with maintainers; [ puffnfresh mdarocha ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
2023-05-30 11:58:38 +00:00
inherit mainProgram;
};
}