mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
neo4j: 3.5.14 -> 4.1.1
This commit is contained in:
parent
663e41e6df
commit
0fbce25144
@ -36,24 +36,29 @@ let
|
||||
serverConfig = pkgs.writeText "neo4j.conf" ''
|
||||
# General
|
||||
dbms.allow_upgrade=${boolToString cfg.allowUpgrade}
|
||||
dbms.connectors.default_listen_address=${cfg.defaultListenAddress}
|
||||
dbms.default_listen_address=${cfg.defaultListenAddress}
|
||||
dbms.read_only=${boolToString cfg.readOnly}
|
||||
${optionalString (cfg.workerCount > 0) ''
|
||||
dbms.threads.worker_count=${toString cfg.workerCount}
|
||||
''}
|
||||
|
||||
# Directories
|
||||
# Directories (readonly)
|
||||
dbms.directories.certificates=${cfg.directories.certificates}
|
||||
dbms.directories.data=${cfg.directories.data}
|
||||
dbms.directories.logs=${cfg.directories.home}/logs
|
||||
dbms.directories.plugins=${cfg.directories.plugins}
|
||||
dbms.directories.lib=${cfg.package}/share/neo4j/lib
|
||||
${optionalString (cfg.constrainLoadCsv) ''
|
||||
dbms.directories.import=${cfg.directories.imports}
|
||||
''}
|
||||
''}
|
||||
|
||||
# Directories (read and write)
|
||||
dbms.directories.home=${cfg.directories.home}
|
||||
dbms.directories.data=${cfg.directories.data}
|
||||
dbms.directories.logs=${cfg.directories.home}/logs
|
||||
dbms.directories.run=${cfg.directories.home}/run
|
||||
|
||||
# HTTP Connector
|
||||
${optionalString (cfg.http.enable) ''
|
||||
dbms.connector.http.enabled=${boolToString cfg.http.enable}
|
||||
dbms.connector.http.enabled=${boolToString cfg.https.enable}
|
||||
dbms.connector.http.listen_address=${cfg.http.listenAddress}
|
||||
''}
|
||||
${optionalString (!cfg.http.enable) ''
|
||||
@ -67,17 +72,12 @@ let
|
||||
# HTTPS Connector
|
||||
dbms.connector.https.enabled=${boolToString cfg.https.enable}
|
||||
dbms.connector.https.listen_address=${cfg.https.listenAddress}
|
||||
https.ssl_policy=${cfg.https.sslPolicy}
|
||||
|
||||
# BOLT Connector
|
||||
dbms.connector.bolt.enabled=${boolToString cfg.bolt.enable}
|
||||
dbms.connector.bolt.listen_address=${cfg.bolt.listenAddress}
|
||||
bolt.ssl_policy=${cfg.bolt.sslPolicy}
|
||||
dbms.connector.bolt.tls_level=${cfg.bolt.tlsLevel}
|
||||
|
||||
# neo4j-shell
|
||||
dbms.shell.enabled=${boolToString cfg.shell.enable}
|
||||
|
||||
# SSL Policies
|
||||
${concatStringsSep "\n" sslPolicies}
|
||||
|
||||
@ -95,8 +95,10 @@ let
|
||||
dbms.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true
|
||||
dbms.jvm.additional=-Dunsupported.dbms.udc.source=tarball
|
||||
|
||||
# Usage Data Collector
|
||||
dbms.udc.enabled=${boolToString cfg.udc.enable}
|
||||
#dbms.memory.heap.initial_size=12000m
|
||||
#dbms.memory.heap.max_size=12000m
|
||||
#dbms.memory.pagecache.size=4g
|
||||
#dbms.tx_state.max_off_heap_memory=8000m
|
||||
|
||||
# Extra Configuration
|
||||
${cfg.extraServerConfig}
|
||||
@ -114,6 +116,8 @@ in {
|
||||
(mkRemovedOptionModule [ "services" "neo4j" "port" ] "Use services.neo4j.http.listenAddress instead.")
|
||||
(mkRemovedOptionModule [ "services" "neo4j" "boltPort" ] "Use services.neo4j.bolt.listenAddress instead.")
|
||||
(mkRemovedOptionModule [ "services" "neo4j" "httpsPort" ] "Use services.neo4j.https.listenAddress instead.")
|
||||
(mkRemovedOptionModule [ "services" "neo4j" "shell" "enabled" ] "shell.enabled was removed upstream")
|
||||
(mkRemovedOptionModule [ "services" "neo4j" "udc" "enabled" ] "udc.enabled was removed upstream")
|
||||
];
|
||||
|
||||
###### interface
|
||||
@ -568,19 +572,6 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
udc = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Enable the Usage Data Collector which Neo4j uses to collect usage
|
||||
data. Refer to the operations manual section on the
|
||||
[Usage Data Collector](https://neo4j.com/docs/operations-manual/current/configuration/usage-data-collector/)
|
||||
for more information.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
###### implementation
|
||||
@ -612,7 +603,7 @@ in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
environment = {
|
||||
NEO4J_HOME = "${cfg.package}/share/neo4j";
|
||||
NEO4J_HOME = "${cfg.directories.home}";
|
||||
NEO4J_CONF = "${cfg.directories.home}/conf";
|
||||
};
|
||||
serviceConfig = {
|
||||
@ -653,6 +644,6 @@ in {
|
||||
};
|
||||
|
||||
meta = {
|
||||
maintainers = with lib.maintainers; [ patternspandemic ];
|
||||
maintainers = with lib.maintainers; [ patternspandemic jonringer ];
|
||||
};
|
||||
}
|
||||
|
@ -7,6 +7,9 @@ import ./make-test-python.nix {
|
||||
|
||||
{
|
||||
services.neo4j.enable = true;
|
||||
# require tls certs to be available
|
||||
services.neo4j.https.enable = false;
|
||||
services.neo4j.bolt.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,14 +1,12 @@
|
||||
{ lib, stdenv, fetchurl, makeWrapper, jre, which, gawk }:
|
||||
|
||||
with lib;
|
||||
{ stdenv, lib, fetchurl, makeWrapper, openjdk11, which, gawk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "neo4j";
|
||||
version = "3.5.14";
|
||||
version = "4.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://neo4j.com/artifact.php?name=neo4j-community-${version}-unix.tar.gz";
|
||||
sha256 = "1zjb6cgk2lpzx6pq1cs5fh65in6b5ccpl1cgfiglgpjc948mnhzv";
|
||||
sha256 = "0w8jgbk1fxwivjvasj5l63123wrsz4yfnbwpn78dyh7c1d93lrjg";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
@ -18,21 +16,25 @@ stdenv.mkDerivation rec {
|
||||
cp -R * "$out/share/neo4j"
|
||||
|
||||
mkdir -p "$out/bin"
|
||||
for NEO4J_SCRIPT in neo4j neo4j-admin neo4j-import cypher-shell
|
||||
for NEO4J_SCRIPT in neo4j neo4j-admin cypher-shell
|
||||
do
|
||||
chmod +x "$out/share/neo4j/bin/$NEO4J_SCRIPT"
|
||||
makeWrapper "$out/share/neo4j/bin/$NEO4J_SCRIPT" \
|
||||
"$out/bin/$NEO4J_SCRIPT" \
|
||||
--prefix PATH : "${lib.makeBinPath [ jre which gawk ]}" \
|
||||
--set JAVA_HOME "${jre}"
|
||||
--prefix PATH : "${lib.makeBinPath [ openjdk11 which gawk ]}" \
|
||||
--set JAVA_HOME "${openjdk11}"
|
||||
done
|
||||
|
||||
patchShebangs $out/share/neo4j/bin/neo4j-admin
|
||||
# user will be asked to change password on first login
|
||||
$out/bin/neo4j-admin set-initial-password neo4j
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A highly scalable, robust (fully ACID) native graph database";
|
||||
homepage = "http://www.neo4j.org/";
|
||||
license = licenses.gpl3;
|
||||
|
||||
maintainers = [ maintainers.offline ];
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with maintainers; [ jonringer offline ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -23000,9 +23000,7 @@ with pkgs;
|
||||
|
||||
check_zfs = callPackage ../servers/monitoring/nagios/plugins/zfs.nix { };
|
||||
|
||||
neo4j = callPackage ../servers/nosql/neo4j {
|
||||
jre = jre8_headless;
|
||||
};
|
||||
neo4j = callPackage ../servers/nosql/neo4j { };
|
||||
|
||||
neo4j-desktop = callPackage ../applications/misc/neo4j-desktop { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user