Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 39 lines 1.1 kB view raw
1{ lib 2, rustPlatform 3, fetchFromGitHub 4, stdenv 5}: 6 7rustPlatform.buildRustPackage rec { 8 pname = "ast-grep"; 9 version = "0.5.2"; 10 11 src = fetchFromGitHub { 12 owner = "ast-grep"; 13 repo = "ast-grep"; 14 rev = "v${version}"; 15 hash = "sha256-4bslw+BADUQO9cUCEYZ1U4eRdr/2652Shty+NVY0ZYI="; 16 }; 17 18 cargoHash = "sha256-ed6hc7MIo/Hu1JY7yy6dYHbaTZ9S+T0dh/2H3sTT52Y="; 19 20 # error: linker `aarch64-linux-gnu-gcc` not found 21 postPatch = '' 22 rm .cargo/config.toml 23 ''; 24 25 checkFlags = lib.optionals (stdenv.isx86_64 && stdenv.isDarwin) [ 26 # fails on emulated x86_64-darwin 27 # mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64') 28 "--skip=test::test_load_parser" 29 ]; 30 31 meta = with lib; { 32 mainProgram = "sg"; 33 description = "A fast and polyglot tool for code searching, linting, rewriting at large scale"; 34 homepage = "https://ast-grep.github.io/"; 35 changelog = "https://github.com/ast-grep/ast-grep/blob/${src.rev}/CHANGELOG.md"; 36 license = licenses.mit; 37 maintainers = with maintainers; [ montchr ]; 38 }; 39}