{ fetchurl, lib, stdenv, nodejs_24, php, phpPackages }: stdenv.mkDerivation rec { pname = "phpLDAPadmin"; version = "2.1.4"; src = fetchurl { url = "https://github.com/leenooks/phpLDAPadmin/archive/${version}.tar.gz"; sha256 = "sha256-hkigC458YSgAZVCzVznix8ktDBuQm+UH3ujXn9Umylc="; }; # Pull in PHP itself and Composer buildInputs = [ php nodejs_24 ]; nativeBuildInputs = [ phpPackages.composer ]; # Let composer do its work buildPhase = '' # install all PHP dependencies into vendor/ npm i npm run prod composer i --no-dev ''; installPhase = '' mkdir -p $out # copy everything—including the newly created vendor/ directory cp -r . $out/ ln -sf /etc/phpldapadmin/env $out/.env ''; meta = { description = "phpLDAPadmin"; license = lib.licenses.gpl3; platforms = lib.platforms.all; }; }