From 12f1f6fe2a4944816f3357032b8b23de949e8f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 23 Aug 2024 18:45:23 -0700 Subject: [PATCH 1/2] coursera-dl: depends on distutils --- pkgs/applications/misc/coursera-dl/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/misc/coursera-dl/default.nix b/pkgs/applications/misc/coursera-dl/default.nix index 67848ea9354e..74ba29dfa946 100644 --- a/pkgs/applications/misc/coursera-dl/default.nix +++ b/pkgs/applications/misc/coursera-dl/default.nix @@ -56,6 +56,7 @@ python3.pkgs.buildPythonApplication rec { attrs beautifulsoup4 configargparse + distutils keyring pyasn1 requests From b902650133b5957a77fbedd9e4d11772990c86a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 23 Aug 2024 18:50:34 -0700 Subject: [PATCH 2/2] coursera-dl: modernize --- .../applications/misc/coursera-dl/default.nix | 35 +++++++------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/pkgs/applications/misc/coursera-dl/default.nix b/pkgs/applications/misc/coursera-dl/default.nix index 74ba29dfa946..63aaf33f7f42 100644 --- a/pkgs/applications/misc/coursera-dl/default.nix +++ b/pkgs/applications/misc/coursera-dl/default.nix @@ -1,15 +1,15 @@ -{ lib -, fetchFromGitHub -, fetchpatch -, glibcLocales -, pandoc -, python3 +{ + fetchFromGitHub, + fetchpatch, + lib, + pandoc, + python3, }: python3.pkgs.buildPythonApplication rec { pname = "coursera-dl"; version = "0.11.5"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "coursera-dl"; @@ -35,24 +35,13 @@ python3.pkgs.buildPythonApplication rec { }) ]; - postPatch = '' - substituteInPlace requirements.txt \ - --replace '==' '>=' - ''; + build-system = with python3.pkgs; [ setuptools ]; - preConfigure = '' - export LC_ALL=en_US.utf-8 - ''; + nativeBuildInputs = [ pandoc ]; - nativeBuildInputs = with python3.pkgs; [ - pandoc - ]; + pythonRelaxDeps = true; - buildInputs = with python3.pkgs; [ - glibcLocales - ]; - - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ attrs beautifulsoup4 configargparse @@ -78,7 +67,7 @@ python3.pkgs.buildPythonApplication rec { description = "CLI for downloading Coursera.org videos and naming them"; mainProgram = "coursera-dl"; homepage = "https://github.com/coursera-dl/coursera-dl"; - changelog = "https://github.com/coursera-dl/coursera-dl/blob/0.11.5/CHANGELOG.md"; + changelog = "https://github.com/coursera-dl/coursera-dl/blob/${src.rev}/CHANGELOG.md"; license = licenses.lgpl3Plus; maintainers = with maintainers; [ alexfmpe ]; platforms = platforms.darwin ++ platforms.linux;