nixpkgs/pkgs/by-name/be/bepasty/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

86 lines
2.0 KiB
Nix

{
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
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
];
};
}