From 44cdbd3481f89d7ec78b9c964959beb2f5012ed1 Mon Sep 17 00:00:00 2001 From: Skythrew Date: Wed, 16 Apr 2025 14:36:34 +0200 Subject: [PATCH] lutris: migrate to the new meson build system This commit makes the Lutris package use the meson build system, which is more appropriate to build the desktop app. Indeed, the meson build of Lutris is the only one supporting translations for the desktop app. However, the presence of the Makefile at the source root is preventing the Nix build system from building the package with meson without overriding the different build phases. --- pkgs/applications/misc/lutris/default.nix | 32 ++++++++++++----------- pkgs/top-level/all-packages.nix | 4 ++- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/misc/lutris/default.nix b/pkgs/applications/misc/lutris/default.nix index eef78986d452..03938f8aabbc 100644 --- a/pkgs/applications/misc/lutris/default.nix +++ b/pkgs/applications/misc/lutris/default.nix @@ -6,6 +6,7 @@ # build inputs atk, file, + glib, gdk-pixbuf, glib-networking, gnome-desktop, @@ -16,6 +17,8 @@ pango, webkitgtk_4_1, wrapGAppsHook3, + meson, + ninja, # check inputs xvfb-run, @@ -45,11 +48,15 @@ pulseaudio, p7zip, xgamma, + gettext, libstrangle, fluidsynth, xorgserver, xorg, util-linux, + pkg-config, + desktop-file-utils, + appstream-glib, }: let @@ -83,9 +90,18 @@ buildPythonApplication rec { hash = "sha256-CAXKnx5+60MITRM8enkYgFl5ZKM6HCXhCYNyG7kHhuQ="; }; + format = "other"; + nativeBuildInputs = [ - wrapGAppsHook3 + appstream-glib + desktop-file-utils + gettext + glib gobject-introspection + meson + ninja + wrapGAppsHook3 + pkg-config ]; buildInputs = [ @@ -128,20 +144,6 @@ buildPythonApplication rec { --replace '"libmagic.so.1"' "'${lib.getLib file}/lib/libmagic.so.1'" ''; - nativeCheckInputs = [ - xvfb-run - nose2 - flake8 - ] ++ requiredTools; - checkPhase = '' - runHook preCheck - - export HOME=$PWD - xvfb-run -s '-screen 0 800x600x24' make test - - runHook postCheck - ''; - # avoid double wrapping dontWrapGApps = true; makeWrapperArgs = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 965d9d23d8bd..7a59e09f4811 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13207,7 +13207,9 @@ with pkgs; luddite = with python3Packages; toPythonApplication luddite; - lutris-unwrapped = python3.pkgs.callPackage ../applications/misc/lutris { }; + lutris-unwrapped = python3.pkgs.callPackage ../applications/misc/lutris { + inherit (pkgs) meson; + }; lutris = callPackage ../applications/misc/lutris/fhsenv.nix { }; lutris-free = lutris.override { steamSupport = false;