2021-07-03 14:46:45 +02:00
|
|
|
{ buildPythonApplication
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2023-10-20 13:59:19 +02:00
|
|
|
, fetchpatch
|
2020-06-25 08:08:25 +02:00
|
|
|
|
2021-07-03 14:46:45 +02:00
|
|
|
# build inputs
|
2020-06-25 08:08:25 +02:00
|
|
|
, atk
|
2022-04-02 22:22:45 +02:00
|
|
|
, file
|
2020-06-25 08:08:25 +02:00
|
|
|
, gdk-pixbuf
|
|
|
|
, glib-networking
|
|
|
|
, gnome-desktop
|
|
|
|
, gobject-introspection
|
|
|
|
, gst_all_1
|
|
|
|
, gtk3
|
|
|
|
, libnotify
|
|
|
|
, pango
|
|
|
|
, webkitgtk
|
2024-04-26 22:24:03 +02:00
|
|
|
, wrapGAppsHook3
|
2020-06-25 08:08:25 +02:00
|
|
|
|
2021-10-16 20:08:01 +02:00
|
|
|
# check inputs
|
|
|
|
, xvfb-run
|
2022-04-02 22:22:45 +02:00
|
|
|
, nose2
|
2021-10-16 20:08:01 +02:00
|
|
|
, flake8
|
|
|
|
|
2021-07-03 14:46:45 +02:00
|
|
|
# python dependencies
|
2022-12-07 01:11:38 +01:00
|
|
|
, certifi
|
2020-06-25 08:08:25 +02:00
|
|
|
, dbus-python
|
|
|
|
, distro
|
|
|
|
, evdev
|
2021-04-03 09:24:37 +02:00
|
|
|
, lxml
|
2020-06-25 08:08:25 +02:00
|
|
|
, pillow
|
|
|
|
, pygobject3
|
2022-12-07 01:11:38 +01:00
|
|
|
, pypresence
|
2020-06-25 08:08:25 +02:00
|
|
|
, pyyaml
|
|
|
|
, requests
|
2023-02-12 20:32:00 +01:00
|
|
|
, protobuf
|
|
|
|
, moddb
|
2020-06-25 08:08:25 +02:00
|
|
|
|
2021-07-03 14:46:45 +02:00
|
|
|
# commands that lutris needs
|
2020-06-25 08:08:25 +02:00
|
|
|
, xrandr
|
|
|
|
, pciutils
|
|
|
|
, psmisc
|
|
|
|
, glxinfo
|
|
|
|
, vulkan-tools
|
|
|
|
, xboxdrv
|
|
|
|
, pulseaudio
|
|
|
|
, p7zip
|
|
|
|
, xgamma
|
|
|
|
, libstrangle
|
|
|
|
, fluidsynth
|
|
|
|
, xorgserver
|
2020-07-07 21:34:16 +02:00
|
|
|
, xorg
|
2022-12-17 04:38:58 +01:00
|
|
|
, util-linux
|
2019-07-18 11:32:39 +02:00
|
|
|
}:
|
2018-06-15 20:17:43 +02:00
|
|
|
|
|
|
|
let
|
2019-07-18 11:32:39 +02:00
|
|
|
# See lutris/util/linux.py
|
2021-10-16 20:08:01 +02:00
|
|
|
requiredTools = [
|
2019-07-18 11:32:39 +02:00
|
|
|
xrandr
|
|
|
|
pciutils
|
|
|
|
psmisc
|
|
|
|
glxinfo
|
|
|
|
vulkan-tools
|
|
|
|
xboxdrv
|
|
|
|
pulseaudio
|
|
|
|
p7zip
|
|
|
|
xgamma
|
|
|
|
libstrangle
|
|
|
|
fluidsynth
|
2019-07-18 11:42:28 +02:00
|
|
|
xorgserver
|
2020-07-07 21:34:16 +02:00
|
|
|
xorg.setxkbmap
|
lutris: add xorg.xkbcomp
```
Traceback (most recent call last):
File "/nix/store/v1mzyrrnmm9xm7mhqps6pdxdyvkgb154-lutris-original-0.5.6/lib/python3.8/site-packages/lutris/exceptions.py", line 36, in wrapper
return function(*args, **kwargs)
File "/nix/store/v1mzyrrnmm9xm7mhqps6pdxdyvkgb154-lutris-original-0.5.6/lib/python3.8/site-packages/lutris/game.py", line 430, in configure_game
xkbcomp = subprocess.Popen(xkbcomp_command, stdin=subprocess.PIPE)
File "/nix/store/f87w21b91cws0wbsvyfn5vnlyv491czi-python3-3.8.3/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/nix/store/f87w21b91cws0wbsvyfn5vnlyv491czi-python3-3.8.3/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'xkbcomp'
```
2020-07-08 02:17:16 +02:00
|
|
|
xorg.xkbcomp
|
2022-12-17 04:38:58 +01:00
|
|
|
# bypass mount suid wrapper which does not work in fhsenv
|
|
|
|
util-linux
|
2019-07-18 11:42:28 +02:00
|
|
|
];
|
2021-07-03 14:46:45 +02:00
|
|
|
in
|
|
|
|
buildPythonApplication rec {
|
2022-12-17 04:39:52 +01:00
|
|
|
pname = "lutris-unwrapped";
|
2024-01-25 21:59:38 +01:00
|
|
|
version = "0.5.16";
|
2018-06-15 20:17:43 +02:00
|
|
|
|
2019-07-18 11:32:39 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lutris";
|
|
|
|
repo = "lutris";
|
2023-02-12 20:32:00 +01:00
|
|
|
rev = "v${version}";
|
2024-01-25 21:59:38 +01:00
|
|
|
hash = "sha256-Ed1bhugBe97XmY050A5jCPcnLj0Fd7qPX2p/Ab+YbOE=";
|
2019-07-18 11:32:39 +02:00
|
|
|
};
|
2018-06-15 20:17:43 +02:00
|
|
|
|
2024-04-26 22:24:03 +02:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
|
2019-07-18 11:32:39 +02:00
|
|
|
buildInputs = [
|
2020-06-25 08:08:25 +02:00
|
|
|
atk
|
|
|
|
gdk-pixbuf
|
|
|
|
glib-networking
|
|
|
|
gnome-desktop
|
|
|
|
gtk3
|
|
|
|
libnotify
|
|
|
|
pango
|
|
|
|
webkitgtk
|
2022-12-17 04:39:52 +01:00
|
|
|
] ++ (with gst_all_1; [
|
|
|
|
gst-libav
|
|
|
|
gst-plugins-bad
|
|
|
|
gst-plugins-base
|
|
|
|
gst-plugins-good
|
|
|
|
gst-plugins-ugly
|
|
|
|
gstreamer
|
|
|
|
]);
|
2018-06-15 20:17:43 +02:00
|
|
|
|
2022-12-07 01:11:38 +01:00
|
|
|
# See `install_requires` in https://github.com/lutris/lutris/blob/master/setup.py
|
2020-06-25 08:08:25 +02:00
|
|
|
propagatedBuildInputs = [
|
2022-12-07 01:11:38 +01:00
|
|
|
certifi
|
|
|
|
dbus-python
|
2021-04-03 09:24:37 +02:00
|
|
|
distro
|
2022-12-07 01:11:38 +01:00
|
|
|
evdev
|
2021-04-03 09:24:37 +02:00
|
|
|
lxml
|
2022-12-07 01:11:38 +01:00
|
|
|
pillow
|
2021-04-03 09:24:37 +02:00
|
|
|
pygobject3
|
2022-12-07 01:11:38 +01:00
|
|
|
pypresence
|
|
|
|
pyyaml
|
2021-04-03 09:24:37 +02:00
|
|
|
requests
|
2023-02-12 20:32:00 +01:00
|
|
|
protobuf
|
|
|
|
moddb
|
2019-07-18 11:32:39 +02:00
|
|
|
];
|
2018-06-15 20:17:43 +02:00
|
|
|
|
2022-04-02 22:22:45 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace lutris/util/magic.py \
|
|
|
|
--replace "'libmagic.so.1'" "'${lib.getLib file}/lib/libmagic.so.1'"
|
|
|
|
'';
|
|
|
|
|
2023-01-21 13:00:00 +01:00
|
|
|
nativeCheckInputs = [ xvfb-run nose2 flake8 ] ++ requiredTools;
|
2021-10-16 20:08:01 +02:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2022-12-17 04:39:52 +01:00
|
|
|
|
|
|
|
export HOME=$PWD
|
2021-10-16 20:08:01 +02:00
|
|
|
xvfb-run -s '-screen 0 800x600x24' make test
|
2022-12-17 04:39:52 +01:00
|
|
|
|
2021-10-16 20:08:01 +02:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2020-06-25 08:08:25 +02:00
|
|
|
# avoid double wrapping
|
|
|
|
dontWrapGApps = true;
|
|
|
|
makeWrapperArgs = [
|
2022-12-17 04:39:52 +01:00
|
|
|
"--prefix PATH : ${lib.makeBinPath requiredTools}"
|
2021-01-24 10:19:10 +01:00
|
|
|
"\${gappsWrapperArgs[@]}"
|
2019-07-18 11:32:39 +02:00
|
|
|
];
|
2018-06-15 20:17:43 +02:00
|
|
|
|
2019-07-18 11:32:39 +02:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://lutris.net";
|
|
|
|
description = "Open Source gaming platform for GNU/Linux";
|
2021-04-03 09:24:37 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2022-04-18 01:13:36 +02:00
|
|
|
maintainers = with maintainers; [ Madouura ];
|
2019-07-18 11:32:39 +02:00
|
|
|
platforms = platforms.linux;
|
2023-08-04 21:10:05 +02:00
|
|
|
mainProgram = "lutris";
|
2018-06-15 20:17:43 +02:00
|
|
|
};
|
|
|
|
}
|