biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / bepasty / default.nix
blob8e9b0ce6e094e3a3a64aaeecb085b62ff7ed548c
1 { lib
2 , python3
3 , fetchPypi
4 }:
6 let
7   # bepasty 1.2 needs xstatic-font-awesome < 5, see
8   # https://github.com/bepasty/bepasty-server/issues/305
9   bepastyPython = python3.override {
10     self = bepastyPython;
11     packageOverrides = self: super: {
12       xstatic-font-awesome = super.xstatic-font-awesome.overridePythonAttrs(oldAttrs: rec {
13         version = "4.7.0.0";
14         src = oldAttrs.src.override {
15           inherit version;
16           hash = "sha256-4B+0gMqqfHlj3LMyikcA5jG+9gcNsOi2hYFtIg5oX2w=";
17         };
18       });
19     };
20   };
23 # We need to use buildPythonPackage here to get the PYTHONPATH build correctly.
24 # This is needed for services.bepasty
25 # https://github.com/NixOS/nixpkgs/pull/38300
27 bepastyPython.pkgs.buildPythonPackage rec {
28   pname = "bepasty";
29   version = "1.2.1";
30   format = "pyproject";
32   propagatedBuildInputs = with bepastyPython.pkgs; [
33     flask
34     markupsafe
35     pygments
36     setuptools
37     xstatic
38     xstatic-asciinema-player
39     xstatic-bootbox
40     xstatic-bootstrap
41     xstatic-font-awesome
42     xstatic-jquery
43     xstatic-jquery-file-upload
44     xstatic-jquery-ui
45     xstatic-pygments
46   ];
48   buildInputs = with bepastyPython.pkgs; [ setuptools-scm ];
50   src = fetchPypi {
51     inherit pname version;
52     hash = "sha256-08cyr2AruGAfHAwHHS8WMfJh7DBKymaYyz4AxI/ubkE=";
53   };
55   nativeCheckInputs = with bepastyPython.pkgs; [
56     build
57     codecov
58     flake8
59     pytestCheckHook
60     pytest-cov
61     selenium
62     tox
63     twine
64   ];
66   disabledTestPaths = [
67     # Can be enabled when werkzeug is updated to >2.2, see #245145
68     # and https://github.com/bepasty/bepasty-server/pull/303
69     "src/bepasty/tests/test_rest_server.py"
71     # These require a web browser
72     "src/bepasty/tests/screenshots.py"
73     "src/bepasty/tests/test_website.py"
74   ];
76   meta = with lib; {
77     homepage = "https://github.com/bepasty/bepasty-server";
78     description = "Binary pastebin server";
79     license = licenses.bsd2;
80     maintainers = with maintainers; [ aither64 makefu ];
81   };