about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthieu Coudron <886074+teto@users.noreply.github.com>2024-02-11 15:09:01 +0100
committerGitHub <noreply@github.com>2024-02-11 15:09:01 +0100
commit089f45ce691aa3b26d52f9b718a205af2493a455 (patch)
treec6c589ea2bc124e66aef19695159858f38a3f6f3
parentc95210495f9575360f5333521e2ef1a00578d04d (diff)
buildLuarocksPackage: remove rockspecDir (#288036)
it was used only once and complexifies the buildLuarocksPackage function uselessly.
because buildLuarocksPackage accepts ... args, it wont trigger eval failures but this may break out of tree packages where the build can't find the rockspec anymore. Specify the path via `knownRockspec` if that's the case.
-rw-r--r--pkgs/development/interpreters/lua-5/build-luarocks-package.nix4
-rw-r--r--pkgs/development/lua-modules/nfd/default.nix5
2 files changed, 3 insertions, 6 deletions
diff --git a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
index c388d0eef8c1d..ea46fd107980c 100644
--- a/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
+++ b/pkgs/development/interpreters/lua-5/build-luarocks-package.nix
@@ -57,8 +57,6 @@
 
 # relative to srcRoot, path to the rockspec to use when using rocks
 , rockspecFilename ? null
-# relative to srcRoot, path to folder that contains the expected rockspec
-, rockspecDir ?  "."
 
 # must be set for packages that don't have a rock
 , knownRockspec ? null
@@ -87,7 +85,7 @@ let
     LUAROCKS_CONFIG = self.configFile;
   } // attrs.env or {};
 
-  generatedRockspecFilename = "${rockspecDir}/${pname}-${rockspecVersion}.rockspec";
+  generatedRockspecFilename = "./${self.pname}-${self.rockspecVersion}.rockspec";
 
   nativeBuildInputs = [
     wrapLua
diff --git a/pkgs/development/lua-modules/nfd/default.nix b/pkgs/development/lua-modules/nfd/default.nix
index 148b074666e80..a02fd0a1df4d9 100644
--- a/pkgs/development/lua-modules/nfd/default.nix
+++ b/pkgs/development/lua-modules/nfd/default.nix
@@ -20,7 +20,7 @@ buildLuarocksPackage {
       inherit zenity;
     })
   ];
-  rockspecDir = "lua";
+  knownRockspec = "lua/nfd-scm-1.rockspec";
 
   extraVariables.LUA_LIBDIR = "${lua}/lib";
   nativeBuildInputs = [ pkg-config ];
@@ -31,13 +31,12 @@ buildLuarocksPackage {
     find $out -name nfd_zenity.so -execdir mv {} nfd.so \;
   '';
 
-  disabled = with lua; (luaversion != "5.1");
-
   meta = {
     description =
       "A tiny, neat lua library that portably invokes native file open and save dialogs.";
     homepage = "https://github.com/Alloyed/nativefiledialog/tree/master/lua";
     license = lib.licenses.zlib;
     maintainers = [ lib.maintainers.scoder12 ];
+    broken = lua.luaversion != "5.1";
   };
 }