2022-06-26 10:00:53 +02:00
|
|
|
{ lib
|
|
|
|
, git
|
|
|
|
, dotnetCorePackages
|
|
|
|
, glibcLocales
|
|
|
|
, buildDotnetModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, bintools
|
|
|
|
, stdenv
|
|
|
|
, mono
|
|
|
|
}:
|
2023-05-30 13:58:38 +02:00
|
|
|
let
|
|
|
|
mainProgram = "EventStore.ClusterNode";
|
|
|
|
in
|
2019-04-27 14:57:38 +02:00
|
|
|
|
2022-06-25 16:27:58 +02:00
|
|
|
buildDotnetModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "EventStore";
|
2023-08-26 16:40:31 +02:00
|
|
|
version = "23.6.0";
|
2019-04-27 14:57:38 +02:00
|
|
|
|
2015-12-15 06:53:18 +01:00
|
|
|
src = fetchFromGitHub {
|
2019-04-27 14:57:38 +02:00
|
|
|
owner = "EventStore";
|
|
|
|
repo = "EventStore";
|
|
|
|
rev = "oss-v${version}";
|
2023-08-26 16:40:31 +02:00
|
|
|
sha256 = "sha256-+Wxm6yusaCoqXIbsi0ZoALAviKUyNMQwbzsQtBK/PCo=";
|
2022-06-26 10:00:53 +02:00
|
|
|
leaveDotGit = true;
|
2015-05-07 21:00:01 +02:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:00:53 +02:00
|
|
|
# Fixes application reporting 0.0.0.0 as its version.
|
|
|
|
MINVERVERSIONOVERRIDE = version;
|
|
|
|
|
2022-11-23 19:27:38 +01:00
|
|
|
dotnet-sdk = dotnetCorePackages.sdk_6_0;
|
|
|
|
dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;
|
2022-06-26 10:00:53 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ git glibcLocales bintools ];
|
|
|
|
|
|
|
|
runtimeDeps = [ mono ];
|
|
|
|
|
2023-05-30 13:58:38 +02:00
|
|
|
executables = [ mainProgram ];
|
2022-11-23 19:27:38 +01: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 10:00:53 +02: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 14:57:38 +02:00
|
|
|
'';
|
|
|
|
|
2022-06-25 16:27:58 +02:00
|
|
|
nugetDeps = ./deps.nix;
|
2015-05-07 21:00:01 +02:00
|
|
|
|
2022-06-25 16:27:58 +02:00
|
|
|
projectFile = "src/EventStore.ClusterNode/EventStore.ClusterNode.csproj";
|
2015-05-07 21:00:01 +02:00
|
|
|
|
2019-04-27 14:57:38 +02:00
|
|
|
doCheck = true;
|
2022-06-25 16:27:58 +02:00
|
|
|
testProjectFile = "src/EventStore.Projections.Core.Tests/EventStore.Projections.Core.Tests.csproj";
|
2015-05-07 21:00:01 +02:00
|
|
|
|
2022-06-26 10:00:53 +02: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 16:25:59 +02:00
|
|
|
passthru.updateScript = ./updater.sh;
|
|
|
|
|
2022-06-26 10:00:53 +02:00
|
|
|
meta = with lib; {
|
2020-02-23 12:06:36 +01:00
|
|
|
homepage = "https://geteventstore.com/";
|
2015-06-29 16:20:58 +02:00
|
|
|
description = "Event sourcing database with processing logic in JavaScript";
|
2022-06-26 10:00:53 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ puffnfresh mdarocha ];
|
2021-03-18 01:28:34 +01:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
2023-05-30 13:58:38 +02:00
|
|
|
inherit mainProgram;
|
2015-05-07 21:00:01 +02:00
|
|
|
};
|
|
|
|
}
|