summary refs log tree commit diff
path: root/pkgs/tools/admin/lexicon
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2020-10-04 08:51:17 -0700
committerJon <jonringer@users.noreply.github.com>2020-10-05 10:55:06 -0700
commitcf24078902633e1e521fbec50c43d2a9b49eeea1 (patch)
tree1d57e4754f5565cea03a2e941894f1b3bad6cc58 /pkgs/tools/admin/lexicon
parentf4186f959652061c33f3e0a8b31f2ea8cd9d8729 (diff)
downloadnixpkgs-cf24078902633e1e521fbec50c43d2a9b49eeea1.tar
nixpkgs-cf24078902633e1e521fbec50c43d2a9b49eeea1.tar.gz
nixpkgs-cf24078902633e1e521fbec50c43d2a9b49eeea1.tar.bz2
nixpkgs-cf24078902633e1e521fbec50c43d2a9b49eeea1.tar.lz
nixpkgs-cf24078902633e1e521fbec50c43d2a9b49eeea1.tar.xz
nixpkgs-cf24078902633e1e521fbec50c43d2a9b49eeea1.tar.zst
nixpkgs-cf24078902633e1e521fbec50c43d2a9b49eeea1.zip
lexicon: fix build
Diffstat (limited to 'pkgs/tools/admin/lexicon')
-rw-r--r--pkgs/tools/admin/lexicon/default.nix65
1 files changed, 56 insertions, 9 deletions
diff --git a/pkgs/tools/admin/lexicon/default.nix b/pkgs/tools/admin/lexicon/default.nix
index 3af266c8175..31f4fec67f5 100644
--- a/pkgs/tools/admin/lexicon/default.nix
+++ b/pkgs/tools/admin/lexicon/default.nix
@@ -1,19 +1,37 @@
 { lib
-, python3Packages
+, python3
 , fetchFromGitHub
 }:
 
-python3Packages.buildPythonApplication rec {
-  pname = "lexicon";
-  version = "3.3.27";
+let
+  py = python3.override {
+    packageOverrides = self: super: {
+      # until https://github.com/ags-slc/localzone/issues/1 gets resolved
+      dnspython = super.dnspython.overridePythonAttrs(oldAttrs: rec {
+        pname = "dnspython";
+        version = "1.16.0";
+        # since name is defined from the previous derivation, need to override
+        # name explicity for correct version to show in drvName
+        name = "${pname}-${version}";
 
-  propagatedBuildInputs = with python3Packages; [ requests tldextract future cryptography pyyaml boto3 zeep xmltodict beautifulsoup4 dnspython pynamecheap softlayer transip localzone ];
+        src = super.fetchPypi {
+          inherit pname version;
+          extension = "zip";
+          sha256 = "00cfamn97w2vhq3id87f10mjna8ag5yz5dw0cy5s0sa3ipiyii9n";
+        };
+      });
 
-  checkInputs = with python3Packages; [ pytest pytestcov pytest_xdist vcrpy mock ];
+      localzone = super.localzone.overridePythonAttrs(oldAttrs: rec {
+        meta = oldAttrs.meta // { broken = false; };
+      });
+    };
+  };
+in
+  with py.pkgs;
 
-  checkPhase = ''
-    pytest --ignore=lexicon/tests/providers/test_auto.py
-  '';
+buildPythonApplication rec {
+  pname = "lexicon";
+  version = "3.3.27";
 
   src = fetchFromGitHub {
     owner = "AnalogJ";
@@ -22,6 +40,35 @@ python3Packages.buildPythonApplication rec {
     sha256 = "0i6grrpdwh7axhnsabb0pfjhpd3prc9ji1afivi7q3c0krgvncmc";
   };
 
+  propagatedBuildInputs = [
+    beautifulsoup4
+    boto3
+    cryptography
+    dnspython
+    future
+    localzone
+    pynamecheap
+    pyyaml
+    requests
+    softlayer
+    tldextract
+    transip
+    xmltodict
+    zeep
+  ];
+
+  checkInputs = [
+    mock
+    pytest
+    pytestcov
+    pytest_xdist
+    vcrpy
+  ];
+
+  checkPhase = ''
+    pytest --ignore=lexicon/tests/providers/test_auto.py
+  '';
+
   meta = with lib; {
     description = "Manipulate DNS records on various DNS providers in a standardized way.";
     homepage = "https://github.com/AnalogJ/lexicon";