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";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "3.4.0b8";
|
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}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-FtmRW4AS11zAX2jvGY8XTsPrN3mhHkIWoFY7sXmqG/U=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
npmDeps = fetchNpmDeps {
|
|
|
|
src = "${src}/frontend";
|
|
|
|
hash = "sha256-Z7LP9rrVSzKoLITUarsnRbrhIw7W7TZSZUgV/OT+m0M=";
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
exifread
|
|
|
|
filetype
|
|
|
|
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
|
2024-02-29 20:09:43 +00:00
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"werkzeug"
|
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"
|
|
|
|
# expects FHS paths
|
|
|
|
"test_VirtualEnv_executable"
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A 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";
|
2022-04-15 01:41:22 +00:00
|
|
|
license = licenses.bsd0;
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "lektor";
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|