Files
nixpkgs/pkgs/by-name/ad/adminneo/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

65 lines
1.3 KiB
Nix

{
lib,
stdenvNoCC,
fetchFromGitHub,
php,
nix-update-script,
installPlugins ? true,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "adminneo";
version = "5.1.1";
src = fetchFromGitHub {
owner = "adminneo-org";
repo = "adminneo";
tag = "v${finalAttrs.version}";
hash = "sha256-ckz0LvKLY6xm3thPmY/ry8G5kkt29rmDsG/D6NNeRoY=";
};
nativeBuildInputs = [
php
];
# Package provides a Makefile, which is currently broken
# https://github.com/adminneo-org/adminneo/issues/161
# As soon, as this is fixed, the buildPhase can be removed
buildPhase = ''
runHook preBuild
${php}/bin/php bin/compile.php
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir $out
cp compiled/adminneo-${finalAttrs.version}.php $out/adminneo.php
# for compatibility
ln -s adminneo.php $out/index.php
''
+ (lib.optionalString installPlugins ''
cp -r compiled/adminneo-plugins $out/
'')
+ ''
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Database management in a single PHP file (fork of Adminer)";
homepage = "https://www.adminneo.org/";
license = with lib.licenses; [
asl20
gpl2Only
];
maintainers = with lib.maintainers; [
Necoro
];
platforms = lib.platforms.all;
};
})