Unverified Commit 21f1d1a4 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

Merge pull request #336645 from mrcjkb/push-rltnztktvoxt

luaPackages.tree-sitter-norg: update + unbreak on darwin
parents 06f1ee14 25628691
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -2089,14 +2089,14 @@ buildLuarocksPackage {
luarocks-build-treesitter-parser-cpp = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, luafilesystem }:
buildLuarocksPackage {
  pname = "luarocks-build-treesitter-parser-cpp";
  version = "2.0.0-1";
  version = "2.0.3-1";
  knownRockspec = (fetchurl {
    url    = "mirror://luarocks/luarocks-build-treesitter-parser-cpp-2.0.0-1.rockspec";
    sha256 = "13jwyg9y5n3zh55pisyms6kh8n59gwh9q9nslxkbdrb149y5wlr4";
    url    = "mirror://luarocks/luarocks-build-treesitter-parser-cpp-2.0.3-1.rockspec";
    sha256 = "1pn8kn1kf9ak4b7hba1nd358dh146sr993gf8r10s3ywcnihmnw0";
  }).outPath;
  src = fetchzip {
    url    = "https://github.com/nvim-neorocks/luarocks-build-treesitter-parser-cpp/archive/v2.0.0.zip";
    sha256 = "1rldmmimz3bhhh5yrx15wsdiymfmjyl3j8y71xz4mi4m16in470d";
    url    = "https://github.com/nvim-neorocks/luarocks-build-treesitter-parser-cpp/archive/v2.0.3.zip";
    sha256 = "1dcjy1vy76vszm9r1ck42w8a1xw0ls0vs9xg5wzh3wnk2d1y54m3";
  };

  disabled = luaOlder "5.1";
@@ -3357,20 +3357,20 @@ buildLuarocksPackage {
  };
}) {};

tree-sitter-norg = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luarocks-build-treesitter-parser }:
tree-sitter-norg = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luarocks-build-treesitter-parser-cpp }:
buildLuarocksPackage {
  pname = "tree-sitter-norg";
  version = "0.2.4-1";
  version = "0.2.5-1";
  knownRockspec = (fetchurl {
    url    = "mirror://luarocks/tree-sitter-norg-0.2.4-1.rockspec";
    sha256 = "00mgn1kmhhrink64s1yjnz78lc7qbv0f021dsvr6z3b44srhcxb9";
    url    = "mirror://luarocks/tree-sitter-norg-0.2.5-1.rockspec";
    sha256 = "1w3hns9n92ygc7x3wxq3pd2kjs2nfp1arxq9zda75h2alwapjink";
  }).outPath;
  src = fetchzip {
    url    = "https://github.com/nvim-neorg/tree-sitter-norg/archive/v0.2.4.zip";
    sha256 = "08bsk3v61r0xhracanjv25jccqv80ahipx0mv5a1slzhcyymv8kd";
    url    = "https://github.com/nvim-neorg/tree-sitter-norg/archive/1aab69c95bd9d5e7c0e172ecbe5d29bcf5834612.zip";
    sha256 = "12s4lvs2iw3v9hwfcql0phi8gxgpwfj3i6443f0mss5zn7f6w50g";
  };

  nativeBuildInputs = [ luarocks-build-treesitter-parser ];
  nativeBuildInputs = [ luarocks-build-treesitter-parser-cpp ];

  meta = {
    homepage = "https://github.com/nvim-neorg/tree-sitter-norg";
+6 −10
Original line number Diff line number Diff line
@@ -830,17 +830,13 @@ in
  });

  tree-sitter-norg = prev.tree-sitter-norg.overrideAttrs (oa: {
    nativeBuildInputs = let
      # HACK: luarocks-nix doesn't pick up rockspec build dependencies,
      # so we have to pass the correct package in here.
    propagatedBuildInputs = let
      # HACK: luarocks-nix puts rockspec build dependencies in the nativeBuildInputs,
      # but that doesn't seem to work
      lua = lib.head oa.propagatedBuildInputs;
    in oa.nativeBuildInputs ++ [
      lua.pkgs.luarocks-build-treesitter-parser
    ] ++ (lib.optionals stdenv.isDarwin [
      clang
      tree-sitter
    ]);
    meta.broken = (luaOlder "5.1" || stdenv.isDarwin);
    in oa.propagatedBuildInputs ++ [
      lua.pkgs.luarocks-build-treesitter-parser-cpp
    ];
  });

  vstruct = prev.vstruct.overrideAttrs (_: {