Merge pull request #239960 from gshpychka/master

This commit is contained in:
figsoda 2023-06-27 09:42:13 -04:00 committed by GitHub
commit 11e1b06b21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View file

@ -41,7 +41,7 @@ let
fetchSubmodules = true;
};
update-all-grammars = callPackage ./update.nix {};
update-all-grammars = callPackage ./update.nix { };
fetchGrammar = (v: fetchgit { inherit (v) url rev sha256 fetchSubmodules; });
@ -62,6 +62,7 @@ let
inherit version;
src = grammar.src or (fetchGrammar grammar);
location = grammar.location or null;
generate = grammar.generate or false;
};
grammars' = import ./grammars { inherit lib; } // extraGrammars;
grammars = grammars' //
@ -111,7 +112,7 @@ rustPlatform.buildRustPackage {
inherit src version cargoSha256;
buildInputs =
lib.optionals stdenv.isDarwin [ Security CoreServices];
lib.optionals stdenv.isDarwin [ Security CoreServices ];
nativeBuildInputs =
[ which ]
++ lib.optionals webUISupport [ emscripten ];

View file

@ -28,10 +28,10 @@ stdenv.mkDerivation ({
stripDebugList = [ "parser" ];
configurePhase = lib.optionalString generate ''
tree-sitter generate
'' + lib.optionalString (location != null) ''
configurePhase = lib.optionalString (location != null) ''
cd ${location}
'' + lib.optionalString generate ''
tree-sitter generate
'';
# When both scanner.{c,cc} exist, we should not link both since they may be the same but in