2023-05-25 18:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchPypi
|
2017-08-25 15:51:18 +00:00
|
|
|
}:
|
2024-03-20 03:45:13 +00:00
|
|
|
|
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;
|
2024-07-13 17:27:55 +00:00
|
|
|
hash = "sha256-4B+0gMqqfHlj3LMyikcA5jG+9gcNsOi2hYFtIg5oX2w=";
|
2023-09-28 14:17:42 +00:00
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
2024-03-20 03:45:13 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
# 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
|
|
|
|
2024-03-20 03:45:13 +00:00
|
|
|
bepastyPython.pkgs.buildPythonPackage rec {
|
2017-08-25 15:51:18 +00:00
|
|
|
pname = "bepasty";
|
2024-03-12 00:44:22 +00:00
|
|
|
version = "1.2.1";
|
2023-09-28 14:17:42 +00:00
|
|
|
format = "pyproject";
|
2017-08-25 15:51:18 +00:00
|
|
|
|
2024-03-20 03:45:13 +00:00
|
|
|
propagatedBuildInputs = with bepastyPython.pkgs; [
|
2017-08-25 15:51:18 +00:00
|
|
|
flask
|
2023-09-28 14:17:42 +00:00
|
|
|
markupsafe
|
2017-08-25 15:51:18 +00:00
|
|
|
pygments
|
2019-10-15 18:52:44 +00:00
|
|
|
setuptools
|
2017-08-25 15:51:18 +00:00
|
|
|
xstatic
|
2023-05-11 08:42:47 +00:00
|
|
|
xstatic-asciinema-player
|
2017-08-25 15:51:18 +00:00
|
|
|
xstatic-bootbox
|
|
|
|
xstatic-bootstrap
|
2023-05-11 08:42:47 +00:00
|
|
|
xstatic-font-awesome
|
2017-08-25 15:51:18 +00:00
|
|
|
xstatic-jquery
|
|
|
|
xstatic-jquery-file-upload
|
|
|
|
xstatic-jquery-ui
|
|
|
|
xstatic-pygments
|
|
|
|
];
|
2018-10-15 22:46:55 +00:00
|
|
|
|
2024-03-20 03:45:13 +00:00
|
|
|
buildInputs = with bepastyPython.pkgs; [ setuptools-scm ];
|
2018-10-15 22:46:55 +00:00
|
|
|
|
2017-08-25 15:51:18 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-13 16:25:56 +00:00
|
|
|
hash = "sha256-08cyr2AruGAfHAwHHS8WMfJh7DBKymaYyz4AxI/ubkE=";
|
2017-08-25 15:51:18 +00:00
|
|
|
};
|
|
|
|
|
2024-03-20 03:45:13 +00:00
|
|
|
nativeCheckInputs = with bepastyPython.pkgs; [
|
2023-09-28 14:19:08 +00:00
|
|
|
build
|
|
|
|
flake8
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-cov
|
2017-12-21 11:11:55 +00:00
|
|
|
selenium
|
2023-09-28 14:19:08 +00:00
|
|
|
tox
|
|
|
|
twine
|
2017-12-21 11:11:55 +00:00
|
|
|
];
|
|
|
|
|
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"
|
|
|
|
];
|
2020-03-12 10:20:11 +00:00
|
|
|
|
2024-03-20 03:45:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/bepasty/bepasty-server";
|
2017-08-25 15:51:18 +00:00
|
|
|
description = "Binary pastebin server";
|
2024-03-20 03:45:13 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ aither64 makefu ];
|
2017-08-25 15:51:18 +00:00
|
|
|
};
|
2018-06-06 20:07:04 +00:00
|
|
|
}
|