Initial code to import ssp-theme repo.

This commit is contained in:
Karoline Dyve Samuelsen
2026-02-17 09:43:00 +01:00
parent a070139443
commit 264f147069

View File

@@ -1,38 +1,22 @@
{ lib { lib
, php , php
, writeText , writeText
, fetchFromGitHub , fetchFromGitea
, extra_files ? { } , extra_files ? { }
}: }:
php.buildComposerProject rec {
pname = "simplesamlphp";
version = "2.4.3";
src = fetchFromGitHub { stdenv.mkDerivation {
owner = "simplesamlphp"; pname = "ssp-theme";
repo = "simplesamlphp"; version = "v1.2026";
tag = "v${version}";
hash = "sha256-vv4gzcnPfMapd8gER2Vsng1SBloHKWrJJltnw2HUnX4="; src = fetchFromGitea {
owner = "drift";
repo = "ssp-theme";
rev = "master";
sha256 = "source-hash";
domain = "git.pvv.ntnu.no";
}; };
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
'';
} }