2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2022-04-15 01:41:22 +00:00
|
|
|
, fetchFromGitHub
|
2023-08-04 22:07:22 +00:00
|
|
|
, fetchNpmDeps
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchPypi
|
2023-08-04 22:07:22 +00:00
|
|
|
, nodejs
|
|
|
|
, npmHooks
|
2023-08-10 07:59:29 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
let
|
2023-10-09 19:29:22 +00:00
|
|
|
python = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
mistune = super.mistune.overridePythonAttrs (old: rec {
|
|
|
|
version = "2.0.5";
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit (old) pname;
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-AkYRPLJJLbh1xr5Wl0p8iTMzvybNkokchfYxUc7gnTQ=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
in
|
|
|
|
python.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "lektor";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "3.4.0b12";
|
2022-04-15 01:41:22 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lektor";
|
2022-04-15 01:41:22 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
# fix for case-insensitive filesystems
|
|
|
|
postFetch = ''
|
|
|
|
rm -f $out/tests/demo-project/content/icc-profile-test/{LICENSE,license}.txt
|
|
|
|
'';
|
|
|
|
hash = "sha256-y0/fYuiIB/O5tsYKjzOPnCafOIZCn4Z5OITPMcnHd/M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
npmDeps = fetchNpmDeps {
|
2024-06-05 15:53:02 +00:00
|
|
|
src = "${src}/${npmRoot}";
|
|
|
|
hash = "sha256-LXe5/u4nAGig8RSu6r8Qsr3p3Od8eoMxukW8Z4HkJ44=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
npmRoot = "frontend";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-08-10 07:59:29 +00:00
|
|
|
python.pkgs.hatch-vcs
|
|
|
|
python.pkgs.hatchling
|
2023-08-04 22:07:22 +00:00
|
|
|
nodejs
|
|
|
|
npmHooks.npmConfigHook
|
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
2022-05-18 14:49:53 +00:00
|
|
|
babel
|
2022-04-15 01:41:22 +00:00
|
|
|
click
|
|
|
|
flask
|
|
|
|
inifile
|
|
|
|
jinja2
|
2023-02-22 10:55:15 +00:00
|
|
|
markupsafe
|
2022-04-15 01:41:22 +00:00
|
|
|
marshmallow
|
|
|
|
marshmallow-dataclass
|
|
|
|
mistune
|
2023-08-04 22:07:22 +00:00
|
|
|
pillow
|
2022-04-15 01:41:22 +00:00
|
|
|
pip
|
|
|
|
python-slugify
|
|
|
|
requests
|
2023-08-04 22:07:22 +00:00
|
|
|
watchfiles
|
2022-04-15 01:41:22 +00:00
|
|
|
werkzeug
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeCheckInputs = with python.pkgs; [
|
2022-04-15 01:41:22 +00:00
|
|
|
pytest-click
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
postInstall = ''
|
|
|
|
cp -r lektor/translations "$out/${python.sitePackages}/lektor/"
|
2022-10-21 18:38:19 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"lektor"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2023-08-04 22:07:22 +00:00
|
|
|
# Tests require network access
|
2022-04-15 01:41:22 +00:00
|
|
|
"test_path_installed_plugin_is_none"
|
2023-08-04 22:07:22 +00:00
|
|
|
"test_VirtualEnv_run_pip_install"
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
postCheck = ''
|
|
|
|
make test-js
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Static content management system";
|
2022-04-15 01:41:22 +00:00
|
|
|
homepage = "https://www.getlektor.com/";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/lektor/lektor/blob/v${version}/CHANGES.md";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "lektor";
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|