lldap: make more overridable. call runHook; use finalAttrs for frontend (#443064)

This commit is contained in:
Colin
2025-10-10 16:57:32 +00:00
committed by GitHub

View File

@@ -76,15 +76,23 @@ let
]; ];
buildPhase = '' buildPhase = ''
runHook preBuild
HOME=`pwd` ./app/build.sh HOME=`pwd` ./app/build.sh
runHook postBuild
''; '';
installPhase = '' installPhase = ''
runHook preInstall
mkdir -p $out mkdir -p $out
cp -R app/{pkg,static} $out/ cp -R app/{pkg,static} $out/
cp app/index_local.html $out/index.html cp app/index_local.html $out/index.html
cp -R ${staticAssets finalAttrs.src}/* $out/static cp -R ${staticAssets finalAttrs.src}/* $out/static
rm $out/static/libraries.txt $out/static/fonts/fonts.txt rm $out/static/libraries.txt $out/static/fonts/fonts.txt
runHook postInstall
''; '';
doCheck = false; doCheck = false;
@@ -93,6 +101,7 @@ let
in in
rustPlatform.buildRustPackage ( rustPlatform.buildRustPackage (
finalAttrs:
commonDerivationAttrs commonDerivationAttrs
// { // {
cargoBuildFlags = [ cargoBuildFlags = [
@@ -107,7 +116,7 @@ rustPlatform.buildRustPackage (
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
postInstall = '' postInstall = ''
wrapProgram $out/bin/lldap \ wrapProgram $out/bin/lldap \
--set LLDAP_ASSETS_PATH ${frontend} --set LLDAP_ASSETS_PATH ${finalAttrs.finalPackage.frontend}
''; '';
passthru = { passthru = {
@@ -130,4 +139,5 @@ rustPlatform.buildRustPackage (
mainProgram = "lldap"; mainProgram = "lldap";
}; };
} }
) )