about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-05-04 20:55:17 +0200
committerGitHub <noreply@github.com>2022-05-04 20:55:17 +0200
commit97d1fb40c1e7da6b3792880b5d7b0534be9e53c5 (patch)
tree1b75815b945f92291f86324bcf1c207f37df7d0f /pkgs/development
parent833b0ae1b7e7cbfe70713badd3094c553e1470d5 (diff)
parent95fd917f4ee38d209813495d178ccc16db64cd80 (diff)
Merge pull request #171174 from marsam/update-breezy
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/breezy/default.nix25
-rw-r--r--pkgs/development/python-modules/fastbencode/default.nix26
2 files changed, 46 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/breezy/default.nix b/pkgs/development/python-modules/breezy/default.nix
index 3c24d5f31924a..64774a70867a2 100644
--- a/pkgs/development/python-modules/breezy/default.nix
+++ b/pkgs/development/python-modules/breezy/default.nix
@@ -3,23 +3,36 @@
 , fetchPypi
 , configobj
 , patiencediff
-, six
+, fastbencode
 , fastimport
 , dulwich
 , launchpadlib
 , testtools
+, pythonOlder
+, installShellFiles
 }:
 
 buildPythonPackage rec {
   pname = "breezy";
-  version = "3.2.1";
+  version = "3.2.2";
+
+  disabled = pythonOlder "3.5";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-4LJo6xoooq8EUoDDfQIa4y1/8XX0ybmfM6rX2wsp2Fw=";
+    sha256 = "sha256-GHpuRSCN0F2BdQc2cgyDcQz0gJT1R+xAgcVxJZVZpNU=";
   };
 
-  propagatedBuildInputs = [ configobj patiencediff six fastimport dulwich launchpadlib ];
+  nativeBuildInputs = [ installShellFiles ];
+
+  propagatedBuildInputs = [
+    configobj
+    fastbencode
+    patiencediff
+    fastimport
+    dulwich
+    launchpadlib
+  ];
 
   checkInputs = [ testtools ];
 
@@ -29,6 +42,8 @@ buildPythonPackage rec {
   # symlink for bazaar compatibility
   postInstall = ''
     ln -s "$out/bin/brz" "$out/bin/bzr"
+
+    installShellCompletion --cmd brz --bash contrib/bash/brz
   '';
 
   pythonImportsCheck = [ "breezy" ];
@@ -36,7 +51,7 @@ buildPythonPackage rec {
   meta = with lib; {
     description = "Friendly distributed version control system";
     homepage = "https://www.breezy-vcs.org/";
-    license = licenses.gpl2;
+    license = licenses.gpl2Only;
     maintainers = [ maintainers.marsam ];
   };
 }
diff --git a/pkgs/development/python-modules/fastbencode/default.nix b/pkgs/development/python-modules/fastbencode/default.nix
new file mode 100644
index 0000000000000..87072491cef45
--- /dev/null
+++ b/pkgs/development/python-modules/fastbencode/default.nix
@@ -0,0 +1,26 @@
+{ lib, buildPythonPackage, fetchPypi, python, cython }:
+
+buildPythonPackage rec {
+  pname = "fastbencode";
+  version = "0.0.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "sha256-tryavlQtBmN5NSlXb0m6iJFQhVT4XQm11tXtevfgxuQ=";
+  };
+
+  nativeBuildInputs = [ cython ];
+
+  pythonImportsCheck = [ "fastbencode" ];
+
+  checkPhase = ''
+    ${python.interpreter} -m unittest fastbencode.tests.test_suite
+  '';
+
+  meta = with lib; {
+    description = "Fast implementation of bencode";
+    homepage = "https://github.com/breezy-team/fastbencode";
+    license = licenses.gpl2Only;
+    maintainers = [ maintainers.marsam ];
+  };
+}