Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0137b08bd107
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 81487f73eb5e
Choose a head ref
  • 3 commits
  • 2 files changed
  • 2 contributors

Commits on Oct 1, 2019

  1. lua.pkgs.luv.libluv: fix linking against lua on darwin

        [ 50%] Building C object CMakeFiles/luv.dir/src/luv.c.o
        [100%] Linking C shared library libluv.dylib
        Undefined symbols for architecture x86_64:
          "_luaL_addlstring", referenced from:
              _thread_dump in luv.c.o
          ...
    LnL7 committed Oct 1, 2019
    Copy the full SHA
    fc408c8 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c819648 View commit details

Commits on Oct 4, 2019

  1. Merge pull request #70215 from LnL7/darwin-lua-libluv

    neovim: fix darwin build
    teto authored Oct 4, 2019
    Copy the full SHA
    81487f7 View commit details
Showing with 15 additions and 8 deletions.
  1. +3 −1 pkgs/applications/editors/neovim/default.nix
  2. +12 −7 pkgs/development/lua-modules/overrides.nix
4 changes: 3 additions & 1 deletion pkgs/applications/editors/neovim/default.nix
Original file line number Diff line number Diff line change
@@ -79,9 +79,11 @@ in

cmakeFlags = [
"-DGPERF_PRG=${gperf}/bin/gperf"
"-DLIBLUV_LIBRARY=${lua.pkgs.luv}/lib/lua/${lua.luaversion}/luv.so"
"-DLUA_PRG=${neovimLuaEnv.interpreter}"
]
# FIXME: this is verry messy and strange.
++ optional (!stdenv.isDarwin) "-DLIBLUV_LIBRARY=${lua.pkgs.luv}/lib/lua/${lua.luaversion}/luv.so"
++ optional (stdenv.isDarwin) "-DLIBLUV_LIBRARY=${lua.pkgs.luv.libluv}/lib/lua/${lua.luaversion}/libluv.dylib"
++ optional doCheck "-DBUSTED_PRG=${neovimLuaEnv}/bin/busted"
++ optional (!lua.pkgs.isLuaJIT) "-DPREFER_LUA=ON"
;
19 changes: 12 additions & 7 deletions pkgs/development/lua-modules/overrides.nix
Original file line number Diff line number Diff line change
@@ -273,17 +273,22 @@ with super;
sed -i 's,\(option(WITH_SHARED_LIBUV.*\)OFF,\1ON,' CMakeLists.txt
rm -rf deps/libuv
'';
propagatedBuildInputs = [
pkgs.libuv
];

buildInputs = [ pkgs.libuv ];

passthru = {
libluv = self.luv.override({
libluv = self.luv.override ({
preBuild = self.luv.preBuild + ''
sed -i 's,\(option(BUILD_MODULE.*\)ON,\1OFF,' CMakeLists.txt
sed -i 's,\(option(BUILD_SHARED_LIBS.*\)OFF,\1ON,' CMakeLists.txt
sed -i 's,${"\${INSTALL_INC_DIR}"},${placeholder "out"}/include/luv,' CMakeLists.txt
sed -i 's,\(option(BUILD_MODULE.*\)ON,\1OFF,' CMakeLists.txt
sed -i 's,\(option(BUILD_SHARED_LIBS.*\)OFF,\1ON,' CMakeLists.txt
sed -i 's,${"\${INSTALL_INC_DIR}"},${placeholder "out"}/include/luv,' CMakeLists.txt
'';

nativeBuildInputs = [ pkgs.fixDarwinDylibNames ];

# Fixup linking libluv.dylib, for some reason it's not linked against lua correctly.
NIX_LDFLAGS = pkgs.lib.optionalString pkgs.stdenv.isDarwin
(if isLuaJIT then "-lluajit-${lua.luaversion}" else "-llua");
});
};
});