2019-06-16 20:59:06 +01:00
|
|
|
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, git, gtk, gettext,
|
2019-01-20 07:47:27 +00:00
|
|
|
gcc_multi, libressl, gnome3, steam }:
|
2017-12-25 13:58:31 +00:00
|
|
|
|
|
|
|
let
|
2019-01-20 07:48:02 +00:00
|
|
|
version = "0.7.3";
|
2017-12-25 13:58:31 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "linux-steam-integration";
|
|
|
|
inherit version;
|
2017-12-25 13:58:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-01-20 07:48:02 +00:00
|
|
|
owner = "clearlinux";
|
2017-12-25 13:58:31 +00:00
|
|
|
repo = "linux-steam-integration";
|
|
|
|
rev = "v${version}";
|
2019-01-20 07:48:02 +00:00
|
|
|
sha256 = "0brv3swx8h170ycxksb31sf5jvj85csfpx7gjlf6yrfz7jw2j6vp";
|
2017-12-25 13:58:31 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2019-01-20 07:47:27 +00:00
|
|
|
nativeBuildInputs = [ meson ninja pkgconfig git gettext gcc_multi ];
|
|
|
|
buildInputs = [ gtk libressl ];
|
|
|
|
|
2017-12-25 13:58:31 +00:00
|
|
|
# Patch lib paths (AUDIT_PATH and REDIRECT_PATH) in shim.c
|
|
|
|
# Patch path to lsi-steam in lsi-steam.desktop
|
|
|
|
# Patch path to zenity in lsi.c
|
|
|
|
postPatch = ''
|
2019-01-20 07:47:27 +00:00
|
|
|
substituteInPlace src/shim/shim.c --replace "/usr/" $out
|
|
|
|
substituteInPlace data/lsi-steam.desktop --replace "/usr/" $out
|
|
|
|
substituteInPlace src/lsi/lsi.c --replace zenity ${gnome3.zenity}/bin/zenity
|
|
|
|
substituteInPlace data/lsi-settings.desktop.in \
|
|
|
|
--replace "Name=Linux Steam Integration" "Name=Linux Steam Integration Settings"
|
2017-12-25 13:58:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
# Configure 64bit things
|
|
|
|
meson build \
|
|
|
|
-Dwith-shim=co-exist \
|
|
|
|
-Dwith-frontend=true \
|
2019-01-20 07:47:27 +00:00
|
|
|
-Dwith-steam-binary=${steam}/bin/steam \
|
2017-12-25 13:58:31 +00:00
|
|
|
-Dwith-new-libcxx-abi=true \
|
|
|
|
-Dwith-libressl-mode=native \
|
|
|
|
--prefix / \
|
|
|
|
--libexecdir lib \
|
|
|
|
--libdir lib \
|
|
|
|
--bindir bin
|
|
|
|
|
|
|
|
# Configure 32bit things
|
|
|
|
CC="gcc -m32" CXX="g++ -m32" meson build32 \
|
|
|
|
-Dwith-shim=none \
|
|
|
|
-Dwith-libressl-mode=native \
|
|
|
|
--prefix / \
|
|
|
|
--libexecdir lib32 \
|
|
|
|
--libdir lib32
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# Build 64bit things
|
|
|
|
ninja -C build
|
|
|
|
|
|
|
|
# Build 32bit things
|
|
|
|
ninja -C build32
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
DESTDIR="$out" ninja -C build install
|
|
|
|
DESTDIR="$out" ninja -C build32 install
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Steam wrapper to improve compability and performance";
|
|
|
|
longDescription = ''
|
|
|
|
Linux Steam Integration is a helper system to make the Steam Client and
|
|
|
|
Steam games run better on Linux. In a nutshell, LSI automatically applies
|
|
|
|
various workarounds to get games working, and fixes long standing bugs in
|
|
|
|
both games and the client
|
|
|
|
'';
|
2019-01-20 07:48:02 +00:00
|
|
|
homepage = https://github.com/clearlinux/linux-steam-integration;
|
2017-12-25 13:58:31 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = [ maintainers.etu ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|