@@ -0,0 +1,34 @@
1+{ lib, python3Packages }:
2+
3+python3Packages.buildPythonApplication rec {
4+ pname = "moodle-dl";
5+ version = "2.1.2.5";
6+
7+ src = python3Packages.fetchPypi {
8+ inherit pname version;
9+ sha256 = "1gc4037dwyi48h4vi0bam23rr7pfyn6jrz334radz0r6rk94y8lz";
10+ };
11+
12+ # nixpkgs (and the GitHub upstream for readchar) are missing 2.0.1
13+ postPatch = ''
14+ substituteInPlace setup.py --replace 'readchar>=2.0.1' 'readchar>=2.0.0'
15+ '';
16+
17+ propagatedBuildInputs = with python3Packages; [
18+ sentry-sdk
19+ colorama
20+ readchar
21+ youtube-dl
22+ certifi
23+ html2text
24+ requests
25+ slixmpp
26+ ];
27+
28+ meta = with lib; {
29+ homepage = "https://github.com/C0D3D3V/Moodle-Downloader-2";
30+ maintainers = [ maintainers.kmein ];
31+ description = "A Moodle downloader that downloads course content fast from Moodle";
32+ license = licenses.gpl3Plus;
33+ };
34+}