blob: 8e9b0ce6e094e3a3a64aaeecb085b62ff7ed548c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
{ lib
, python3
, fetchPypi
}:
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;
hash = "sha256-4B+0gMqqfHlj3LMyikcA5jG+9gcNsOi2hYFtIg5oX2w=";
};
});
};
};
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
bepastyPython.pkgs.buildPythonPackage rec {
pname = "bepasty";
version = "1.2.1";
format = "pyproject";
propagatedBuildInputs = with bepastyPython.pkgs; [
flask
markupsafe
pygments
setuptools
xstatic
xstatic-asciinema-player
xstatic-bootbox
xstatic-bootstrap
xstatic-font-awesome
xstatic-jquery
xstatic-jquery-file-upload
xstatic-jquery-ui
xstatic-pygments
];
buildInputs = with bepastyPython.pkgs; [ setuptools-scm ];
src = fetchPypi {
inherit pname version;
hash = "sha256-08cyr2AruGAfHAwHHS8WMfJh7DBKymaYyz4AxI/ubkE=";
};
nativeCheckInputs = with bepastyPython.pkgs; [
build
codecov
flake8
pytestCheckHook
pytest-cov
selenium
tox
twine
];
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 = with lib; {
homepage = "https://github.com/bepasty/bepasty-server";
description = "Binary pastebin server";
license = licenses.bsd2;
maintainers = with maintainers; [ aither64 makefu ];
};
}
|