0eaa97ffad
GitOrigin-RevId: c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38
32 lines
495 B
Nix
32 lines
495 B
Nix
{ stdenv, unzip, ... }:
|
|
|
|
let
|
|
buildMoodlePlugin = a@{
|
|
name,
|
|
src,
|
|
pluginType,
|
|
configurePhase ? ":",
|
|
buildPhase ? ":",
|
|
buildInputs ? [ ],
|
|
...
|
|
}:
|
|
stdenv.mkDerivation (a // {
|
|
name = name;
|
|
|
|
inherit pluginType;
|
|
inherit configurePhase buildPhase;
|
|
|
|
buildInputs = [ unzip ] ++ buildInputs;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p "$out"
|
|
mv * $out/
|
|
|
|
runHook postInstall
|
|
'';
|
|
});
|
|
in {
|
|
inherit buildMoodlePlugin;
|
|
}
|