1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

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.
This commit is contained in:
Matthieu Coudron 2024-02-11 15:09:01 +01:00 committed by GitHub
parent c95210495f
commit 089f45ce69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 6 deletions

View file

@ -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

View file

@ -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";
};
}