summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorCole Helbling <cole.e.helbling@outlook.com>2021-05-07 11:05:41 -0700
committerCole Helbling <cole.e.helbling@outlook.com>2021-05-08 08:26:02 -0700
commitb2534aa0cb31978b41c3dbb0fe11ffec02e91d9f (patch)
treeb5510ed831bebb9bd1b6580e19cc542a50abea50 /pkgs
parent6e8c1aaac36eeb103371861512620c941fc34224 (diff)
python3.pkgs.tern: replace debut with debian-inspector
debut was renamed to debian-inspector. I didn't realize at the time that these
were two of the very same packages.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/tern/0001-Replace-debut-with-debian-inspector.patch40
-rw-r--r--pkgs/development/python-modules/tern/default.nix12
2 files changed, 50 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/tern/0001-Replace-debut-with-debian-inspector.patch b/pkgs/development/python-modules/tern/0001-Replace-debut-with-debian-inspector.patch
new file mode 100644
index 0000000000000..c9cb8b4a52812
--- /dev/null
+++ b/pkgs/development/python-modules/tern/0001-Replace-debut-with-debian-inspector.patch
@@ -0,0 +1,40 @@
+From d944d8fa6cb6d1667f3e4c4e0cff4c4b2a7c0a30 Mon Sep 17 00:00:00 2001
+From: Cole Helbling <cole.e.helbling@outlook.com>
+Date: Fri, 7 May 2021 11:00:46 -0700
+Subject: [PATCH] Replace `debut` with `debian-inspector`
+
+---
+ requirements.in        | 2 +-
+ tern/analyze/common.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/requirements.in b/requirements.in
+index edd90ab..5135841 100644
+--- a/requirements.in
++++ b/requirements.in
+@@ -12,6 +12,6 @@ requests
+ stevedore
+ pbr
+ dockerfile-parse
+-debut
++debian-inspector
+ regex
+ GitPython
+diff --git a/tern/analyze/common.py b/tern/analyze/common.py
+index 6962404..0f5e77d 100644
+--- a/tern/analyze/common.py
++++ b/tern/analyze/common.py
+@@ -19,8 +19,8 @@ from tern.utils import cache
+ from tern.utils import constants
+ from tern.utils import general
+ from tern.utils import rootfs
+-from debut import debcon
+-from debut import copyright as debut_copyright
++from debian_inspector import debcon
++from debian_inspector import copyright as debut_copyright
+ 
+ # global logger
+ logger = logging.getLogger(constants.logger_name)
+-- 
+2.31.1
+
diff --git a/pkgs/development/python-modules/tern/default.nix b/pkgs/development/python-modules/tern/default.nix
index 6247087dd670c..7eb889c873a85 100644
--- a/pkgs/development/python-modules/tern/default.nix
+++ b/pkgs/development/python-modules/tern/default.nix
@@ -7,7 +7,7 @@
 , requests
 , stevedore
 , pbr
-, debut
+, debian-inspector
 , regex
 , GitPython
 , prettytable
@@ -22,6 +22,14 @@ buildPythonPackage rec {
     sha256 = "606c62944991b2cbcccf3f5353be693305d6d7d318c3865b9ecca49dbeab2727";
   };
 
+  patches = [
+    # debut was renamed to debian-inspector
+    # https://github.com/tern-tools/tern/pull/962
+    # NOTE: Has to be in-tree because the upstream patch doesn't apply cleanly
+    # to the PyPi source.
+    ./0001-Replace-debut-with-debian-inspector.patch
+  ];
+
   preBuild = ''
     cp requirements.{in,txt}
   '';
@@ -36,7 +44,7 @@ buildPythonPackage rec {
     dockerfile-parse
     requests
     stevedore
-    debut
+    debian-inspector
     regex
     GitPython
     prettytable