tree-sitter: fix webui/playground notice

This commit is contained in:
Noah Santschi-Cooney 2023-06-26 15:41:26 +01:00
parent 547cd96f10
commit 67ad8087de
No known key found for this signature in database
GPG key ID: 3B22282472C8AE48

View file

@ -2,16 +2,9 @@
, stdenv
, fetchgit
, fetchFromGitHub
, fetchurl
, writeShellScript
, runCommand
, which
, formats
, rustPlatform
, jq
, nix-prefetch-git
, xe
, curl
, emscripten
, Security
, callPackage
@ -118,10 +111,10 @@ rustPlatform.buildRustPackage {
postPatch = lib.optionalString (!webUISupport) ''
# remove web interface
sed -e '/pub mod web_ui/d' \
sed -e '/pub mod playground/d' \
-i cli/src/lib.rs
sed -e 's/web_ui,//' \
-e 's/web_ui::serve(&current_dir.*$/println!("ERROR: web-ui is not available in this nixpkgs build; enable the webUISupport"); std::process::exit(1);/' \
sed -e 's/playground,//' \
-e 's/playground::serve(&current_dir.*$/println!("ERROR: web-ui is not available in this nixpkgs build; enable the webUISupport"); std::process::exit(1);/' \
-i cli/src/main.rs
'';