2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, python3
|
|
|
|
, fetchPypi
|
|
|
|
}:
|
2021-08-22 07:53:02 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
defaultOverrides = [
|
|
|
|
(self: super: {
|
2022-03-05 16:20:37 +00:00
|
|
|
wtforms = super.wtforms.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "2.3.1";
|
|
|
|
pname = "WTForms";
|
2021-08-22 07:53:02 +00:00
|
|
|
|
|
|
|
src = super.fetchPypi {
|
|
|
|
inherit pname version;
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-hhoTs65SHWcA2sOydxlwvTVKY7pwQ+zDqCtSiFlqGXI=";
|
2021-08-22 07:53:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
});
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
mkOverride = attrname: version: sha256:
|
|
|
|
self: super: {
|
|
|
|
${attrname} = super.${attrname}.overridePythonAttrs (oldAttrs: {
|
|
|
|
inherit version;
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version sha256;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
py = python3.override {
|
|
|
|
# Put packageOverrides at the start so they are applied after defaultOverrides
|
2022-03-05 16:20:37 +00:00
|
|
|
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) defaultOverrides;
|
2021-08-22 07:53:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
with py.pkgs;
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
buildPythonApplication rec {
|
2020-12-03 08:41:04 +00:00
|
|
|
pname = "archivy";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.7.2";
|
|
|
|
format = "setuptools";
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-o5dVJDbdKgo6hMMU9mKzoouSgVWl7xSAp+Aq61VcfeU=";
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
|
|
|
|
|
|
|
pythonRelaxDeps = true;
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
|
|
|
attrs
|
|
|
|
beautifulsoup4
|
|
|
|
click-plugins
|
|
|
|
elasticsearch
|
2021-03-23 19:22:30 +00:00
|
|
|
flask-compress
|
2020-12-03 08:41:04 +00:00
|
|
|
flask_login
|
|
|
|
flask_wtf
|
2021-03-23 19:22:30 +00:00
|
|
|
html2text
|
2020-12-03 08:41:04 +00:00
|
|
|
python-dotenv
|
|
|
|
python-frontmatter
|
2022-03-05 16:20:37 +00:00
|
|
|
readability-lxml
|
2020-12-03 08:41:04 +00:00
|
|
|
requests
|
2021-08-22 07:53:02 +00:00
|
|
|
setuptools
|
2021-03-23 19:22:30 +00:00
|
|
|
tinydb
|
2020-12-03 08:41:04 +00:00
|
|
|
validators
|
|
|
|
wtforms
|
|
|
|
];
|
|
|
|
|
|
|
|
# __init__.py attempts to mkdir in read-only file system
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-03 08:41:04 +00:00
|
|
|
description = "Self-hosted knowledge repository";
|
|
|
|
homepage = "https://archivy.github.io";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ siraben ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|