2020-07-18 16:06:22 +00:00
|
|
|
{ stdenv, unzip, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
buildMoodlePlugin = a@{
|
|
|
|
name,
|
|
|
|
src,
|
|
|
|
pluginType,
|
2020-08-20 17:08:02 +00:00
|
|
|
configurePhase ? ":",
|
2020-07-18 16:06:22 +00:00
|
|
|
buildPhase ? ":",
|
|
|
|
buildInputs ? [ ],
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation (a // {
|
|
|
|
name = name;
|
|
|
|
|
|
|
|
inherit pluginType;
|
2020-08-20 17:08:02 +00:00
|
|
|
inherit configurePhase buildPhase;
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
buildInputs = [ unzip ] ++ buildInputs;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p "$out"
|
|
|
|
mv * $out/
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
in {
|
|
|
|
inherit buildMoodlePlugin;
|
|
|
|
}
|