2023-05-22 14:25:41 +02:00
|
|
|
{ pkgs, nodejs, lib, python3Packages, fetchFromGitHub, nixosTests, fetchNpmDeps, npmHooks }:
|
2020-09-11 00:40:37 +02:00
|
|
|
|
2023-05-22 14:25:41 +02:00
|
|
|
with python3Packages;
|
2018-02-22 19:52:54 +01:00
|
|
|
|
2023-05-22 14:25:41 +02:00
|
|
|
buildPythonApplication rec {
|
2018-02-22 19:52:54 +01:00
|
|
|
pname = "isso";
|
2023-05-22 14:25:41 +02:00
|
|
|
version = "0.13.0";
|
2018-02-22 19:52:54 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "posativ";
|
|
|
|
repo = pname;
|
2022-04-24 07:41:07 +02:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-22 14:25:41 +02:00
|
|
|
sha256 = "sha256-kZNf7Rlb1DZtQe4dK1B283OkzQQcCX+pbvZzfL65gsA=";
|
|
|
|
};
|
|
|
|
|
|
|
|
npmDeps = fetchNpmDeps {
|
|
|
|
inherit src;
|
|
|
|
hash = "sha256-RBpuhFI0hdi8bB48Pks9Ac/UdcQ/DJw+WFnNj5f7IYE=";
|
2018-02-22 19:52:54 +01:00
|
|
|
};
|
|
|
|
|
2023-05-22 14:25:41 +02:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"doc"
|
|
|
|
];
|
|
|
|
|
2023-10-30 12:31:08 +01: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')"
|
|
|
|
'';
|
|
|
|
|
2018-11-13 16:52:33 +01:00
|
|
|
propagatedBuildInputs = [
|
2020-09-11 00:40:37 +02:00
|
|
|
itsdangerous
|
2018-11-13 16:52:33 +01:00
|
|
|
jinja2
|
|
|
|
misaka
|
2020-09-11 00:40:37 +02:00
|
|
|
html5lib
|
2018-11-13 16:52:33 +01:00
|
|
|
werkzeug
|
2020-09-11 00:40:37 +02:00
|
|
|
bleach
|
|
|
|
flask-caching
|
|
|
|
];
|
|
|
|
|
2021-03-26 18:59:11 +01:00
|
|
|
nativeBuildInputs = [
|
2020-09-11 00:40:37 +02:00
|
|
|
cffi
|
2023-05-22 14:25:41 +02:00
|
|
|
sphinxHook
|
|
|
|
sphinx
|
2021-08-06 08:45:45 +02:00
|
|
|
nodejs
|
2023-05-22 14:25:41 +02:00
|
|
|
npmHooks.npmConfigHook
|
2018-11-13 16:52:33 +01:00
|
|
|
];
|
2018-02-22 19:52:54 +01:00
|
|
|
|
2023-05-22 14:25:41 +02:00
|
|
|
NODE_PATH = "$npmDeps";
|
|
|
|
|
2021-08-06 08:45:45 +02:00
|
|
|
preBuild = ''
|
2023-05-22 14:25:41 +02:00
|
|
|
ln -s ${npmDeps}/node_modules ./node_modules
|
|
|
|
export PATH="${npmDeps}/bin:$PATH"
|
2021-08-06 08:45:45 +02:00
|
|
|
|
|
|
|
make js
|
|
|
|
'';
|
|
|
|
|
2023-01-21 13:00:00 +01:00
|
|
|
nativeCheckInputs = [
|
2022-03-22 15:47:35 +01:00
|
|
|
pytest
|
|
|
|
pytest-cov
|
|
|
|
];
|
2018-02-22 19:52:54 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2022-03-22 15:47:35 +01:00
|
|
|
pytest
|
2018-02-22 19:52:54 +01:00
|
|
|
'';
|
|
|
|
|
2022-01-23 21:08:10 +01:00
|
|
|
passthru.tests = { inherit (nixosTests) isso; };
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-02-22 19:52:54 +01:00
|
|
|
description = "A commenting server similar to Disqus";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "isso";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://posativ.org/isso/";
|
2018-02-22 19:52:54 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
};
|
|
|
|
}
|