erpnext-nix/python/frappe.nix
teutat3s cb9630c787
wip: use nixos-unstable
update frappe
update erpnext
refactor versions
2023-06-05 19:19:43 +02:00

225 lines
3.2 KiB
Nix

{ lib
, buildPythonPackage
, pythonRelaxDepsHook
, fetchFromGitHub
# core dependencies
, babel
, click
, filelock
, gitpython
, jinja2
, pillow
, pyjwt
, pymysql
, pypdf2
, pypika
, pyqrcode
, pyyaml
, restrictedpython
, weasyprint
, werkzeug
, whoosh
, beautifulsoup4
, bleach-allowlist
, bleach
, cairocffi
, chardet
, croniter
, cryptography
, email-reply-parser
, git-url-parse
, gitdb
, gunicorn
, html5lib
, ipython
, ldap3
, markdown2
, markupsafe
, maxminddb-geolite2
, num2words
, oauthlib
, openpyxl
, passlib
, pdfkit
, phonenumbers
, premailer
, psutil
, psycopg2-binary
, pyasn1
, pycountry
, pycryptodome
, pyopenssl
, pyotp
, pypng
, python-dateutil
, pytz
, rauth
, redis
, hiredis
, requests-oauthlib
, requests
, rq
, rsa
, semantic-version
, sqlparse
, tenacity
, terminaltables
, traceback-with-variables
, urllib3
, xlrd
, zxcvbn
, markdownify
, bench
# integration dependencies
, boto3
, dropbox
, google-api-python-client
, google-auth-httplib2
, google-auth-oauthlib
, google-auth
, posthog
}:
let
pinData = import ../srcs/pin.nix;
inherit (pinData) frappeVersion;
inherit (pinData.hashes) frappeSrcHash;
in
buildPythonPackage rec {
pname = "frappe";
version = frappeVersion;
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${frappeVersion}";
hash = frappeSrcHash;
};
format = "flit";
nativeBuildInputs = [ pythonRelaxDepsHook ];
pythonRelaxDeps = [
"Babel"
"beautifulsoup4"
"boto3"
"cairocffi"
"Click"
"cryptography"
"filelock"
"google-api-python-client"
"google-auth"
"hiredis"
"ipython"
"openpyxl"
"phonenumbers"
"Pillow"
"premailer"
"pyasn1"
"pycountry"
"pycryptodome"
"PyJWT"
"PyMySQL"
"pyOpenSSL"
"pyotp"
"pypng"
"pytz"
"redis"
"rq"
"tenacity"
"WeasyPrint"
];
propagatedBuildInputs = [
babel
click
filelock
gitpython
jinja2
pillow
pyjwt
pymysql
pypdf2
pypika
pyqrcode
pyyaml
restrictedpython
weasyprint
werkzeug
whoosh
beautifulsoup4
bleach-allowlist
bleach
cairocffi
chardet
croniter
cryptography
email-reply-parser
git-url-parse
gitdb
gunicorn
html5lib
ipython
ldap3
markdown2
markupsafe
maxminddb-geolite2
num2words
oauthlib
openpyxl
passlib
pdfkit
phonenumbers
premailer
psutil
psycopg2-binary
pyasn1
pycountry
pycryptodome
pyopenssl
pyotp
pypng
python-dateutil
pytz
rauth
redis
hiredis
requests-oauthlib
requests
rq
rsa
semantic-version
sqlparse
tenacity
terminaltables
traceback-with-variables
urllib3
xlrd
zxcvbn
markdownify
# integration dependencies
boto3
dropbox
google-api-python-client
google-auth-httplib2
google-auth-oauthlib
google-auth
posthog
];
#nativeCheckInputs = [
# bench
# redis
#];
#checkPhase = ''
# tmp=$(mktemp -d)
# cd $tmp
# bench -v init frappe-bench --skip-assets
# cd frappe-bench
# mkdir -p sites/test_site
# bench --site test_site run-tests --app frappe
#'';
}