mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
39 lines
1.2 KiB
Nix
39 lines
1.2 KiB
Nix
{ stdenv, fetchurl, writeText, python2, dpkg, binutils }:
|
|
|
|
let arch = if stdenv.system == "x86_64-linux" then "amd64"
|
|
else if stdenv.system == "i686-linux" then "i386"
|
|
else abort "Unsupported platform";
|
|
|
|
input = builtins.getAttr arch (import ./runtime-generated.nix { inherit fetchurl; });
|
|
|
|
inputFile = writeText "steam-runtime.json" (builtins.toJSON input);
|
|
|
|
in stdenv.mkDerivation {
|
|
name = "steam-runtime-20151020";
|
|
|
|
nativeBuildInputs = [ python2 dpkg binutils ];
|
|
|
|
buildCommand = ''
|
|
mkdir -p $out
|
|
python2 ${./build-runtime.py} -i ${inputFile} -r $out
|
|
'';
|
|
|
|
passthru = rec {
|
|
inherit arch;
|
|
|
|
gnuArch = if arch == "amd64" then "x86_64-linux-gnu"
|
|
else if arch == "i386" then "i386-linux-gnu"
|
|
else abort "Unsupported architecture";
|
|
|
|
libs = [ "lib/${gnuArch}" "lib" "usr/lib/${gnuArch}" "usr/lib" ];
|
|
bins = [ "bin" "usr/bin" ];
|
|
};
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "The official runtime used by Steam";
|
|
homepage = https://github.com/ValveSoftware/steam-runtime;
|
|
license = licenses.unfreeRedistributable; # Includes NVIDIA CG toolkit
|
|
maintainers = with maintainers; [ hrdinka abbradar ];
|
|
};
|
|
}
|