From a070139443094fe79fec1b55e57806ef55d84944 Mon Sep 17 00:00:00 2001 From: Adrian G L Date: Tue, 17 Feb 2026 09:28:26 +0100 Subject: [PATCH] copyed simplesamlphp to package simplesamlphp theme --- packages/simplesamlphptheme/default.nix | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/simplesamlphptheme/default.nix diff --git a/packages/simplesamlphptheme/default.nix b/packages/simplesamlphptheme/default.nix new file mode 100644 index 0000000..90415fb --- /dev/null +++ b/packages/simplesamlphptheme/default.nix @@ -0,0 +1,38 @@ +{ lib +, php +, writeText +, fetchFromGitHub +, extra_files ? { } + +}: + +php.buildComposerProject rec { + pname = "simplesamlphp"; + version = "2.4.3"; + + src = fetchFromGitHub { + owner = "simplesamlphp"; + repo = "simplesamlphp"; + tag = "v${version}"; + hash = "sha256-vv4gzcnPfMapd8gER2Vsng1SBloHKWrJJltnw2HUnX4="; + }; + + composerStrictValidation = false; + + vendorHash = "sha256-vu3Iz6fRk3Gnh9Psn46jgRYKkmqGte+5xHBRmvdgKG4="; + + # TODO: metadata could be fetched automagically with these: + # - https://simplesamlphp.org/docs/contrib_modules/metarefresh/simplesamlphp-automated_metadata.html + # - https://idp.pvv.ntnu.no/simplesaml/saml2/idp/metadata.php + postPatch = lib.pipe extra_files [ + (lib.mapAttrsToList (target_path: source_path: '' + mkdir -p $(dirname "${target_path}") + cp -r "${source_path}" "${target_path}" + '')) + lib.concatLines + ]; + + postInstall = '' + ln -sr $out/share/php/simplesamlphp/vendor/simplesamlphp/simplesamlphp-assets-base $out/share/php/simplesamlphp/public/assets/base + ''; +}