moodle: 3.11.6 -> 4.0.2

authored by Finn Behrens and committed by Alyssa Ross bc8f0042 3f9b0f53

+8 -3
+8 -3
pkgs/servers/web-apps/moodle/default.nix
··· 1 1 { lib, stdenv, fetchurl, writeText, plugins ? [ ] }: 2 2 3 3 let 4 - version = "3.11.6"; 5 - stableVersion = lib.concatStrings (lib.take 2 (lib.splitVersion version)); 4 + version = "4.0.2"; 5 + 6 + versionParts = lib.take 2 (lib.splitVersion version); 7 + # 4.2 -> 402, 3.11 -> 311 8 + stableVersion = lib.removePrefix "0" (lib.concatMapStrings 9 + (p: if (lib.toInt p) < 10 then (lib.concatStrings ["0" p]) else p) 10 + versionParts); 6 11 7 12 in stdenv.mkDerivation rec { 8 13 pname = "moodle"; ··· 10 15 11 16 src = fetchurl { 12 17 url = "https://download.moodle.org/stable${stableVersion}/${pname}-${version}.tgz"; 13 - sha256 = "sha256-g3qHYkxiXb18vJ23THUw8ej+s5SgIkJpmjQmmARwQhs="; 18 + sha256 = "sha256-Ouz1U5bMzwzQZiMmVOrx3oWtqyn7GE/oeaTrsXmsBJI="; 14 19 }; 15 20 16 21 phpConfig = writeText "config.php" ''