summary refs log tree commit diff
path: root/pkgs/development/lua-modules
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-10-16 00:03:09 +0000
committerGitHub <noreply@github.com>2023-10-16 00:03:09 +0000
commitae77d35744934bc6aa3591f39de8b492a0d5502e (patch)
treee976ed1d92b877b3f38f8e9ee49a107975b55923 /pkgs/development/lua-modules
parent208be569768b57da8f40a762554dfb729c204d05 (diff)
parent94c8c31bee161b6e64c3c99e8031f5532fa6a6d8 (diff)
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/lua-modules')
-rw-r--r--pkgs/development/lua-modules/aliases.nix43
-rw-r--r--pkgs/development/lua-modules/generated-packages.nix23
-rw-r--r--pkgs/development/lua-modules/lib.nix6
-rw-r--r--pkgs/development/lua-modules/overrides.nix4
4 files changed, 46 insertions, 30 deletions
diff --git a/pkgs/development/lua-modules/aliases.nix b/pkgs/development/lua-modules/aliases.nix
new file mode 100644
index 0000000000000..47a097fd7f79f
--- /dev/null
+++ b/pkgs/development/lua-modules/aliases.nix
@@ -0,0 +1,43 @@
+
+lib: self: super:
+
+### Deprecated aliases - for backward compatibility
+###
+### !!! NOTE !!!
+### Use `./remove-attr.py [attrname]` in this directory to remove your alias
+### from the `luaPackages` set without regenerating the entire file.
+
+with self;
+
+let
+  # Removing recurseForDerivation prevents derivations of aliased attribute
+  # set to appear while listing all the packages available.
+  removeRecurseForDerivations = alias: with lib;
+    if alias.recurseForDerivations or false
+    then removeAttrs alias ["recurseForDerivations"]
+    else alias;
+
+  # Disabling distribution prevents top-level aliases for non-recursed package
+  # sets from building on Hydra.
+  removeDistribute = alias: with lib;
+    if isDerivation alias then
+      dontDistribute alias
+    else alias;
+
+  # Make sure that we are not shadowing something from node-packages.nix.
+  checkInPkgs = n: alias:
+    if builtins.hasAttr n super
+    then throw "Alias ${n} is still in generated.nix"
+    else alias;
+
+  mapAliases = aliases:
+    lib.mapAttrs (n: alias:
+      removeDistribute
+        (removeRecurseForDerivations
+          (checkInPkgs n alias)))
+      aliases;
+in
+
+mapAliases {
+  "lpty" = throw "lpy was removed because broken and unmaintained "; # added 2023-10-14
+}
diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix
index 173e00dafe1fc..3b9fbf99d65f5 100644
--- a/pkgs/development/lua-modules/generated-packages.nix
+++ b/pkgs/development/lua-modules/generated-packages.nix
@@ -942,29 +942,6 @@ buildLuarocksPackage {
   };
 }) {};
 
-lpty = callPackage({ luaOlder, lua, fetchurl, buildLuarocksPackage }:
-buildLuarocksPackage {
-  pname = "lpty";
-  version = "1.2.2-1";
-  knownRockspec = (fetchurl {
-    url    = "mirror://luarocks/lpty-1.2.2-1.rockspec";
-    sha256 = "04af4mhiqrw3br4qzz7yznw9zy2m50wddwzgvzkvhd99ng71fkzg";
-  }).outPath;
-  src = fetchurl {
-    url    = "http://www.tset.de/downloads/lpty-1.2.2-1.tar.gz";
-    sha256 = "071mvz79wi9vr6hvrnb1rv19lqp1bh2fi742zkpv2sm1r9gy5rav";
-  };
-
-  disabled = (luaOlder "5.1");
-  propagatedBuildInputs = [ lua ];
-
-  meta = {
-    homepage = "http://www.tset.de/lpty/";
-    description = "A simple facility for lua to control other programs via PTYs.";
-    license.fullName = "MIT";
-  };
-}) {};
-
 lrexlib-gnu = callPackage({ buildLuarocksPackage, luaOlder, lua, fetchgit }:
 buildLuarocksPackage {
   pname = "lrexlib-gnu";
diff --git a/pkgs/development/lua-modules/lib.nix b/pkgs/development/lua-modules/lib.nix
index 7c7ffcccf2639..a07b23ff9cd2d 100644
--- a/pkgs/development/lua-modules/lib.nix
+++ b/pkgs/development/lua-modules/lib.nix
@@ -82,11 +82,11 @@ rec {
   };
   */
   generateLuarocksConfig = {
-      externalDeps
+    externalDeps ? []
     # a list of lua derivations
-    , requiredLuaRocks
+    , requiredLuaRocks ? []
     , extraVariables ? {}
-    , rocksSubdir
+    , rocksSubdir ? "rocks-subdir"
     }: let
       rocksTrees = lib.imap0
         (i: dep: {
diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix
index f8c77011c2c31..62d4e066e50b5 100644
--- a/pkgs/development/lua-modules/overrides.nix
+++ b/pkgs/development/lua-modules/overrides.nix
@@ -146,10 +146,6 @@ with prev;
     */
   });
 
-  lpty = prev.lpty.overrideAttrs (oa: {
-    meta.broken = luaOlder "5.1" || luaAtLeast "5.3";
-  });
-
   ldbus = prev.ldbus.overrideAttrs (oa: {
     extraVariables = {
       DBUS_DIR = "${dbus.lib}";