mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
33 lines
495 B
Nix
33 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;
|
|
}
|