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