git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #119570 from fabaff/bump-tinydb
commitcd8c90fe20e0896ed2178e6b04a2b0d4ca2885e5 authorSandro <sandro.jaeckel@gmail.com> dateFri 16 Apr 2021, 01:38 (6 years ago) parent22fb4451a4bb86
2 files changed+47−14
pkgs/applications/misc/archivy/default.nix+23−6 pkgs/development/python-modules/tinydb/default.nix+24−8
pkgs/applications/misc/archivy/default.nix+23−6
@@ -1,15 +1,31 @@
1−{ lib, buildPythonApplication, fetchPypi, appdirs, attrs
2−, beautifulsoup4, click-plugins, elasticsearch, flask-compress
3−, flask_login, flask_wtf, html2text, python-dotenv, python-frontmatter
4−, requests, tinydb, validators, werkzeug, wtforms }:
1+{ lib
2+, buildPythonApplication
3+, fetchPypi
4+, appdirs
5+, attrs
6+, beautifulsoup4
7+, click-plugins
8+, elasticsearch
9+, flask-compress
10+, flask_login
11+, flask_wtf
12+, html2text
13+, python-dotenv
14+, python-frontmatter
15+, requests
16+, tinydb
17+, validators
18+, werkzeug
19+, wtforms
20+}:
521
622buildPythonApplication rec {
723 pname = "archivy";
8− version = "1.1.1";
24+ version = "1.1.4";
925
1026 src = fetchPypi {
1127 inherit pname version;
12− sha256 = "sha256-yUXsTPb5oJYZA9MlHz7eLowRjD/ltq5VLTHeOMqcL/M=";
28+ sha256 = "sha256-oSmwQcKvp9RABmc7aq6fdLOZapMauIi6+7azVTXVb30=";
1329 };
1430
1531 # Relax some dependencies
@@ -22,6 +38,7 @@ buildPythonApplication rec {
2238 --replace 'python_frontmatter == 0.5.0' 'python_frontmatter' \
2339 --replace 'requests ==' 'requests >=' \
2440 --replace 'validators ==' 'validators >=' \
41+ --replace 'tinydb ==' 'tinydb >='
2542 '';
2643
2744 propagatedBuildInputs = [
pkgs/development/python-modules/tinydb/default.nix+24−8
@@ -2,17 +2,16 @@
22, buildPythonPackage
33, pythonOlder
44, fetchFromGitHub
5−, poetry
5+, poetry-core
6+, fetchpatch
67, pytestCheckHook
7−, pytestcov
8−, pytestrunner
98, pycodestyle
109, pyyaml
1110}:
1211
1312buildPythonPackage rec {
1413 pname = "tinydb";
15− version = "4.1.1";
14+ version = "4.4.0";
1615 disabled = pythonOlder "3.5";
1716 format = "pyproject";
1817
@@ -20,20 +19,37 @@ buildPythonPackage rec {
2019 owner = "msiemens";
2120 repo = pname;
2221 rev = "v${version}";
23− sha256 = "09cwdmpj91c6q7jympip1lrcd3idbm9cqblgvmrh0v1vy1iv2ki7";
22+ sha256 = "sha256-3FbsnLU7G4VVhI5NYRqCEQgo51zDeAkEhH69H52zr/w=";
2423 };
2524
26− nativeBuildInputs = [ poetry ];
25+ nativeBuildInputs = [
26+ poetry-core
27+ ];
28+
29+ patches = [
30+ # Switch to poetry-core, https://github.com/msiemens/tinydb/pull/391
31+ (fetchpatch {
32+ name = "switch-to-peotry-core.patch";
33+ url = "https://github.com/msiemens/tinydb/commit/5b547c18e7ce9f5925d5943dfa47d408435a0da5.patch";
34+ sha256 = "19ma9ib020b82sn1mcr7sfysqbj8h6nbb365bih1x1wn3ym8xlbc";
35+ })
36+ ];
37+
38+ postPatch = ''
39+ substituteInPlace pytest.ini \
40+ --replace "--cov-append --cov-report term --cov tinydb" ""
41+ '';
2742
2843 checkInputs = [
2944 pytestCheckHook
30− pytestcov
3145 pycodestyle
3246 pyyaml
3347 ];
3448
49+ pythonImportsCheck = [ "tinydb" ];
50+
3551 meta = with lib; {
36− description = "A lightweight document oriented database written in pure Python with no external dependencies";
52+ description = "Lightweight document oriented database written in Python";
3753 homepage = "https://tinydb.readthedocs.org/";
3854 changelog = "https://tinydb.readthedocs.io/en/latest/changelog.html";
3955 license = licenses.mit;