@@ -923,6 +923,28 @@ If you need to change a package's attribute(s) from `configuration.nix` you coul
923923
924924If you are using the `bepasty-server` package somewhere, for example in `systemPackages` or indirectly from `services.bepasty`, then a `nixos-rebuild switch` will rebuild the system but with the `bepasty-server` package using a different `src` attribute. This way one can modify `python` based software/libraries easily. Using `self` and `super` one can also alter dependencies (`buildInputs`) between the old state (`self`) and new state (`super`).
925925
926+### How to override a Python package using overlays?
927+
928+To alter a python package using overlays, you would use the following approach:
929+
930+```nix
931+self: super:
932+rec {
933+ python = super.python.override {
934+ packageOverrides = python-self: python-super: {
935+ bepasty-server = python-super.bepasty-server.overrideAttrs ( oldAttrs: {
936+ src = self.pkgs.fetchgit {
937+ url = "https://github.com/bepasty/bepasty-server";
938+ sha256 = "9ziqshmsf0rjvdhhca55sm0x8jz76fsf2q4rwh4m6lpcf8wr0nps";
939+ rev = "e2516e8cf4f2afb5185337073607eb9e84a61d2d";
940+ };
941+ });
942+ };
943+ };
944+ pythonPackages = python.pkgs;
945+}
946+```
947+
926948## Contributing
927949
928950### Contributing guidelines