nixpkgs/pkgs/servers/baserow/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

143 lines
3.0 KiB
Nix
Raw Normal View History

2022-06-28 09:04:36 +00:00
{ lib
, fetchFromGitLab
2022-08-29 22:08:54 +00:00
, makeWrapper
, python3
}:
2022-06-28 09:04:36 +00:00
let
2022-08-29 22:08:54 +00:00
baserow_premium = with python3.pkgs; ( buildPythonPackage rec {
2022-06-28 09:04:36 +00:00
pname = "baserow_premium";
2022-10-21 09:14:35 +00:00
version = "1.12.1";
2022-08-29 22:08:54 +00:00
foramt = "setuptools";
2022-06-28 09:04:36 +00:00
src = fetchFromGitLab {
owner = "bramw";
repo = pname;
2022-08-29 22:08:54 +00:00
rev = "refs/tags/${version}";
2022-10-21 09:14:35 +00:00
hash = "sha256-zT2afl3QNE2dO3JXjsZXqSmm1lv3EorG3mYZLQQMQ2Q=";
2022-06-28 09:04:36 +00:00
};
sourceRoot = "source/premium/backend";
doCheck = false;
});
in
2022-08-29 22:08:54 +00:00
with python3.pkgs; buildPythonPackage rec {
2022-06-28 09:04:36 +00:00
pname = "baserow";
2022-10-21 09:14:35 +00:00
version = "1.12.1";
2022-08-29 22:08:54 +00:00
format = "setuptools";
2022-06-28 09:04:36 +00:00
src = fetchFromGitLab {
owner = "bramw";
repo = pname;
2022-08-29 22:08:54 +00:00
rev = "refs/tags/${version}";
2022-10-21 09:14:35 +00:00
hash = "sha256-zT2afl3QNE2dO3JXjsZXqSmm1lv3EorG3mYZLQQMQ2Q=";
2022-06-28 09:04:36 +00:00
};
sourceRoot = "source/backend";
postPatch = ''
# remove dependency constraints
sed 's/[~<>=].*//' -i requirements/base.in requirements/base.txt
sed 's/zope-interface/zope.interface/' -i requirements/base.in requirements/base.txt
2022-08-29 22:08:54 +00:00
sed 's/\[standard\]//' -i requirements/base.in requirements/base.txt
2022-06-28 09:04:36 +00:00
'';
2022-10-21 09:14:35 +00:00
nativeBuildInputs = [
makeWrapper
];
2022-08-29 22:08:54 +00:00
2022-06-28 09:04:36 +00:00
propagatedBuildInputs = [
2022-10-21 09:14:35 +00:00
autobahn
2022-06-28 09:04:36 +00:00
advocate
antlr4-python3-runtime
boto3
cached-property
celery-redbeat
channels
channels-redis
2022-10-21 09:14:35 +00:00
daphne
2022-06-28 09:04:36 +00: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
psutil
psycopg2
redis
regex
requests
service-identity
setuptools
tqdm
twisted
unicodecsv
uvicorn
2022-08-29 22:08:54 +00:00
watchgod
2022-06-28 09:04:36 +00:00
zipp
2022-08-29 22:08:54 +00:00
] ++ uvicorn.optional-dependencies.standard;
postInstall = ''
wrapProgram $out/bin/baserow \
--prefix PYTHONPATH : "$PYTHONPATH" \
--prefix DJANGO_SETTINGS_MODULE : "baserow.config.settings.base"
'';
2022-06-28 09:04:36 +00:00
checkInputs = [
baserow_premium
boto3
freezegun
httpretty
openapi-spec-validator
pyinstrument
pytestCheckHook
pytest-django
pytest-unordered
responses
zope_interface
];
fixupPhase = ''
cp -r src/baserow/contrib/database/{api,action,trash,formula,file_import} \
$out/lib/${python.libPrefix}/site-packages/baserow/contrib/database/
cp -r src/baserow/core/management/backup $out/lib/${python.libPrefix}/site-packages/baserow/core/management/
'';
disabledTests = [
2022-10-21 09:14:35 +00:00
# Disable linting checks
2022-06-28 09:04:36 +00: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 09:14:35 +00:00
homepage = "https://baserow.io";
2022-06-28 09:04:36 +00:00
license = licenses.mit;
maintainers = with maintainers; [ onny ];
};
}