nixos/moodle: add plugins
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
{ stdenv, unzip, ... }:
|
||||
|
||||
let
|
||||
buildMoodlePlugin = a@{
|
||||
name,
|
||||
src,
|
||||
pluginType,
|
||||
configuraPhase ? ":",
|
||||
buildPhase ? ":",
|
||||
buildInputs ? [ ],
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation (a // {
|
||||
name = name;
|
||||
|
||||
inherit pluginType;
|
||||
inherit configuraPhase buildPhase;
|
||||
|
||||
buildInputs = [ unzip ] ++ buildInputs;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out"
|
||||
mv * $out/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
in {
|
||||
inherit buildMoodlePlugin;
|
||||
}
|
||||
Reference in New Issue
Block a user