From 4a0c0401b53d00f0e8582715cf2e563c1ad7fd10 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 17 Mar 2018 14:04:53 +0100 Subject: [PATCH] pythonPackages.tablib: fix build `openpyxl` v5 breaks `tablib`, the following patch fixes the API incompatibility: https://github.com/kennethreitz/tablib/pull/296 See https://hydra.nixos.org/build/70694938/log See ticket #36453 --- .../python-modules/tablib/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 17 +---------- 2 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 pkgs/development/python-modules/tablib/default.nix diff --git a/pkgs/development/python-modules/tablib/default.nix b/pkgs/development/python-modules/tablib/default.nix new file mode 100644 index 000000000000..9f1bf2390b6a --- /dev/null +++ b/pkgs/development/python-modules/tablib/default.nix @@ -0,0 +1,29 @@ +{ buildPythonPackage, stdenv, fetchPypi, pytest, unicodecsv, pandas +, xlwt, openpyxl, pyyaml, xlrd, odfpy, fetchpatch +}: + +buildPythonPackage rec { + pname = "tablib"; + version = "0.12.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "11wxchj0qz77dn79yiq30k4b4gsm429f4bizk4lm4rb63nk51kxq"; + }; + + checkInputs = [ pytest unicodecsv pandas ]; + propagatedBuildInputs = [ xlwt openpyxl pyyaml xlrd odfpy ]; + + patches = [ + (fetchpatch { + url = "https://github.com/kennethreitz/tablib/commit/0e51a2d0944022af186d2dcd34c0ab3c47141ba5.patch"; + sha256 = "0lbbl871zdn5vpgqyjkil0c2ap3b5hz19rmihhyvrx7m4mlh1aij"; + }) + ]; + + meta = with stdenv.lib; { + description = "Tablib: format-agnostic tabular dataset library"; + homepage = http://python-tablib.org; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 67a088731fe3..818a05cf3ede 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2650,22 +2650,7 @@ in { pyunifi = callPackage ../development/python-modules/pyunifi { }; - tablib = buildPythonPackage rec { - name = "tablib-${version}"; - version = "0.12.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/t/tablib/tablib-${version}.tar.gz"; - sha256 = "11wxchj0qz77dn79yiq30k4b4gsm429f4bizk4lm4rb63nk51kxq"; - }; - - buildInputs = with self; [ pytest unicodecsv pandas ]; - propagatedBuildInputs = with self; [ xlwt openpyxl pyyaml xlrd odfpy ]; - meta = with stdenv.lib; { - description = "Tablib: format-agnostic tabular dataset library"; - homepage = "http://python-tablib.org"; - }; - }; + tablib = callPackage ../development/python-modules/tablib { }; wakeonlan = callPackage ../development/python-modules/wakeonlan { };