nixpkgs/pkgs/servers/web-apps/moodle/moodle-utils.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
548 B
Nix
Raw Normal View History

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