Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

139 строки
2.9 KiB

  1. { buildPythonPackage, lib, fetchFromGitHub, isPy27, nixosTests, fetchpatch, fetchPypi
  2. , alembic
  3. , aniso8601
  4. , Babel
  5. , blinker
  6. , click
  7. , dnspython
  8. , email_validator
  9. , flask
  10. , flask-babel
  11. , flask-cors
  12. , flask_mail
  13. , flask_migrate
  14. , flask-restful
  15. , flask_script
  16. , flask_sqlalchemy
  17. , flask_wtf
  18. , debts
  19. , idna
  20. , itsdangerous
  21. , jinja2
  22. , Mako
  23. , markupsafe
  24. , python-dateutil
  25. , pytz
  26. , six
  27. , sqlalchemy
  28. , sqlalchemy-continuum
  29. , werkzeug
  30. , wtforms
  31. , psycopg2 # optional, for postgresql support
  32. , flask_testing
  33. , pytestCheckHook
  34. }:
  35. # ihatemoney is not really a library. It will only ever be imported
  36. # by the interpreter of uwsgi. So overrides for its depencies are fine.
  37. let
  38. # https://github.com/spiral-project/ihatemoney/issues/567
  39. pinned_wtforms = wtforms.overridePythonAttrs (old: rec {
  40. pname = "WTForms";
  41. version = "2.2.1";
  42. src = fetchPypi {
  43. inherit pname version;
  44. sha256 = "0q9vkcq6jnnn618h27lx9sas6s9qlg2mv8ja6dn0hy38gwzarnqc";
  45. };
  46. });
  47. pinned_flask_wtf = flask_wtf.override { wtforms = pinned_wtforms; };
  48. in
  49. buildPythonPackage rec {
  50. pname = "ihatemoney";
  51. version = "4.2";
  52. src = fetchFromGitHub {
  53. owner = "spiral-project";
  54. repo = pname;
  55. rev = version;
  56. sha256 = "0d4vc6m0jkwlz9ly0hcjghccydvqbldh2jb8yzf94jrgkd5fd7k1";
  57. };
  58. disabled = isPy27;
  59. patches = [
  60. # fix migration on postgresql
  61. # remove on next release
  62. (fetchpatch {
  63. url = "https://github.com/spiral-project/ihatemoney/commit/6129191b26784b895e203fa3eafb89cee7d88b71.patch";
  64. sha256 = "0yc24gsih9x3pnh2mhj4v5i71x02dq93a9jd2r8b1limhcl4p1sw";
  65. })
  66. (fetchpatch {
  67. name = "CVE-2020-15120.patch";
  68. url = "https://github.com/spiral-project/ihatemoney/commit/8d77cf5d5646e1d2d8ded13f0660638f57e98471.patch";
  69. sha256 = "0y855sk3qsbpq7slj876k2ifa1lccc2dccag98pkyaadpz5gbabv";
  70. })
  71. ];
  72. postPatch = ''
  73. # remove draconian pinning
  74. sed -i 's/==.*$//' setup.cfg
  75. '';
  76. propagatedBuildInputs = [
  77. alembic
  78. aniso8601
  79. Babel
  80. blinker
  81. click
  82. dnspython
  83. email_validator
  84. flask
  85. flask-babel
  86. flask-cors
  87. flask_mail
  88. flask_migrate
  89. flask-restful
  90. flask_script
  91. flask_sqlalchemy
  92. pinned_flask_wtf
  93. idna
  94. itsdangerous
  95. jinja2
  96. Mako
  97. markupsafe
  98. python-dateutil
  99. pytz
  100. six
  101. sqlalchemy
  102. sqlalchemy-continuum
  103. werkzeug
  104. pinned_wtforms
  105. psycopg2
  106. debts
  107. ];
  108. checkInputs = [
  109. flask_testing pytestCheckHook
  110. ];
  111. pytestFlagsArray = [ "--pyargs ihatemoney.tests.tests" ];
  112. disabledTests = [
  113. "test_notifications" # requires running service.
  114. "test_invite" # requires running service.
  115. ];
  116. passthru.tests = {
  117. inherit (nixosTests.ihatemoney) ihatemoney-postgresql ihatemoney-sqlite;
  118. };
  119. meta = with lib; {
  120. homepage = "https://ihatemoney.org";
  121. description = "A simple shared budget manager web application";
  122. license = licenses.beerware;
  123. maintainers = [ maintainers.symphorien ];
  124. };
  125. }