2017-10-16 01:58:04 +02:00
|
|
|
{ stdenv, steamArch, lib, perl, pkgs, steam-runtime
|
2015-08-23 17:17:15 +02:00
|
|
|
, runtimeOnly ? false
|
|
|
|
}:
|
|
|
|
|
2017-12-18 01:19:23 +01:00
|
|
|
let
|
2018-03-16 00:37:42 +01:00
|
|
|
overridePkgs = lib.optionals (!runtimeOnly) (with pkgs; [
|
2016-05-15 01:35:08 +02:00
|
|
|
libgpgerror
|
2015-08-23 17:17:15 +02:00
|
|
|
libpulseaudio
|
2021-06-10 04:57:09 +02:00
|
|
|
alsa-lib
|
2015-08-23 17:17:15 +02:00
|
|
|
openalSoft
|
2018-07-22 04:03:24 +02:00
|
|
|
libva1
|
2018-03-16 00:37:42 +01:00
|
|
|
libvdpau
|
2017-03-19 19:19:45 +01:00
|
|
|
vulkan-loader
|
2018-11-05 23:46:53 +01:00
|
|
|
gcc.cc.lib
|
2017-12-18 01:19:23 +01:00
|
|
|
nss
|
|
|
|
nspr
|
2018-10-09 01:02:24 +02:00
|
|
|
xorg.libxcb
|
2018-03-16 00:37:42 +01:00
|
|
|
]);
|
2015-08-23 17:17:15 +02:00
|
|
|
|
2018-03-16 00:37:42 +01:00
|
|
|
allPkgs = overridePkgs ++ [ steam-runtime ];
|
2016-05-15 01:35:08 +02:00
|
|
|
|
2017-10-16 01:58:04 +02:00
|
|
|
gnuArch = if steamArch == "amd64" then "x86_64-linux-gnu"
|
|
|
|
else if steamArch == "i386" then "i386-linux-gnu"
|
|
|
|
else abort "Unsupported architecture";
|
|
|
|
|
|
|
|
libs = [ "lib/${gnuArch}" "lib" "usr/lib/${gnuArch}" "usr/lib" ];
|
|
|
|
bins = [ "bin" "usr/bin" ];
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
in stdenv.mkDerivation {
|
2015-08-23 17:17:15 +02:00
|
|
|
name = "steam-runtime-wrapped";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
|
2015-10-20 16:08:44 +02:00
|
|
|
builder = ./build-wrapped.sh;
|
2015-08-23 17:17:15 +02:00
|
|
|
|
2017-10-16 01:58:04 +02:00
|
|
|
passthru = {
|
2018-03-16 00:37:42 +01:00
|
|
|
inherit gnuArch libs bins overridePkgs;
|
2017-10-16 01:58:04 +02:00
|
|
|
arch = steamArch;
|
|
|
|
};
|
|
|
|
|
2015-08-23 17:17:15 +02:00
|
|
|
installPhase = ''
|
2017-10-16 01:58:04 +02:00
|
|
|
buildDir "${toString libs}" "${toString (map lib.getLib allPkgs)}"
|
|
|
|
buildDir "${toString bins}" "${toString (map lib.getBin allPkgs)}"
|
2015-08-23 17:17:15 +02:00
|
|
|
'';
|
|
|
|
}
|