From 7ca822c8265ba86ade57ad01d71dd55bf4f3476b Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Thu, 3 Oct 2024 22:58:57 +0100 Subject: [PATCH] more messing around with lua derivation --- overlay.nix | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/overlay.nix b/overlay.nix index e4c9a2d..88d60e5 100644 --- a/overlay.nix +++ b/overlay.nix @@ -6,19 +6,22 @@ let inherit (final) lib callPackage; }; inherit (final) fetchpatch; - luaHost = prev.lua5_3.overrideAttrs(o: { - name = "lua-tty"; - preBuild = '' - makeFlagsArray+=(PLAT="posix" SYSLIBS="-Wl,-E -ldl" CFLAGS="-O2 -fPIC -DLUA_USE_POSIX -DLUA_USE_DLOPEN") + luaHost = + let + l = prev.lua5_3.overrideAttrs(o: { + name = "lua-tty"; + preBuild = '' + makeFlagsArray+=(PLAT="posix" SYSLIBS="-Wl,-E -ldl" CFLAGS="-O2 -fPIC -DLUA_USE_POSIX -DLUA_USE_DLOPEN") ''; - # lua in nixpkgs has a postInstall stanza that assumes only - # one output, we need to override that if we're going to - # convert to multi-output - # outputs = ["bin" "man" "out"]; - makeFlags = - builtins.filter (x: (builtins.match "(PLAT|MYLIBS).*" x) == null) - o.makeFlags; - }); + # lua in nixpkgs has a postInstall stanza that assumes only + # one output, we need to override that if we're going to + # convert to multi-output + # outputs = ["bin" "man" "out"]; + makeFlags = + builtins.filter (x: (builtins.match "(PLAT|MYLIBS).*" x) == null) + o.makeFlags; + }); + in l.override { self = l; }; s6 = prev.s6.overrideAttrs(o: let