mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
cc55a3ebcb
fixes build with disallowed aliases
45 lines
988 B
Nix
45 lines
988 B
Nix
{ stdenv, steamArch, lib, perl, pkgs, steam-runtime
|
|
, runtimeOnly ? false
|
|
}:
|
|
|
|
let
|
|
overridePkgs = lib.optionals (!runtimeOnly) (with pkgs; [
|
|
libgpgerror
|
|
libpulseaudio
|
|
alsaLib
|
|
openalSoft
|
|
libva1
|
|
libvdpau
|
|
vulkan-loader
|
|
gcc.cc
|
|
nss
|
|
nspr
|
|
]);
|
|
|
|
allPkgs = overridePkgs ++ [ steam-runtime ];
|
|
|
|
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" ];
|
|
|
|
in stdenv.mkDerivation rec {
|
|
name = "steam-runtime-wrapped";
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
builder = ./build-wrapped.sh;
|
|
|
|
passthru = {
|
|
inherit gnuArch libs bins overridePkgs;
|
|
arch = steamArch;
|
|
};
|
|
|
|
installPhase = ''
|
|
buildDir "${toString libs}" "${toString (map lib.getLib allPkgs)}"
|
|
buildDir "${toString bins}" "${toString (map lib.getBin allPkgs)}"
|
|
'';
|
|
}
|