nixpkgs/pkgs/servers/isso/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
1.5 KiB
Nix
Raw Normal View History

{ pkgs, nodejs, lib, python3Packages, fetchFromGitHub, nixosTests, fetchNpmDeps, npmHooks }:
with python3Packages;
2018-02-22 18:52:54 +00:00
buildPythonApplication rec {
2018-02-22 18:52:54 +00:00
pname = "isso";
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}";
sha256 = "sha256-kZNf7Rlb1DZtQe4dK1B283OkzQQcCX+pbvZzfL65gsA=";
};
npmDeps = fetchNpmDeps {
inherit src;
hash = "sha256-RBpuhFI0hdi8bB48Pks9Ac/UdcQ/DJw+WFnNj5f7IYE=";
2018-02-22 18:52:54 +00:00
};
outputs = [
"out"
"doc"
];
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 15:52:33 +00:00
propagatedBuildInputs = [
itsdangerous
2018-11-13 15:52:33 +00:00
jinja2
misaka
html5lib
2018-11-13 15:52:33 +00:00
werkzeug
bleach
flask-caching
];
2021-03-26 17:59:11 +00:00
nativeBuildInputs = [
cffi
sphinxHook
sphinx
nodejs
npmHooks.npmConfigHook
2018-11-13 15:52:33 +00:00
];
2018-02-22 18:52:54 +00:00
NODE_PATH = "$npmDeps";
preBuild = ''
ln -s ${npmDeps}/node_modules ./node_modules
export PATH="${npmDeps}/bin:$PATH"
make js
'';
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
'';
passthru.tests = { inherit (nixosTests) isso; };
meta = with lib; {
2018-02-22 18:52:54 +00:00
description = "A commenting server similar to Disqus";
homepage = "https://posativ.org/isso/";
2018-02-22 18:52:54 +00:00
license = licenses.mit;
maintainers = with maintainers; [ fgaz ];
};
}