about summary refs log tree commit diff
path: root/pkgs/development/python-modules/courlan/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/courlan/default.nix')
-rw-r--r--pkgs/development/python-modules/courlan/default.nix56
1 files changed, 29 insertions, 27 deletions
diff --git a/pkgs/development/python-modules/courlan/default.nix b/pkgs/development/python-modules/courlan/default.nix
index bd73aad1977d8..fd2cfc01b6e8d 100644
--- a/pkgs/development/python-modules/courlan/default.nix
+++ b/pkgs/development/python-modules/courlan/default.nix
@@ -1,56 +1,58 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, langcodes
-, pytestCheckHook
-, tld
-, urllib3
-, pythonOlder
+{
+  lib,
+  babel,
+  buildPythonPackage,
+  fetchPypi,
+  langcodes,
+  pytestCheckHook,
+  pythonOlder,
+  setuptools,
+  tld,
+  urllib3,
 }:
 
 buildPythonPackage rec {
   pname = "courlan";
-  version = "1.0.0";
-  format = "setuptools";
+  version = "1.1.0";
+  pyproject = true;
 
   disabled = pythonOlder "3.6";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-PDVRHDZSXLL5Qc1nCbejp0LtlfC55WyX7sDBb9wDUYM=";
+    hash = "sha256-1wZoQzTxi+StofvVfyaArfADZkj22ECFL3pIItOt/Y0=";
   };
 
-  propagatedBuildInputs = [
+  # Tests try to write to /tmp directly. use $TMPDIR instead.
+  postPatch = ''
+    substituteInPlace tests/unit_tests.py \
+      --replace-fail "\"courlan --help\"" "\"$out/bin/courlan --help\"" \
+      --replace-fail "courlan_bin = \"courlan\"" "courlan_bin = \"$out/bin/courlan\"" \
+      --replace-fail "/tmp" "$TMPDIR"
+  '';
+
+  build-system = [ setuptools ];
+
+  dependencies = [
+    babel
     langcodes
     tld
     urllib3
   ];
 
-  nativeCheckInputs = [
-    pytestCheckHook
-  ];
+  nativeCheckInputs = [ pytestCheckHook ];
 
   # disable tests that require an internet connection
-  disabledTests = [
-    "test_urlcheck"
-  ];
-
-  # tests try to write to /tmp directly. use $TMPDIR instead.
-  postPatch = ''
-    substituteInPlace tests/unit_tests.py \
-      --replace "\"courlan --help\"" "\"$out/bin/courlan --help\"" \
-      --replace "courlan_bin = \"courlan\"" "courlan_bin = \"$out/bin/courlan\"" \
-      --replace "/tmp" "$TMPDIR"
-  '';
+  disabledTests = [ "test_urlcheck" ];
 
   pythonImportsCheck = [ "courlan" ];
 
   meta = with lib; {
     description = "Clean, filter and sample URLs to optimize data collection";
-    mainProgram = "courlan";
     homepage = "https://github.com/adbar/courlan";
     changelog = "https://github.com/adbar/courlan/blob/v${version}/HISTORY.md";
     license = licenses.asl20;
     maintainers = with maintainers; [ jokatzke ];
+    mainProgram = "courlan";
   };
 }