mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
Merge pull request #232849 from figsoda/ast-grep
ast-grep: fix build on aarch64-linux and x86_64-darwin
This commit is contained in:
commit
ca9c0d9f51
@ -1,7 +1,9 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ast-grep";
|
||||
version = "0.5.2";
|
||||
@ -15,6 +17,17 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoHash = "sha256-ed6hc7MIo/Hu1JY7yy6dYHbaTZ9S+T0dh/2H3sTT52Y=";
|
||||
|
||||
# error: linker `aarch64-linux-gnu-gcc` not found
|
||||
postPatch = ''
|
||||
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";
|
||||
|
Loading…
Reference in New Issue
Block a user