2017-10-09 23:32:12 +02:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, git, mono, v8 }:
|
2015-05-07 21:00:01 +02:00
|
|
|
|
|
|
|
# There are some similarities with the pinta derivation. We should
|
|
|
|
# have a helper to make it easy to package these Mono apps.
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "EventStore-${version}";
|
2018-05-22 12:34:03 +02:00
|
|
|
version = "4.1.1";
|
2015-12-15 06:53:18 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "EventStore";
|
|
|
|
repo = "EventStore";
|
|
|
|
rev = "oss-v${version}";
|
2018-05-22 12:34:03 +02:00
|
|
|
sha256 = "1069ncb9ps1wi71yw1fzkfd9rfsavccw8xj3a3miwd9x72w8636f";
|
2015-05-07 21:00:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
2016-03-09 13:42:21 +01:00
|
|
|
mkdir -p src/libs/x64/nixos
|
|
|
|
pushd src/EventStore.Projections.v8Integration
|
|
|
|
cc -o ../libs/x64/nixos/libjs1.so -fPIC -lv8 -shared -std=c++0x *.cpp
|
|
|
|
popd
|
2015-05-07 21:00:01 +02:00
|
|
|
|
2015-05-10 20:46:09 +02:00
|
|
|
patchShebangs build.sh
|
2016-03-09 13:42:21 +01:00
|
|
|
./build.sh ${version} release nixos
|
2015-05-07 21:00:01 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,lib/eventstore/clusternode}
|
|
|
|
cp -r bin/clusternode/* $out/lib/eventstore/clusternode/
|
|
|
|
cat > $out/bin/clusternode << EOF
|
2017-01-15 13:44:52 +01:00
|
|
|
#!${stdenv.shell}
|
2015-05-07 21:00:01 +02:00
|
|
|
exec ${mono}/bin/mono $out/lib/eventstore/clusternode/EventStore.ClusterNode.exe "\$@"
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/clusternode
|
|
|
|
'';
|
|
|
|
|
2017-10-09 23:32:12 +02:00
|
|
|
nativeBuildInputs = [ git ];
|
2016-03-09 13:42:21 +01:00
|
|
|
buildInputs = [ v8 mono ];
|
2015-05-07 21:00:01 +02:00
|
|
|
|
2016-03-09 13:42:21 +01:00
|
|
|
phases = [ "unpackPhase" "buildPhase" "installPhase" ];
|
2015-05-07 21:00:01 +02:00
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://geteventstore.com/;
|
2015-06-29 16:20:58 +02:00
|
|
|
description = "Event sourcing database with processing logic in JavaScript";
|
2015-05-07 21:00:01 +02:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ puffnfresh ];
|
2016-03-09 13:42:21 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2015-05-07 21:00:01 +02:00
|
|
|
};
|
|
|
|
}
|