nixpkgs/pkgs/servers/nosql/neo4j/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.3 KiB
Nix
Raw Normal View History

2020-09-22 06:55:28 +01:00
{ stdenv, lib, fetchurl, nixosTests, makeWrapper, openjdk11, which, gawk }:
2014-08-16 22:53:03 +01:00
stdenv.mkDerivation rec {
pname = "neo4j";
2022-09-23 00:32:49 +01:00
version = "4.4.11";
2014-08-16 22:53:03 +01:00
src = fetchurl {
2018-06-01 11:17:03 +01:00
url = "https://neo4j.com/artifact.php?name=neo4j-community-${version}-unix.tar.gz";
2022-09-23 00:32:49 +01:00
sha256 = "sha256-KIENqsXeSl1bd84tp9fD2kxczxMoi62IW4M8NblhAMg=";
2014-08-16 22:53:03 +01:00
};
nativeBuildInputs = [ makeWrapper ];
2014-08-16 22:53:03 +01:00
installPhase = ''
mkdir -p "$out/share/neo4j"
cp -R * "$out/share/neo4j"
mkdir -p "$out/bin"
2020-09-21 22:15:49 +01:00
for NEO4J_SCRIPT in neo4j neo4j-admin cypher-shell
2016-10-11 22:58:54 +01:00
do
2020-09-21 22:15:49 +01:00
chmod +x "$out/share/neo4j/bin/$NEO4J_SCRIPT"
2016-10-11 22:58:54 +01:00
makeWrapper "$out/share/neo4j/bin/$NEO4J_SCRIPT" \
"$out/bin/$NEO4J_SCRIPT" \
2020-09-21 22:15:49 +01:00
--prefix PATH : "${lib.makeBinPath [ openjdk11 which gawk ]}" \
--set JAVA_HOME "${openjdk11}"
2016-10-11 22:58:54 +01:00
done
2020-09-21 22:15:49 +01:00
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
2014-08-16 22:53:03 +01:00
'';
2020-09-22 06:55:28 +01:00
passthru.tests.nixos = nixosTests.neo4j;
meta = with lib; {
description = "A highly scalable, robust (fully ACID) native graph database";
2021-08-31 15:59:08 +01:00
homepage = "https://neo4j.com/";
2014-08-16 22:53:03 +01:00
license = licenses.gpl3;
2020-09-21 22:15:49 +01:00
maintainers = with maintainers; [ jonringer offline ];
platforms = platforms.unix;
2014-08-16 22:53:03 +01:00
};
}