#
# Sh xontrib for Xonsh.
#
# vim: et:ts=2:sw=2:
#
{
  lib,
  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_sh";
  version = "0.3.1";

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

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-qIr/VKCdcSBrtz/4ttpxV2i/4D9t3hw1D0AuzGA9DMk=";
  };

  nativeBuildInputs = with python3Packages; [
    setuptools
    wheel
  ];

  buildInputs = [ xonsh-python ];
}
