mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 08:04:14 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{ stdenv, lib, fetchurl, nixosTests, makeWrapper, openjdk17, which, gawk }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "neo4j";
|
|
version = "5.24.2";
|
|
|
|
src = fetchurl {
|
|
url = "https://neo4j.com/artifact.php?name=neo4j-community-${version}-unix.tar.gz";
|
|
hash = "sha256-fhbcTyxDvBiKNYtHxfrZ0DAPH7LVmY5lOA/kJd2K9tY=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -p "$out/share/neo4j"
|
|
cp -R * "$out/share/neo4j"
|
|
|
|
mkdir -p "$out/bin"
|
|
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 [ openjdk17 which gawk ]}" \
|
|
--set JAVA_HOME "${openjdk17}"
|
|
done
|
|
|
|
patchShebangs $out/share/neo4j/bin/neo4j-admin
|
|
|
|
# user will be asked to change password on first login
|
|
# password must be at least 8 characters long
|
|
$out/bin/neo4j-admin dbms set-initial-password neo4jadmin
|
|
'';
|
|
|
|
passthru.tests.nixos = nixosTests.neo4j;
|
|
|
|
meta = with lib; {
|
|
description = "Highly scalable, robust (fully ACID) native graph database";
|
|
homepage = "https://neo4j.com/";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ offline ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|