about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cleo
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-09-14 04:10:54 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-09-18 23:57:30 +0200
commitabebdcdd59f0d18104ed15f7397625835994e1d8 (patch)
tree918abc69a0fe3f89f661cebe8135fe91e63f1947 /pkgs/development/python-modules/cleo
parent3038f1715dbfa21b5b786ccc0083bec9fd3acec0 (diff)
python3Packages.cleo: 0.8.1 -> 1.0.0a5
Diffstat (limited to 'pkgs/development/python-modules/cleo')
-rw-r--r--pkgs/development/python-modules/cleo/default.nix51
1 files changed, 39 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/cleo/default.nix b/pkgs/development/python-modules/cleo/default.nix
index e79983b1bb293..e81ff175d5336 100644
--- a/pkgs/development/python-modules/cleo/default.nix
+++ b/pkgs/development/python-modules/cleo/default.nix
@@ -1,26 +1,53 @@
-{ lib, buildPythonPackage, fetchPypi
-, clikit }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, crashtest
+, poetry-core
+, pylev
+, pytest-mock
+, pytestCheckHook
+}:
 
 buildPythonPackage rec {
   pname = "cleo";
-  version = "0.8.1";
+  version = "1.0.0a5";
+  format = "pyproject";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f";
+  src = fetchFromGitHub {
+    owner = "python-poetry";
+    repo = pname;
+    rev = "refs/tags/${version}";
+    hash = "sha256-FtGGIRF/tA2OWEjkCFwa1HHg6VY+5E5mAiJC/zjUC1g=";
   };
 
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace 'crashtest = "^0.3.1"' 'crashtest = "*"'
+  '';
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
   propagatedBuildInputs = [
-    clikit
+    crashtest
+    pylev
   ];
 
-  # The Pypi tarball doesn't include tests, and the GitHub source isn't
-  # buildable until we bootstrap poetry, see
-  # https://github.com/NixOS/nixpkgs/pull/53599#discussion_r245855665
-  doCheck = false;
+  pythonImportsCheck = [
+    "cleo"
+    "cleo.application"
+    "cleo.commands.command"
+    "cleo.helpers"
+  ];
+
+  checkInputs = [
+    pytest-mock
+    pytestCheckHook
+  ];
 
   meta = with lib; {
-    homepage = "https://github.com/sdispater/cleo";
+    homepage = "https://github.com/python-poetry/cleo";
     description = "Allows you to create beautiful and testable command-line interfaces";
     license = licenses.mit;
     maintainers = with maintainers; [ jakewaksbaum ];