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