nixpkgs/pkgs/tools/misc/bepasty/default.nix

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

80 lines
1.9 KiB
Nix
Raw Normal View History

2023-05-25 18:37:59 +00:00
{ lib
, python3
, fetchPypi
}:
2023-09-28 14:17:42 +00:00
let
# bepasty 1.2 needs xstatic-font-awesome < 5, see
# https://github.com/bepasty/bepasty-server/issues/305
bepastyPython = python3.override {
self = bepastyPython;
packageOverrides = self: super: {
xstatic-font-awesome = super.xstatic-font-awesome.overridePythonAttrs(oldAttrs: rec {
version = "4.7.0.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "sha256-4B+0gMqqfHlj3LMyikcA5jG+9gcNsOi2hYFtIg5oX2w=";
};
});
};
};
#We need to use buildPythonPackage here to get the PYTHONPATH build correctly.
#This is needed for services.bepasty
#https://github.com/NixOS/nixpkgs/pull/38300
2023-09-28 14:17:42 +00:00
in with bepastyPython.pkgs; buildPythonPackage rec {
pname = "bepasty";
2023-09-28 14:17:42 +00:00
version = "1.2.0";
format = "pyproject";
propagatedBuildInputs = [
flask
2023-09-28 14:17:42 +00:00
markupsafe
pygments
2019-10-15 18:52:44 +00:00
setuptools
xstatic
xstatic-asciinema-player
xstatic-bootbox
xstatic-bootstrap
xstatic-font-awesome
xstatic-jquery
xstatic-jquery-file-upload
xstatic-jquery-ui
xstatic-pygments
];
2018-10-15 22:46:55 +00:00
buildInputs = [ setuptools-scm ];
2018-10-15 22:46:55 +00:00
src = fetchPypi {
inherit pname version;
2023-09-28 14:17:42 +00:00
sha256 = "sha256-R3bvrl/tOP0S9m6X+MwYK6fMQ51cI6W5AoxyYZ8aZ/w=";
};
nativeCheckInputs = [
2023-09-28 14:19:08 +00:00
build
codecov
flake8
pytestCheckHook
pytest-cov
selenium
2023-09-28 14:19:08 +00:00
tox
twine
];
2023-09-28 14:19:08 +00:00
disabledTestPaths = [
# Can be enabled when werkzeug is updated to >2.2, see #245145
# and https://github.com/bepasty/bepasty-server/pull/303
"src/bepasty/tests/test_rest_server.py"
# These require a web browser
"src/bepasty/tests/screenshots.py"
"src/bepasty/tests/test_website.py"
];
meta = {
homepage = "https://github.com/bepasty/bepasty-server";
description = "Binary pastebin server";
2023-05-12 18:22:29 +00:00
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ aither64 makefu ];
};
}