mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
moodle: init at 3.7.1
This commit is contained in:
parent
b048cf56d1
commit
95b3b63555
40
pkgs/servers/web-apps/moodle/default.nix
Normal file
40
pkgs/servers/web-apps/moodle/default.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ stdenv, fetchurl, writeText }:
|
||||
|
||||
let
|
||||
version = "3.7.1";
|
||||
stableVersion = builtins.substring 0 2 (builtins.replaceStrings ["."] [""] version);
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "moodle";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.moodle.org/stable${stableVersion}/${pname}-${version}.tgz";
|
||||
sha256 = "0xfriw0nfaf9hlcjviwg2acwpd192jf2ahw8sw3s6bj3pr1isxmd";
|
||||
};
|
||||
|
||||
phpConfig = writeText "config.php" ''
|
||||
<?php
|
||||
return require(getenv('MOODLE_CONFIG'));
|
||||
?>
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/moodle
|
||||
cp -r . $out/share/moodle
|
||||
cp ${phpConfig} $out/share/moodle/config.php
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Free and open-source learning management system (LMS) written in PHP";
|
||||
license = licenses.gpl3Plus;
|
||||
homepage = "https://moodle.org/";
|
||||
maintainers = with maintainers; [ aanderse ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -14715,6 +14715,8 @@ in
|
||||
|
||||
mlmmj = callPackage ../servers/mail/mlmmj { };
|
||||
|
||||
moodle = callPackage ../servers/web-apps/moodle { };
|
||||
|
||||
morty = callPackage ../servers/web-apps/morty { };
|
||||
|
||||
mullvad-vpn = callPackage ../applications/networking/mullvad-vpn { };
|
||||
|
Loading…
Reference in New Issue
Block a user