Unverified Commit d6a31498 authored by anthony's avatar anthony Committed by GitHub
Browse files

python3Packages.ast-grep-py: init at 0.39.1 (#429708)

parent 21ee42cd
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
{
  lib,
  ast-grep,
  buildPythonPackage,
  rustPlatform,
  pytestCheckHook,
  nix-update-script,
}:
buildPythonPackage {
  inherit (ast-grep) version src cargoDeps;
  pname = "ast-grep-py";
  pyproject = true;

  buildAndTestSubdir = "crates/pyo3";

  nativeBuildInputs = with rustPlatform; [
    cargoSetupHook
    maturinBuildHook
  ];

  prePatch = ''
    substituteInPlace ./crates/pyo3/tests/test_register_lang.py \
      --replace-fail '../..' ${ast-grep.src}
  '';

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "ast_grep_py" ];

  passthru.updateScript = nix-update-script { };

  meta = {
    inherit (ast-grep.meta)
      description
      homepage
      changelog
      license
      ;
    maintainers = with lib.maintainers; [
      nezia
    ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -973,6 +973,8 @@ self: super: with self; {
  asserts = callPackage ../development/python-modules/asserts { };
  ast-grep-py = callPackage ../development/python-modules/ast-grep-py { };
  asterisk-mbox = callPackage ../development/python-modules/asterisk-mbox { };
  asteroid-filterbanks = callPackage ../development/python-modules/asteroid-filterbanks { };