summary refs log tree commit diff
path: root/pkgs/servers/nosql/eventstore
diff options
context:
space:
mode:
authorBrian McKenna <brian@brianmckenna.org>2015-05-07 13:00:01 -0600
committerBrian McKenna <brian@brianmckenna.org>2015-05-09 11:46:01 -0600
commit1ad2fa452a0d96be96dbe812c182cd1753992c14 (patch)
treea4bd1f0c2e06b1d231b201bc7e8262af95991282 /pkgs/servers/nosql/eventstore
parent8f74b653d22e22b47d8e5e5724397ec9d12bda22 (diff)
downloadnixpkgs-1ad2fa452a0d96be96dbe812c182cd1753992c14.tar
nixpkgs-1ad2fa452a0d96be96dbe812c182cd1753992c14.tar.gz
nixpkgs-1ad2fa452a0d96be96dbe812c182cd1753992c14.tar.bz2
nixpkgs-1ad2fa452a0d96be96dbe812c182cd1753992c14.tar.lz
nixpkgs-1ad2fa452a0d96be96dbe812c182cd1753992c14.tar.xz
nixpkgs-1ad2fa452a0d96be96dbe812c182cd1753992c14.tar.zst
nixpkgs-1ad2fa452a0d96be96dbe812c182cd1753992c14.zip
Add EventStore package
This turns the V8 expression into a generic build, so that we can
build with the required version.
Diffstat (limited to 'pkgs/servers/nosql/eventstore')
-rw-r--r--pkgs/servers/nosql/eventstore/default.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/servers/nosql/eventstore/default.nix b/pkgs/servers/nosql/eventstore/default.nix
new file mode 100644
index 00000000000..e13d99c104d
--- /dev/null
+++ b/pkgs/servers/nosql/eventstore/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, fetchgit, fetchpatch, git, mono, v8, icu }:
+
+# 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}";
+  version = "3.0.3";
+  src = fetchgit {
+    url = "https://github.com/EventStore/EventStore.git";
+    rev = "a1382252dd1ed0554ddb04015cdb2cbc1b0a65c1";
+    sha256 = "07ir6jlli2q1yvsnyw8r8dfril6h1wmfj98yf7a6k81585v2mc6g";
+    leaveDotGit = true;
+  };
+
+  patches = [
+    # see: https://github.com/EventStore/EventStore/issues/461
+    (fetchpatch {
+      url = https://github.com/EventStore/EventStore/commit/9a0987f19935178df143a3cf876becaa1b11ffae.patch;
+      sha256 = "04qw0rb1pypa8dqvj94j2mwkc1y6b40zrpkn1d3zfci3k8cam79y";
+    })
+  ];
+
+  buildPhase = ''
+    ln -s ${v8}/lib/libv8.so src/libs/libv8.so
+    ln -s ${icu}/lib/libicui18n.so src/libs/libicui18n.so
+    ln -s ${icu}/lib/libicuuc.so src/libs/libicuuc.so
+
+    ./build.sh js1
+    ./build.sh quick ${version}
+  '';
+
+  installPhase = ''
+    mkdir -p $out/{bin,lib/eventstore/clusternode}
+    cp -r bin/clusternode/* $out/lib/eventstore/clusternode/
+    cat > $out/bin/clusternode << EOF
+    #!/bin/sh
+    exec ${mono}/bin/mono $out/lib/eventstore/clusternode/EventStore.ClusterNode.exe "\$@"
+    EOF
+    chmod +x $out/bin/clusternode
+  '';
+
+  buildInputs = [ git v8 mono ];
+
+  dontStrip = true;
+
+  meta = {
+    homepage = https://geteventstore.com/;
+    description = "Event sourcing database with processing logic in JavaScript.";
+    license = stdenv.lib.licenses.bsd3;
+    maintainers = with stdenv.lib.maintainers; [ puffnfresh ];
+    platforms = with stdenv.lib.platforms; linux;
+  };
+}