mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-02-21 09:27:51 +01:00
nixfmt
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
{ lib, stdenvNoCC, fetchurl, makeWrapper, jre }:
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
makeWrapper,
|
||||
jre,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "bluemap";
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user