From ac74b42351e671d45949341fe5b9dac5bb69f574 Mon Sep 17 00:00:00 2001 From: Benjamin Asbach Date: Sat, 11 Sep 2021 19:23:32 -0600 Subject: [PATCH 1/2] csvs-to-sqlite: removed from `python-package` since it's an command line application --- .../python-modules => tools/misc}/csvs-to-sqlite/default.nix | 0 pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) rename pkgs/{development/python-modules => tools/misc}/csvs-to-sqlite/default.nix (100%) diff --git a/pkgs/development/python-modules/csvs-to-sqlite/default.nix b/pkgs/tools/misc/csvs-to-sqlite/default.nix similarity index 100% rename from pkgs/development/python-modules/csvs-to-sqlite/default.nix rename to pkgs/tools/misc/csvs-to-sqlite/default.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4aeb4cc079e7..afad862de885 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2470,7 +2470,7 @@ with pkgs; csv2latex = callPackage ../tools/misc/csv2latex { }; - csvs-to-sqlite = with python3Packages; toPythonApplication csvs-to-sqlite; + csvs-to-sqlite = python3Packages.callPackage ../tools/misc/csvs-to-sqlite { }; cucumber = callPackage ../development/tools/cucumber {}; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 88fa4b1d1ebb..951c675d09eb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1749,8 +1749,6 @@ in { cssutils = callPackage ../development/python-modules/cssutils { }; - csvs-to-sqlite = callPackage ../development/python-modules/csvs-to-sqlite { }; - csvw = callPackage ../development/python-modules/csvw { }; cucumber-tag-expressions = callPackage ../development/python-modules/cucumber-tag-expressions { }; From a5d5f32f9018fcafb203437740964ab574aef8ab Mon Sep 17 00:00:00 2001 From: Benjamin Asbach Date: Tue, 14 Sep 2021 08:34:34 -0600 Subject: [PATCH 2/2] csvs-to-sqlite: added override for `click` dependency to version `7` in order to fix build The application is not capable to build with `click` greate than version `7`. --- pkgs/tools/misc/csvs-to-sqlite/default.nix | 24 +++++++++++----------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/tools/misc/csvs-to-sqlite/default.nix b/pkgs/tools/misc/csvs-to-sqlite/default.nix index ea32471f09c5..b351b6e4efb6 100644 --- a/pkgs/tools/misc/csvs-to-sqlite/default.nix +++ b/pkgs/tools/misc/csvs-to-sqlite/default.nix @@ -1,16 +1,16 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, isPy3k -, click -, dateparser -, pandas -, py-lru-cache -, six -, pytestCheckHook -}: +{ lib, python3, fetchFromGitHub }: -buildPythonPackage rec { +let + # csvs-to-sqlite is currently not compatible with Click 8. See the following + # https://github.com/simonw/csvs-to-sqlite/issues/80 + # + # Workaround the issue by providing click 7 explicitly. + python = python3.override { + packageOverrides = self: super: { + click = self.callPackage ../../../development/python-modules/click/7.nix { }; + }; + }; +in with python.pkgs; buildPythonApplication rec { pname = "csvs-to-sqlite"; version = "1.2"; disabled = !isPy3k; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index afad862de885..f10b60c4aa75 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2470,7 +2470,7 @@ with pkgs; csv2latex = callPackage ../tools/misc/csv2latex { }; - csvs-to-sqlite = python3Packages.callPackage ../tools/misc/csvs-to-sqlite { }; + csvs-to-sqlite = callPackage ../tools/misc/csvs-to-sqlite { }; cucumber = callPackage ../development/tools/cucumber {};