Created
March 3, 2016 06:44
-
-
Save nrolland/a631cb2cbfa110c4285a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchFromGitHub, fetchpatch, git, mono, v8, icu, subversion, python, which }: | |
# 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.5.0"; | |
src = fetchFromGitHub { | |
owner = "EventStore"; | |
repo = "EventStore"; | |
rev = "oss-v${version}"; | |
sha256 = "0dp5914hxwdzw62q49wavqfqkw3jy0dvml09y7gh8frnbiajcxq9"; | |
}; | |
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 | |
patchShebangs ./scripts/build-js1/build-js1-linux.sh | |
./scripts/build-js1/build-js1-linux.sh werror=no | |
''; | |
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 subversion python which ]; | |
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; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment