From 7ec2e73d79a0543cf591155d2446b15836811495 Mon Sep 17 00:00:00 2001 From: Petingoso Date: Sat, 4 May 2024 12:51:42 +0100 Subject: [PATCH 1/2] lua51Packages.nfd: fix module not loading As this (issue)[https://github.com/NixOS/nixpkgs/issues/295022] complains, it wasn't finding symbols properly. I traced it to the (migration)[https://github.com/NixOS/nixpkgs/pull/288669] from buildLuarocksPackage.extraVariables to buildLuarocksPackage.luarocksConfig.variables where someone forgot to add .variables. It now launches the dialogue properly. --- pkgs/development/lua-modules/nfd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/lua-modules/nfd/default.nix b/pkgs/development/lua-modules/nfd/default.nix index 5c2ffabc9b543..581b5289aef06 100644 --- a/pkgs/development/lua-modules/nfd/default.nix +++ b/pkgs/development/lua-modules/nfd/default.nix @@ -22,7 +22,7 @@ buildLuarocksPackage { ]; knownRockspec = "lua/nfd-scm-1.rockspec"; - luarocksConfig.LUA_LIBDIR = "${lua}/lib"; + luarocksConfig.variables.LUA_LIBDIR = "${lua}/lib"; nativeBuildInputs = [ pkg-config ]; buildInputs = lib.optionals stdenv.isDarwin [ AppKit ]; From 8710830e81670b6283014c7985055a8472d6d37d Mon Sep 17 00:00:00 2001 From: Petingoso Date: Sat, 4 May 2024 22:12:08 +0100 Subject: [PATCH 2/2] lua51Packages.nfd: feat added postInstallCheck for test lua51Packages.nfd: cleanup duplicate line lua51Packages.nfd: cleanup useless undefined hooks lua51Packages.nfd: squashed commits lua51Packages.nfd: change to generic buster --- pkgs/development/lua-modules/nfd/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/development/lua-modules/nfd/default.nix b/pkgs/development/lua-modules/nfd/default.nix index 581b5289aef06..1cc8d66044c70 100644 --- a/pkgs/development/lua-modules/nfd/default.nix +++ b/pkgs/development/lua-modules/nfd/default.nix @@ -1,5 +1,4 @@ -{ stdenv, fetchFromGitHub, buildLuarocksPackage, lua, pkg-config, lib -, substituteAll, zenity, AppKit }: +{ stdenv, fetchFromGitHub, buildLuarocksPackage, lua51Packages, lua, pkg-config, lib, substituteAll, zenity, AppKit}: buildLuarocksPackage { pname = "nfd"; @@ -27,10 +26,17 @@ buildLuarocksPackage { buildInputs = lib.optionals stdenv.isDarwin [ AppKit ]; - fixupPhase = '' + postInstall = '' find $out -name nfd_zenity.so -execdir mv {} nfd.so \; ''; + doInstallCheck = true; + installCheckInputs = [ lua.pkgs.busted ]; + installCheckPhase= '' + busted lua/spec/ + ''; + + meta = { description = "A tiny, neat lua library that portably invokes native file open and save dialogs.";