Unverified Commit e7d9c825 authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents bdb79914 72453271
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
, unibilium, gperf
, libvterm-neovim
, tree-sitter
, fetchurl
, treesitter-parsers ? import ./treesitter-parsers.nix { inherit fetchurl; }
, CoreServices
, glibcLocales ? null, procps ? null

@@ -119,7 +121,18 @@ in
      )
    '' + lib.optionalString stdenv.isDarwin ''
      substituteInPlace src/nvim/CMakeLists.txt --replace "    util" ""
    '';
    '' + ''
      mkdir -p $out/lib/nvim/parser
    '' + lib.concatStrings (lib.mapAttrsToList
      (language: src: ''
        ln -s \
          ${tree-sitter.buildGrammar {
            inherit language src;
            version = "neovim-${version}";
          }}/parser \
          $out/lib/nvim/parser/${language}.so
      '')
      treesitter-parsers);

    shellHook=''
      export VIMRUNTIME=$PWD/runtime
+24 −0
Original line number Diff line number Diff line
{ fetchurl }:

{
  c = fetchurl {
    url = "https://github.com/tree-sitter/tree-sitter-c/archive/v0.20.2.tar.gz";
    hash = "sha256:af66fde03feb0df4faf03750102a0d265b007e5d957057b6b293c13116a70af2";
  };
  lua = fetchurl {
    url = "https://github.com/MunifTanjim/tree-sitter-lua/archive/v0.0.14.tar.gz";
    hash = "sha256:930d0370dc15b66389869355c8e14305b9ba7aafd36edbfdb468c8023395016d";
  };
  vim = fetchurl {
    url = "https://github.com/neovim/tree-sitter-vim/archive/v0.3.0.tar.gz";
    hash = "sha256:403acec3efb7cdb18ff3d68640fc823502a4ffcdfbb71cec3f98aa786c21cbe2";
  };
  vimdoc = fetchurl {
    url = "https://github.com/neovim/tree-sitter-vimdoc/archive/v2.0.0.tar.gz";
    hash = "sha256:1ff8f4afd3a9599dd4c3ce87c155660b078c1229704d1a254433e33794b8f274";
  };
  query = fetchurl {
    url = "https://github.com/nvim-treesitter/tree-sitter-query/archive/v0.1.0.tar.gz";
    hash = "sha256:e2b806f80e8bf1c4f4e5a96248393fe6622fc1fc6189d6896d269658f67f914c";
  };
}
+46 −0
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3

import re
import subprocess
from pathlib import Path

parsers = {}
dir = Path(__file__).parent
regex = re.compile(r"^set\(TREESITTER_([A-Z_]+)_(URL|SHA256)\s+([^ \)]+)\s*\)\s*$")

src = subprocess.check_output(
    [
        "nix-build",
        dir.parent.parent.parent.parent,
        "-A",
        "neovim-unwrapped.src",
        "--no-out-link",
    ],
    text=True,
).strip()

for line in open(f"{src}/cmake.deps/CMakeLists.txt"):
    m = regex.fullmatch(line)
    if m is None:
        continue

    lang = m[1].lower()
    ty = m[2]
    val = m[3]

    if not lang in parsers:
        parsers[lang] = {}
    parsers[lang][ty] = val

with open(dir / "treesitter-parsers.nix", "w") as f:
    f.write("{ fetchurl }:\n\n{\n")
    for lang, src in parsers.items():
        f.write(
            f"""  {lang} = fetchurl {{
    url = "{src["URL"]}";
    hash = "sha256:{src["SHA256"]}";
  }};
"""
        )
    f.write("}\n")
+9 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
, alejandra
, millet
, shfmt
, typst-lsp
, autoPatchelfHook
, zlib
, stdenv
@@ -2278,6 +2279,14 @@ let
          version = "0.4.1";
          sha256 = "sha256-NZejUb99JDcnqjihLTPkNzVCgpqDkbiwAySbBVZ0esY=";
        };

        nativeBuildInputs = [ jq moreutils ];

        postInstall = ''
          cd "$out/$installPrefix"
          jq '.contributes.configuration.properties."typst-lsp.serverPath".default = "${typst-lsp}/bin/typst-lsp"' package.json | sponge package.json
        '';

        meta = {
          changelog = "https://marketplace.visualstudio.com/items/nvarner.typst-lsp/changelog";
          description = "A VSCode extension for providing a language server for Typst";
+6 −12
Original line number Diff line number Diff line
@@ -27,13 +27,13 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "xemu";
  version = "0.7.85";
  version = "0.7.87";

  src = fetchFromGitHub {
    owner = "xemu-project";
    repo = "xemu";
    rev = "v${finalAttrs.version}";
    hash = "sha256-sVUkB2KegdKlHlqMvSwB1nLdJGun2x2x9HxtNHnpp1s=";
    hash = "sha256-NPvyXDrTKt7PIspLPrUBo7qs9hsHV+6u7dQlIqdlQtw=";
    fetchSubmodules = true;
  };

@@ -89,20 +89,14 @@ stdenv.mkDerivation (finalAttrs: {
    })
  ];

  preConfigure = let
    # When the data below can't be obtained through git, the build process tries
    # to run `XEMU_COMMIT=$(cat XEMU_COMMIT)` (and similar)
    branch = "master";
    commit = "d8fa50e524c22f85ecb2e43108fd6a5501744351";
    inherit (finalAttrs) version;
  in ''
  preConfigure = ''
    patchShebangs .
    configureFlagsArray+=("--extra-cflags=-DXBOX=1 -Wno-error=redundant-decls")
    substituteInPlace ./scripts/xemu-version.sh \
      --replace 'date -u' "date -d @$SOURCE_DATE_EPOCH '+%Y-%m-%d %H:%M:%S'"
    echo '${commit}' > XEMU_COMMIT
    echo '${branch}' > XEMU_BRANCH
    echo '${version}' > XEMU_VERSION
    # When the data below can't be obtained through git, the build process tries
    # to run `XEMU_COMMIT=$(cat XEMU_COMMIT)` (and similar)
    echo '${finalAttrs.version}' > XEMU_VERSION
  '';

  preBuild = ''
Loading