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

lua51Packages.nfd: fix module not loading #309026

Merged
merged 2 commits into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions pkgs/development/lua-modules/nfd/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -22,15 +21,22 @@ 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 ];

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.";
Expand Down