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