depot/third_party/nixpkgs/pkgs/servers/web-apps/moodle/moodle-utils.nix
Default email 07d6a74cbb Project import generated by Copybara.
GitOrigin-RevId: f5e8bdd07d1afaabf6b37afc5497b1e498b8046f
2021-03-19 18:17:44 +01:00

33 lines
548 B
Nix

{ stdenv, unzip, ... }:
let
buildMoodlePlugin = a@{
name,
src,
pluginType,
configurePhase ? ":",
buildPhase ? ":",
buildInputs ? [ ],
nativeBuildInputs ? [ ],
...
}:
stdenv.mkDerivation (a // {
name = name;
inherit pluginType;
inherit configurePhase buildPhase buildInputs;
nativeBuildInputs = [ unzip ] ++ nativeBuildInputs;
installPhase = ''
runHook preInstall
mkdir -p "$out"
mv * $out/
runHook postInstall
'';
});
in {
inherit buildMoodlePlugin;
}