This commit is contained in:
Vegard Bieker Matthey
2026-02-20 18:18:09 +01:00
parent 18167dca0a
commit dc8a6c8c71
127 changed files with 3804 additions and 2402 deletions

View File

@@ -1,4 +1,10 @@
{ lib, stdenvNoCC, fetchurl, makeWrapper, jre }:
{
lib,
stdenvNoCC,
fetchurl,
makeWrapper,
jre,
}:
stdenvNoCC.mkDerivation rec {
pname = "bluemap";

View File

@@ -1,31 +1,33 @@
{ pkgs, lib }:
let
kebab-case-name = project-name: lib.pipe project-name [
(builtins.replaceStrings
lib.upperChars
(map (x: "-${x}") lib.lowerChars)
)
(lib.removePrefix "-")
];
kebab-case-name =
project-name:
lib.pipe project-name [
(builtins.replaceStrings lib.upperChars (map (x: "-${x}") lib.lowerChars))
(lib.removePrefix "-")
];
mw-ext = {
name
, commit
, hash
, tracking-branch ? "REL1_44"
, kebab-name ? kebab-case-name name
, fetchgit ? pkgs.fetchgit
}:
{
${name} = (fetchgit {
name = "mediawiki-${kebab-name}-source";
url = "https://gerrit.wikimedia.org/r/mediawiki/extensions/${name}";
rev = commit;
inherit hash;
}).overrideAttrs (_: {
passthru = { inherit name kebab-name tracking-branch; };
});
};
mw-ext =
{
name,
commit,
hash,
tracking-branch ? "REL1_44",
kebab-name ? kebab-case-name name,
fetchgit ? pkgs.fetchgit,
}:
{
${name} =
(fetchgit {
name = "mediawiki-${kebab-name}-source";
url = "https://gerrit.wikimedia.org/r/mediawiki/extensions/${name}";
rev = commit;
inherit hash;
}).overrideAttrs
(_: {
passthru = { inherit name kebab-name tracking-branch; };
});
};
in
# NOTE: to add another extension, you can add an mw-ext expression
# with an empty (or even wrong) commit and empty hash, and

View File

@@ -1,8 +1,9 @@
{ lib
, php
, writeText
, fetchFromGitHub
, extra_files ? { }
{
lib,
php,
writeText,
fetchFromGitHub,
extra_files ? { },
}:
@@ -25,10 +26,12 @@ php.buildComposerProject rec {
# - 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.mapAttrsToList (
target_path: source_path: ''
mkdir -p $(dirname "${target_path}")
cp -r "${source_path}" "${target_path}"
''
))
lib.concatLines
];