2021-07-14 22:03:04 +00:00
|
|
|
{ buildPythonApplication
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
# build inputs
|
2020-07-18 16:06:22 +00:00
|
|
|
, atk
|
2022-04-03 18:54:34 +00:00
|
|
|
, file
|
2020-07-18 16:06:22 +00:00
|
|
|
, gdk-pixbuf
|
|
|
|
, glib-networking
|
|
|
|
, gnome-desktop
|
|
|
|
, gobject-introspection
|
|
|
|
, gst_all_1
|
|
|
|
, gtk3
|
|
|
|
, libnotify
|
|
|
|
, pango
|
|
|
|
, webkitgtk
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
# check inputs
|
|
|
|
, xvfb-run
|
2022-04-03 18:54:34 +00:00
|
|
|
, nose2
|
2021-10-17 09:34:42 +00:00
|
|
|
, flake8
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
# python dependencies
|
2022-12-17 10:02:37 +00:00
|
|
|
, certifi
|
2020-07-18 16:06:22 +00:00
|
|
|
, dbus-python
|
|
|
|
, distro
|
|
|
|
, evdev
|
2021-04-13 19:44:15 +00:00
|
|
|
, lxml
|
2020-07-18 16:06:22 +00:00
|
|
|
, pillow
|
|
|
|
, pygobject3
|
2022-12-17 10:02:37 +00:00
|
|
|
, pypresence
|
2020-07-18 16:06:22 +00:00
|
|
|
, pyyaml
|
|
|
|
, requests
|
2023-05-24 13:37:59 +00:00
|
|
|
, protobuf
|
|
|
|
, moddb
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
# commands that lutris needs
|
2020-07-18 16:06:22 +00:00
|
|
|
, xrandr
|
|
|
|
, pciutils
|
|
|
|
, psmisc
|
|
|
|
, glxinfo
|
|
|
|
, vulkan-tools
|
|
|
|
, xboxdrv
|
|
|
|
, pulseaudio
|
|
|
|
, p7zip
|
|
|
|
, xgamma
|
|
|
|
, libstrangle
|
|
|
|
, fluidsynth
|
|
|
|
, xorgserver
|
|
|
|
, xorg
|
2022-12-28 21:21:41 +00:00
|
|
|
, util-linux
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
# See lutris/util/linux.py
|
2021-10-17 09:34:42 +00:00
|
|
|
requiredTools = [
|
2020-04-24 23:36:52 +00:00
|
|
|
xrandr
|
|
|
|
pciutils
|
|
|
|
psmisc
|
|
|
|
glxinfo
|
|
|
|
vulkan-tools
|
|
|
|
xboxdrv
|
|
|
|
pulseaudio
|
|
|
|
p7zip
|
|
|
|
xgamma
|
|
|
|
libstrangle
|
|
|
|
fluidsynth
|
|
|
|
xorgserver
|
2020-07-18 16:06:22 +00:00
|
|
|
xorg.setxkbmap
|
|
|
|
xorg.xkbcomp
|
2022-12-28 21:21:41 +00:00
|
|
|
# bypass mount suid wrapper which does not work in fhsenv
|
|
|
|
util-linux
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2021-07-14 22:03:04 +00:00
|
|
|
in
|
|
|
|
buildPythonApplication rec {
|
2022-12-28 21:21:41 +00:00
|
|
|
pname = "lutris-unwrapped";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.5.17";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lutris";
|
|
|
|
repo = "lutris";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-Tr5k5LU0s75+1B17oK8tlgA6SlS1SHyyLS6UBKadUmw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2020-07-18 16:06:22 +00:00
|
|
|
atk
|
|
|
|
gdk-pixbuf
|
|
|
|
glib-networking
|
|
|
|
gnome-desktop
|
|
|
|
gtk3
|
|
|
|
libnotify
|
|
|
|
pango
|
|
|
|
webkitgtk
|
2022-12-28 21:21:41 +00:00
|
|
|
] ++ (with gst_all_1; [
|
|
|
|
gst-libav
|
|
|
|
gst-plugins-bad
|
|
|
|
gst-plugins-base
|
|
|
|
gst-plugins-good
|
|
|
|
gst-plugins-ugly
|
|
|
|
gstreamer
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
# See `install_requires` in https://github.com/lutris/lutris/blob/master/setup.py
|
2020-07-18 16:06:22 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
certifi
|
|
|
|
dbus-python
|
2021-04-13 19:44:15 +00:00
|
|
|
distro
|
2022-12-17 10:02:37 +00:00
|
|
|
evdev
|
2021-04-13 19:44:15 +00:00
|
|
|
lxml
|
2022-12-17 10:02:37 +00:00
|
|
|
pillow
|
2021-04-13 19:44:15 +00:00
|
|
|
pygobject3
|
2022-12-17 10:02:37 +00:00
|
|
|
pypresence
|
|
|
|
pyyaml
|
2021-04-13 19:44:15 +00:00
|
|
|
requests
|
2023-05-24 13:37:59 +00:00
|
|
|
protobuf
|
|
|
|
moddb
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace lutris/util/magic.py \
|
2024-07-27 06:49:29 +00:00
|
|
|
--replace '"libmagic.so.1"' "'${lib.getLib file}/lib/libmagic.so.1'"
|
2022-04-03 18:54:34 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ xvfb-run nose2 flake8 ] ++ requiredTools;
|
2021-10-17 09:34:42 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2022-12-28 21:21:41 +00:00
|
|
|
|
|
|
|
export HOME=$PWD
|
2021-10-17 09:34:42 +00:00
|
|
|
xvfb-run -s '-screen 0 800x600x24' make test
|
2022-12-28 21:21:41 +00:00
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
# avoid double wrapping
|
|
|
|
dontWrapGApps = true;
|
|
|
|
makeWrapperArgs = [
|
2022-12-28 21:21:41 +00:00
|
|
|
"--prefix PATH : ${lib.makeBinPath requiredTools}"
|
2021-02-05 17:12:51 +00:00
|
|
|
"\${gappsWrapperArgs[@]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://lutris.net";
|
|
|
|
description = "Open Source gaming platform for GNU/Linux";
|
2021-04-13 19:44:15 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2022-04-27 09:35:20 +00:00
|
|
|
maintainers = with maintainers; [ Madouura ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "lutris";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|