biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / servers / nosql / eventstore / default.nix
blob4165a6ff43907f4dc15810de3562b8648fe52b52
1 { lib
2 , git
3 , dotnetCorePackages
4 , glibcLocales
5 , buildDotnetModule
6 , fetchFromGitHub
7 , bintools
8 , stdenv
9 , mono
11 let
12   mainProgram = "EventStore.ClusterNode";
15 buildDotnetModule rec {
16   pname = "EventStore";
17   version = "23.6.0";
19   src = fetchFromGitHub {
20     owner = "EventStore";
21     repo = "EventStore";
22     rev = "oss-v${version}";
23     sha256 = "sha256-+Wxm6yusaCoqXIbsi0ZoALAviKUyNMQwbzsQtBK/PCo=";
24     leaveDotGit = true;
25   };
27   # Fixes application reporting 0.0.0.0 as its version.
28   MINVERVERSIONOVERRIDE = version;
30   dotnet-sdk = dotnetCorePackages.sdk_6_0;
31   dotnet-runtime = dotnetCorePackages.aspnetcore_6_0;
33   nativeBuildInputs = [ git glibcLocales bintools ];
35   runtimeDeps = [ mono ];
37   executables = [ mainProgram ];
39   # This test has a problem running on macOS
40   disabledTests = lib.optionals stdenv.isDarwin [
41     "EventStore.Projections.Core.Tests.Services.grpc_service.ServerFeaturesTests<LogFormat+V2,String>.should_receive_expected_endpoints"
42     "EventStore.Projections.Core.Tests.Services.grpc_service.ServerFeaturesTests<LogFormat+V3,UInt32>.should_receive_expected_endpoints"
43   ];
45   postConfigure = ''
46     # Fixes git execution by GitInfo on mac os
47     substituteInPlace "$HOME/.nuget/packages/gitinfo/2.0.26/build/GitInfo.targets" \
48       --replace "<GitExe Condition=\"Exists('/usr/bin/git')\">/usr/bin/git</GitExe>" " " \
49       --replace "<GitExe Condition=\"Exists('/usr/local/bin/git')\">/usr/local/bin/git</GitExe>" ""
50   '';
52   nugetDeps = ./deps.nix;
54   projectFile = "src/EventStore.ClusterNode/EventStore.ClusterNode.csproj";
56   doCheck = true;
57   testProjectFile = "src/EventStore.Projections.Core.Tests/EventStore.Projections.Core.Tests.csproj";
59   doInstallCheck = true;
60   installCheckPhase = ''
61     $out/bin/EventStore.ClusterNode --insecure \
62       --db "$HOME/data" \
63       --index "$HOME/index" \
64       --log "$HOME/log" \
65       -runprojections all --startstandardprojections \
66       --EnableAtomPubOverHttp &
68     PID=$!
70     sleep 30s;
71     kill "$PID";
72   '';
74   passthru.updateScript = ./updater.sh;
76   meta = with lib; {
77     homepage = "https://geteventstore.com/";
78     description = "Event sourcing database with processing logic in JavaScript";
79     license = licenses.bsd3;
80     maintainers = with maintainers; [ puffnfresh mdarocha ];
81     platforms = [ "x86_64-linux" "x86_64-darwin" ];
82     inherit mainProgram;
83   };