Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx with nginxModules.lua is broken #29104

Closed
vaibhavsagar opened this issue Sep 8, 2017 · 1 comment
Closed

nginx with nginxModules.lua is broken #29104

vaibhavsagar opened this issue Sep 8, 2017 · 1 comment
Labels
0.kind: bug 0.kind: regression Something that worked before working no longer 3.skill: sprintable
Milestone

Comments

@vaibhavsagar
Copy link
Member

Issue description

The following derivation is broken on master and nixos-17.09:

{ callPackage, nginxModules }:

let stable = import ./pkgs/servers/http/nginx/stable.nix;
in callPackage stable { modules = [ nginxModules.lua ]; }

I did some bisecting and traced this back to d7501b9.

Steps to reproduce

Save the above derivation as nginx.nix in the root of nixpkgs and run

nix-build --no-out-link -E 'with (import ./default.nix {}); pkgs.callPackage ./nginx.nix {}'

Technical details

  • System: 17.03.1810.6c8b819c99 (Gorilla)
  • Nix version: nix-env (Nix) 1.11.14
  • Nixpkgs version: "18.03pre-git"
  • Sandboxing enabled: no
@vaibhavsagar
Copy link
Member Author

Looking at the linked commit, I tried cargo-culting this patch and rebuilding:

diff --git a/pkgs/servers/http/nginx/modules.nix b/pkgs/servers/http/nginx/modules.nix
index 98141c13c0..ac7afd2115 100644
--- a/pkgs/servers/http/nginx/modules.nix
+++ b/pkgs/servers/http/nginx/modules.nix
@@ -73,6 +73,13 @@
       sha256 = "0wz5j4kqa6hk7ar42bkxp0hd74psjy6sfsldh1a6p93z349iz4v5";
     };
     inputs = [ pkgs.luajit ];
+
+    # needed since luajit-2.1.0-beta3
+    NIX_CFLAGS_COMPILE = [
+      "-DluaL_reg=luaL_Reg"
+      "-DluaL_getn(L,i)=((int)lua_objlen(L,i))"
+    ];
+
     preConfigure = ''
       export LUAJIT_LIB="${pkgs.luajit}/lib"
       export LUAJIT_INC="${pkgs.luajit}/include/luajit-2.0"

but this did not seem to make a difference.

@globin globin added 0.kind: bug 0.kind: regression Something that worked before working no longer 3.skill: sprintable labels Sep 8, 2017
@globin globin added this to the 17.09 milestone Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 0.kind: regression Something that worked before working no longer 3.skill: sprintable
Projects
None yet
Development

No branches or pull requests

2 participants