2024-03-23 21:03:21 +01:00
|
|
|
{ lib
|
|
|
|
, php
|
|
|
|
, extra_files ? { }
|
|
|
|
}:
|
|
|
|
|
|
|
|
php.buildComposerProject rec {
|
|
|
|
src = ./..;
|
|
|
|
pname = "pvv-nettsiden";
|
|
|
|
version = "0.0.1";
|
2024-04-08 22:11:43 +02:00
|
|
|
vendorHash = "sha256-sWC5E60toa95re2NugvHVPT+vKYXc1I6Z3rSqXxTUu0=";
|
2024-03-23 21:03:21 +01:00
|
|
|
|
|
|
|
passthru.simplesamlphpPath = "share/php/pvv-nettsiden/vendor/simplesamlphp/simplesamlphp";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 dist/simplesamlphp-config.php $out/${passthru.simplesamlphpPath}/config/config.php
|
|
|
|
install -Dm644 dist/simplesamlphp-authsources.php $out/${passthru.simplesamlphpPath}/config/authsources.php
|
|
|
|
install -Dm644 dist/simplesamlphp-idp.php $out/${passthru.simplesamlphpPath}/metadata/saml20-idp-remote.php
|
|
|
|
install -Dm644 dist/config.source-env.php $out/share/php/pvv-nettsiden/config.php
|
|
|
|
|
|
|
|
${lib.pipe extra_files [
|
|
|
|
(lib.mapAttrsToList (target_path: source_path: ''
|
|
|
|
mkdir -p $(dirname "$out/${target_path}")
|
|
|
|
cp -r "${source_path}" "$out/${target_path}"
|
|
|
|
''))
|
|
|
|
(lib.concatStringsSep "\n")
|
|
|
|
]}
|
|
|
|
'';
|
|
|
|
}
|