Commit 99079728 authored by figsoda's avatar figsoda
Browse files

ast-grep: fix build on x86_64-darwin

parent 6b296fbc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
}:

rustPlatform.buildRustPackage rec {
  pname = "ast-grep";
  version = "0.5.2";
@@ -20,6 +22,12 @@ rustPlatform.buildRustPackage rec {
    rm .cargo/config.toml
  '';

  checkFlags = lib.optionals (stdenv.isx86_64 && stdenv.isDarwin) [
    # fails on emulated x86_64-darwin
    # mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')
    "--skip=test::test_load_parser"
  ];

  meta = with lib; {
    mainProgram = "sg";
    description = "A fast and polyglot tool for code searching, linting, rewriting at large scale";