2022-06-28 11:04:36 +02:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitLab
|
2022-08-30 00:08:54 +02:00
|
|
|
, makeWrapper
|
|
|
|
, python3
|
2022-12-26 19:25:11 +01:00
|
|
|
, antlr4_9
|
2022-08-30 00:08:54 +02:00
|
|
|
}:
|
2022-06-28 11:04:36 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2022-12-26 19:25:11 +01:00
|
|
|
python = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
antlr4-python3-runtime = super.antlr4-python3-runtime.override {
|
|
|
|
antlr4 = antlr4_9;
|
|
|
|
};
|
2022-06-28 11:04:36 +02:00
|
|
|
|
2022-12-26 19:25:11 +01:00
|
|
|
baserow_premium = self.buildPythonPackage rec {
|
|
|
|
pname = "baserow_premium";
|
|
|
|
version = "1.12.1";
|
|
|
|
foramt = "setuptools";
|
2022-06-28 11:04:36 +02:00
|
|
|
|
2022-12-26 19:25:11 +01:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "bramw";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-zT2afl3QNE2dO3JXjsZXqSmm1lv3EorG3mYZLQQMQ2Q=";
|
|
|
|
};
|
2022-06-28 11:04:36 +02:00
|
|
|
|
2023-07-25 15:27:31 +02:00
|
|
|
sourceRoot = "${src.name}/premium/backend";
|
2022-06-28 11:04:36 +02:00
|
|
|
|
2022-12-26 19:25:11 +01:00
|
|
|
doCheck = false;
|
|
|
|
};
|
2023-08-02 04:57:48 +02:00
|
|
|
|
|
|
|
django = super.django_3;
|
2022-12-26 19:25:11 +01:00
|
|
|
};
|
|
|
|
};
|
2022-06-28 11:04:36 +02:00
|
|
|
in
|
|
|
|
|
2022-12-26 19:25:11 +01:00
|
|
|
with python.pkgs; buildPythonApplication rec {
|
2022-06-28 11:04:36 +02:00
|
|
|
pname = "baserow";
|
2022-10-21 11:14:35 +02:00
|
|
|
version = "1.12.1";
|
2022-08-30 00:08:54 +02:00
|
|
|
format = "setuptools";
|
2022-06-28 11:04:36 +02:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "bramw";
|
|
|
|
repo = pname;
|
2022-08-30 00:08:54 +02:00
|
|
|
rev = "refs/tags/${version}";
|
2022-10-21 11:14:35 +02:00
|
|
|
hash = "sha256-zT2afl3QNE2dO3JXjsZXqSmm1lv3EorG3mYZLQQMQ2Q=";
|
2022-06-28 11:04:36 +02:00
|
|
|
};
|
|
|
|
|
2023-07-25 15:27:31 +02:00
|
|
|
sourceRoot = "${src.name}/backend";
|
2022-06-28 11:04:36 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
2023-07-20 00:36:20 +02:00
|
|
|
# use input files to not depend on outdated peer dependencies
|
|
|
|
mv requirements/base.{in,txt}
|
|
|
|
mv requirements/dev.{in,txt}
|
|
|
|
|
2022-06-28 11:04:36 +02:00
|
|
|
# remove dependency constraints
|
2023-07-20 00:36:20 +02:00
|
|
|
sed -i requirements/base.txt \
|
|
|
|
-e 's/[~<>=].*//' -i requirements/base.txt \
|
|
|
|
-e 's/zope-interface/zope.interface/' \
|
|
|
|
-e 's/\[standard\]//'
|
2022-06-28 11:04:36 +02:00
|
|
|
'';
|
|
|
|
|
2022-10-21 11:14:35 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
2022-08-30 00:08:54 +02:00
|
|
|
|
2022-06-28 11:04:36 +02:00
|
|
|
propagatedBuildInputs = [
|
2022-10-21 11:14:35 +02:00
|
|
|
autobahn
|
2022-06-28 11:04:36 +02:00
|
|
|
advocate
|
|
|
|
antlr4-python3-runtime
|
|
|
|
boto3
|
|
|
|
cached-property
|
|
|
|
celery-redbeat
|
|
|
|
channels
|
|
|
|
channels-redis
|
2022-10-21 11:14:35 +02:00
|
|
|
daphne
|
2022-06-28 11:04:36 +02:00
|
|
|
dj-database-url
|
|
|
|
django-celery-beat
|
|
|
|
django-celery-email
|
|
|
|
django-cors-headers
|
|
|
|
django-health-check
|
|
|
|
django-redis
|
|
|
|
django-storages
|
|
|
|
drf-jwt
|
|
|
|
drf-spectacular
|
|
|
|
faker
|
|
|
|
gunicorn
|
|
|
|
importlib-resources
|
|
|
|
itsdangerous
|
|
|
|
pillow
|
2023-03-12 19:27:18 +01:00
|
|
|
pyparsing
|
2022-06-28 11:04:36 +02:00
|
|
|
psutil
|
|
|
|
psycopg2
|
|
|
|
redis
|
|
|
|
regex
|
|
|
|
requests
|
|
|
|
service-identity
|
|
|
|
setuptools
|
|
|
|
tqdm
|
|
|
|
twisted
|
|
|
|
unicodecsv
|
|
|
|
uvicorn
|
2022-08-30 00:08:54 +02:00
|
|
|
watchgod
|
2022-06-28 11:04:36 +02:00
|
|
|
zipp
|
2022-08-30 00:08:54 +02:00
|
|
|
] ++ uvicorn.optional-dependencies.standard;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/baserow \
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH" \
|
|
|
|
--prefix DJANGO_SETTINGS_MODULE : "baserow.config.settings.base"
|
|
|
|
'';
|
2022-06-28 11:04:36 +02:00
|
|
|
|
2023-01-21 13:00:00 +01:00
|
|
|
nativeCheckInputs = [
|
2022-06-28 11:04:36 +02:00
|
|
|
baserow_premium
|
|
|
|
boto3
|
|
|
|
freezegun
|
|
|
|
httpretty
|
|
|
|
openapi-spec-validator
|
|
|
|
pyinstrument
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-django
|
|
|
|
pytest-unordered
|
|
|
|
responses
|
2024-01-06 19:05:46 +01:00
|
|
|
zope-interface
|
2022-06-28 11:04:36 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
cp -r src/baserow/contrib/database/{api,action,trash,formula,file_import} \
|
2023-03-24 01:30:46 +01:00
|
|
|
$out/${python.sitePackages}/baserow/contrib/database/
|
|
|
|
cp -r src/baserow/core/management/backup $out/${python.sitePackages}/baserow/core/management/
|
2022-06-28 11:04:36 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
2022-10-21 11:14:35 +02:00
|
|
|
# Disable linting checks
|
2022-06-28 11:04:36 +02:00
|
|
|
"flake8_plugins"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Disable premium tests
|
|
|
|
"../premium/backend/src/baserow_premium"
|
|
|
|
"../premium/backend/tests/baserow_premium"
|
|
|
|
# Disable database related tests
|
|
|
|
"tests/baserow/contrib/database"
|
|
|
|
"tests/baserow/api"
|
|
|
|
"tests/baserow/core"
|
|
|
|
"tests/baserow/ws"
|
|
|
|
];
|
|
|
|
|
|
|
|
DJANGO_SETTINGS_MODULE = "baserow.config.settings.test";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "No-code database and Airtable alternative";
|
2022-10-21 11:14:35 +02:00
|
|
|
homepage = "https://baserow.io";
|
2022-06-28 11:04:36 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
2023-11-23 22:09:35 +01:00
|
|
|
mainProgram = "baserow";
|
2022-06-28 11:04:36 +02:00
|
|
|
};
|
|
|
|
}
|