From cd8d465eddf1bd6414aee20cf932628f4ec1db28 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Wed, 28 Dec 2022 21:30:30 -0300 Subject: [PATCH] mgba: remove `inherit (libsForQt5)` reference on all-packages.nix According to the issue linked at the end, filling arguments for `callPackage` in all-packages.nix breaks splicing and makes the expressions incompatible with cross-compilation. This issue is more pronounced in the many `inherit (darwin)` calls. However, it is present in similar contexts too. The idea here is not the smartest: it just hides those inheritances from `all-packages.nix` and sends them to the `default.nix` expressions. Issue: https://github.com/NixOS/nixpkgs/issues/204303 --- pkgs/applications/emulators/mgba/default.nix | 18 ++++++++++++------ pkgs/top-level/all-packages.nix | 7 ------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/emulators/mgba/default.nix b/pkgs/applications/emulators/mgba/default.nix index d8aec3aa54c2..ab7a7db942ec 100644 --- a/pkgs/applications/emulators/mgba/default.nix +++ b/pkgs/applications/emulators/mgba/default.nix @@ -3,21 +3,27 @@ , fetchFromGitHub , SDL2 , cmake -, ffmpeg +, ffmpeg_4 , imagemagick , libedit , libelf , libepoxy , libzip -, lua +, lua5_4 , minizip , pkg-config -, qtbase -, qtmultimedia -, qttools -, wrapQtAppsHook +, libsForQt5 }: +let + ffmpeg = ffmpeg_4; + lua = lua5_4; + inherit (libsForQt5) + qtbase + qtmultimedia + qttools + wrapQtAppsHook; +in stdenv.mkDerivation (finalAttrs: { pname = "mgba"; version = "0.10.0"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d467c3a7774a..d79af9d54fdb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2068,13 +2068,6 @@ with pkgs; melonDS = libsForQt5.callPackage ../applications/emulators/melonDS { }; mgba = callPackage ../applications/emulators/mgba { - ffmpeg = ffmpeg_4; - lua = lua5_4; - inherit (libsForQt5) - qtbase - qtmultimedia - qttools - wrapQtAppsHook; }; mupen64plus = callPackage ../applications/emulators/mupen64plus { };