Skip to content

Instantly share code, notes, and snippets.

@samrose
Forked from lukateras/default.nix
Created July 14, 2019 00:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samrose/8ad91ac27ebbf4ca7e9fc313044a52a6 to your computer and use it in GitHub Desktop.
Save samrose/8ad91ac27ebbf4ca7e9fc313044a52a6 to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "cloudi-${version}";
version = "1.7.5";
src = fetchzip {
url = "https://osdn.net/dl/cloudi/${name}.tar.gz";
sha256 = "0aj0rwzfyad99gnm27km705ba46nsdy1ww87qgk3cfpi0017wx86";
};
patches = [ ./no-mkdir-logs.diff ];
preAutoreconf = "cd src";
postFixup = ''
substituteInPlace $out/etc/cloudi/cloudi.conf --replace $out/lib/${name}/logs /tmp
substituteInPlace $out/lib/${name}/bin/cloudi --replace '$ROOTDIR/logs' /tmp
'';
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
boost
erlang
ncurses
systemd
];
configureFlags = [
"--enable-java-support=no"
"--enable-javascript-support=no"
"--enable-perl-support=no"
"--enable-php-support=no"
"--enable-ruby-support=no"
"--enable-python-support=no"
"--enable-python-c-support=no"
"--localstatedir=/var"
"--with-boost-libdir=${boost}/lib" # autoconf expects a different location
"--with-integration-tests=no"
];
}
--- a/src/Makefile.am 2018-12-19 05:04:03.000000000 +0300
+++ b/src/Makefile.am 2019-07-11 19:11:50.373137331 +0300
@@ -345,7 +345,6 @@
install-exec-hook:
$(MKDIR_P) "$(DESTDIR)$(bindir)"
- $(MKDIR_P) "$(DESTDIR)$(cloudi_logdir)"
$(MKDIR_P) "$(DESTDIR)$(cloudi_confdir)"
$(MKDIR_P) "$(DESTDIR)$(cloudi_bindir)"
$(MKDIR_P) "$(DESTDIR)$(cloudi_prefix)"
@@ -353,8 +352,7 @@
$(MKDIR_P) "$(DESTDIR)$(cloudi_prefix)/lib"
$(MKDIR_P) "$(DESTDIR)$(cloudi_prefix)/releases"
(cd "$(DESTDIR)$(cloudi_prefix)" && \
- test ! -e etc && $(LN_S) "$(cloudi_confdir)" etc || exit 0 && \
- test ! -e logs && $(LN_S) "$(cloudi_logdir)" logs || exit 0)
+ test ! -e etc && $(LN_S) "$(cloudi_confdir)" etc || exit 0)
test -e "$(DESTDIR)$(cloudi_confdir)/cloudi.conf" && \
mv -f "$(DESTDIR)$(cloudi_confdir)/cloudi.conf" \
"$(DESTDIR)$(cloudi_confdir)/cloudi.conf.old" || exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment