diff --git a/pkgs/development/python-modules/sqlite-fts4/default.nix b/pkgs/development/python-modules/sqlite-fts4/default.nix new file mode 100644 index 00000000000..4342eb6e206 --- /dev/null +++ b/pkgs/development/python-modules/sqlite-fts4/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy3k +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "sqlite-fts4"; + version = "1.0.1"; + disabled = !isPy3k; + + src = fetchFromGitHub { + owner = "simonw"; + repo = pname; + rev = version; + sha256 = "15r1mijk306fpm61viry5wjhqyxlbqqdk4nfcd901qarx7vqypgy"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + meta = with lib; { + description = "Custom Python functions for working with SQLite FTS4"; + homepage = "https://github.com/simonw/sqlite-fts4"; + license = licenses.asl20; + maintainers = with maintainers; [ meatcar ]; + }; + +} diff --git a/pkgs/development/python-modules/sqlite-utils/default.nix b/pkgs/development/python-modules/sqlite-utils/default.nix index 6e17fc4f38e..ef595ae93fa 100644 --- a/pkgs/development/python-modules/sqlite-utils/default.nix +++ b/pkgs/development/python-modules/sqlite-utils/default.nix @@ -1,19 +1,22 @@ { lib , buildPythonPackage , fetchPypi -, isPy3k +, pythonOlder , click , click-default-group +, sqlite-fts4 , tabulate , pytestCheckHook , pytestrunner , black +, hypothesis +, sqlite }: buildPythonPackage rec { pname = "sqlite-utils"; version = "3.0"; - disabled = !isPy3k; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; @@ -23,6 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ click click-default-group + sqlite-fts4 tabulate ]; @@ -30,13 +34,19 @@ buildPythonPackage rec { pytestCheckHook pytestrunner black + hypothesis + ]; + + # disabled until upstream updates tests + disabledTests = lib.optionals (lib.versionAtLeast sqlite.version "3.34.0") [ + "test_optimize" ]; meta = with lib; { description = "Python CLI utility and library for manipulating SQLite databases"; homepage = "https://github.com/simonw/sqlite-utils"; license = licenses.asl20; - maintainers = [ maintainers.meatcar ]; + maintainers = with maintainers; [ meatcar ]; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6348d21716d..be2cca02f76 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7034,6 +7034,7 @@ in { sqlitedict = callPackage ../development/python-modules/sqlitedict { }; + sqlite-fts4 = callPackage ../development/python-modules/sqlite-fts4 { }; sqlite-utils = callPackage ../development/python-modules/sqlite-utils { }; sqlmap = callPackage ../development/python-modules/sqlmap { };