Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
634 B
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{ stdenv, unzip, ... }:
let
buildMoodlePlugin =
a@{
name,
src,
pluginType,
configurePhase ? ":",
buildPhase ? ":",
buildInputs ? [ ],
nativeBuildInputs ? [ ],
...
}:
stdenv.mkDerivation (
a
// {
name = name;
inherit pluginType;
inherit configurePhase buildPhase buildInputs;
nativeBuildInputs = [ unzip ] ++ nativeBuildInputs;
installPhase = ''
runHook preInstall
mkdir -p "$out"
mv * $out/
runHook postInstall
'';
}
);
in
{
inherit buildMoodlePlugin;
}