mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 18:42:15 +00:00
34 lines
548 B
Nix
34 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;
|
|
}
|