2023-05-24 13:37:59 +00:00
|
|
|
{ pkgs, nodejs, lib, python3Packages, fetchFromGitHub, nixosTests, fetchNpmDeps, npmHooks }:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
with python3Packages;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "isso";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.13.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "posativ";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-kZNf7Rlb1DZtQe4dK1B283OkzQQcCX+pbvZzfL65gsA=";
|
|
|
|
};
|
|
|
|
|
|
|
|
npmDeps = fetchNpmDeps {
|
|
|
|
inherit src;
|
|
|
|
hash = "sha256-RBpuhFI0hdi8bB48Pks9Ac/UdcQ/DJw+WFnNj5f7IYE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"doc"
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Remove when https://github.com/posativ/isso/pull/973 is available.
|
|
|
|
substituteInPlace isso/tests/test_comments.py \
|
|
|
|
--replace "self.client.delete_cookie('localhost.local', '1')" "self.client.delete_cookie(key='1', domain='localhost')"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2020-09-25 04:45:31 +00:00
|
|
|
itsdangerous
|
2020-04-24 23:36:52 +00:00
|
|
|
jinja2
|
|
|
|
misaka
|
2020-09-25 04:45:31 +00:00
|
|
|
html5lib
|
2020-04-24 23:36:52 +00:00
|
|
|
werkzeug
|
2020-09-25 04:45:31 +00:00
|
|
|
bleach
|
|
|
|
flask-caching
|
|
|
|
];
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
2020-09-25 04:45:31 +00:00
|
|
|
cffi
|
2023-05-24 13:37:59 +00:00
|
|
|
sphinxHook
|
|
|
|
sphinx
|
2021-08-10 14:31:46 +00:00
|
|
|
nodejs
|
2023-05-24 13:37:59 +00:00
|
|
|
npmHooks.npmConfigHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
NODE_PATH = "$npmDeps";
|
|
|
|
|
2021-08-10 14:31:46 +00:00
|
|
|
preBuild = ''
|
2023-05-24 13:37:59 +00:00
|
|
|
ln -s ${npmDeps}/node_modules ./node_modules
|
|
|
|
export PATH="${npmDeps}/bin:$PATH"
|
2021-08-10 14:31:46 +00:00
|
|
|
|
|
|
|
make js
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
pytest
|
|
|
|
pytest-cov
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
pytest
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-25 03:21:06 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) isso; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A commenting server similar to Disqus";
|
|
|
|
homepage = "https://posativ.org/isso/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
};
|
|
|
|
}
|