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: a9d615827786
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8ad811b3c395
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Mar 7, 2019

  1. Merge #57015: lua packages: fix some bugs

    (cherry picked from commit 2dc7486)
    In particular, lua*Packages.luuid now builds.
    Mic92 authored and vcunat committed Mar 7, 2019
    Copy the full SHA
    8ad811b View commit details
Showing with 19 additions and 6 deletions.
  1. +4 −4 pkgs/development/interpreters/lua-5/build-lua-package.nix
  2. +13 −0 pkgs/development/lua-modules/overrides.nix
  3. +2 −2 pkgs/top-level/lua-packages.nix
8 changes: 4 additions & 4 deletions pkgs/development/interpreters/lua-5/build-lua-package.nix
Original file line number Diff line number Diff line change
@@ -3,8 +3,6 @@
, lua
, stdenv
, wrapLua
, unzip
, writeText
# Whether the derivation provides a lua module or not.
, toLuaModule
}:
@@ -117,14 +115,16 @@ builtins.removeAttrs attrs ["disabled" "checkInputs"] // {
cat > ${luarocks_config} <<EOF
${luarocks_content}
EOF
export LUAROCKS_CONFIG=$PWD/${luarocks_config};
export LUAROCKS_CONFIG="$PWD/${luarocks_config}";
''
+ lib.optionalString (knownRockspec != null) ''
# prevents the following type of error:
# Inconsistency between rockspec filename (42fm1b3d7iv6fcbhgm9674as3jh6y2sh-luv-1.22.0-1.rockspec) and its contents (luv-1.22.0-1.rockspec)
rockspecFilename="$TMP/$(stripHash ''${knownRockspec})"
cp ''${knownRockspec} $rockspecFilename
cp ''${knownRockspec} "$rockspecFilename"
''
+ ''
runHook postConfigure
'';

13 changes: 13 additions & 0 deletions pkgs/development/lua-modules/overrides.nix
Original file line number Diff line number Diff line change
@@ -55,4 +55,17 @@ with super;
install -D completions/zsh/_busted $out/share/zsh/site-functions/_busted
'';
});

luuid = super.luuid.override({
buildInputs = [ pkgs.libuuid ];
extraConfig = ''
variables = {
LIBUUID_INCDIR="${pkgs.lib.getDev pkgs.libuuid}/include";
LIBUUID_LIBDIR="${pkgs.lib.getLib pkgs.libuuid}/lib";
}
'';
meta = {
platforms = pkgs.lib.platforms.linux;
};
});
}
4 changes: 2 additions & 2 deletions pkgs/top-level/lua-packages.nix
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ let

buildLuarocksPackage = with pkgs.lib; makeOverridable( callPackage ../development/interpreters/lua-5/build-lua-package.nix {
inherit toLuaModule;
inherit lua writeText;
inherit lua;
});
in
with self; {
@@ -87,7 +87,7 @@ with self; {
inherit toLuaModule lua-setup-hook;
inherit buildLuarocksPackage buildLuaApplication;
inherit requiredLuaModules luaOlder luaAtLeast
isLua51 isLua52 isLuaJIT lua callPackage;
isLua51 isLua52 isLua53 isLuaJIT lua callPackage;

# wraps programs in $out/bin with valid LUA_PATH/LUA_CPATH
wrapLua = callPackage ../development/interpreters/lua-5/wrap-lua.nix {