From 503b8afa3faedf6398a5be8e86454bbf6af6baea Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Sat, 16 Aug 2014 23:53:03 +0200 Subject: [PATCH] Add neo4j database --- pkgs/servers/nosql/neo4j/default.nix | 39 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/servers/nosql/neo4j/default.nix diff --git a/pkgs/servers/nosql/neo4j/default.nix b/pkgs/servers/nosql/neo4j/default.nix new file mode 100644 index 000000000000..91c4472e0492 --- /dev/null +++ b/pkgs/servers/nosql/neo4j/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, makeWrapper, jre, which, gnused }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "neo4j-${version}"; + version = "2.1.3"; + + src = fetchurl { + url = "http://dist.neo4j.org/neo4j-community-${version}-unix.tar.gz"; + sha256 = "0gcyy6ayn8qvxj6za5463lgy320mn4rq7q5qysc26fxjd73drrrk"; + }; + + buildInputs = [ makeWrapper jre which gnused ]; + + patchPhase = '' + substituteInPlace "bin/neo4j" --replace "NEO4J_INSTANCE=\$NEO4J_HOME" "" + ''; + + installPhase = '' + mkdir -p "$out/share/neo4j" + cp -R * "$out/share/neo4j" + + mkdir -p "$out/bin" + makeWrapper "$out/share/neo4j/bin/neo4j" "$out/bin/neo4j" \ + --prefix PATH : "${jre}/bin:${which}/bin:${gnused}/bin" + makeWrapper "$out/share/neo4j/bin/neo4j-shell" "$out/bin/neo4j-shell" \ + --prefix PATH : "${jre}/bin:${which}/bin:${gnused}/bin" + ''; + + meta = with stdenv.lib; { + description = "a highly scalable, robust (fully ACID) native graph database"; + homepage = "http://www.neo4j.org/"; + license = licenses.gpl3; + + maintainers = [ maintainers.offline ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d448c606d37f..b93b3bdcfca5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6952,6 +6952,8 @@ let nagiosPluginsOfficial = callPackage ../servers/monitoring/nagios/plugins/official-2.x.nix { }; + neo4j = callPackage ../servers/nosql/neo4j { }; + net_snmp = callPackage ../servers/monitoring/net-snmp { }; oidentd = callPackage ../servers/identd/oidentd { };