nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3,
4 fetchPypi,
5}:
6
7let
8 # bepasty 1.2 needs xstatic-font-awesome < 5, see
9 # https://github.com/bepasty/bepasty-server/issues/305
10 bepastyPython = python3.override {
11 self = bepastyPython;
12 packageOverrides = self: super: {
13 xstatic-font-awesome = super.xstatic-font-awesome.overridePythonAttrs (oldAttrs: rec {
14 version = "4.7.0.0";
15 src = oldAttrs.src.override {
16 inherit version;
17 hash = "sha256-4B+0gMqqfHlj3LMyikcA5jG+9gcNsOi2hYFtIg5oX2w=";
18 };
19 });
20 };
21 };
22in
23
24# We need to use buildPythonPackage here to get the PYTHONPATH build correctly.
25# This is needed for services.bepasty
26# https://github.com/NixOS/nixpkgs/pull/38300
27
28bepastyPython.pkgs.buildPythonPackage rec {
29 pname = "bepasty";
30 version = "1.2.1";
31 format = "pyproject";
32
33 propagatedBuildInputs = with bepastyPython.pkgs; [
34 flask
35 markupsafe
36 pygments
37 setuptools
38 xstatic
39 xstatic-asciinema-player
40 xstatic-bootbox
41 xstatic-bootstrap
42 xstatic-font-awesome
43 xstatic-jquery
44 xstatic-jquery-file-upload
45 xstatic-jquery-ui
46 xstatic-pygments
47 ];
48
49 buildInputs = with bepastyPython.pkgs; [ setuptools-scm ];
50
51 src = fetchPypi {
52 inherit pname version;
53 hash = "sha256-08cyr2AruGAfHAwHHS8WMfJh7DBKymaYyz4AxI/ubkE=";
54 };
55
56 nativeCheckInputs = with bepastyPython.pkgs; [
57 build
58 flake8
59 pytestCheckHook
60 pytest-cov-stub
61 selenium
62 tox
63 twine
64 ];
65
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"
70
71 # These require a web browser
72 "src/bepasty/tests/screenshots.py"
73 "src/bepasty/tests/test_website.py"
74 ];
75
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; [
81 aither64
82 makefu
83 ];
84 };
85}