{
  callPackage,
  fetchPypi,
  python3Packages,
  xonsh
}:
let

  # Create a version of xonsh as a python package,
  # matching the version installed on the syste,
  xonsh-python = callPackage ./xonsh-python-package.nix { inherit xonsh; };

in python3Packages.buildPythonPackage rec {
  pname = "xontrib_prompt_bar";
  version = "0.5.8";

  pyproject = true;
  build-system = [ python3Packages.setuptools ];

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-955TqiUm+s/0S2TkaSgyUDe3I5596/A2mHb+SpG0VeA=";
  };

  nativeBuildInputs = with python3Packages; [
    setuptools
    wheel
  ];

  buildInputs = with python3Packages; [
    xonsh-python
    pdm-pep517
  ];
}
