2015-10-20 14:08:44 +00:00
|
|
|
{ stdenv, fetchurl, writeText, python2, dpkg, binutils }:
|
2015-08-06 17:06:38 +00:00
|
|
|
|
2015-08-23 15:12:16 +00:00
|
|
|
let arch = if stdenv.system == "x86_64-linux" then "amd64"
|
|
|
|
else if stdenv.system == "i686-linux" then "i386"
|
|
|
|
else abort "Unsupported platform";
|
|
|
|
|
2015-10-20 14:08:44 +00:00
|
|
|
input = builtins.getAttr arch (import ./runtime-generated.nix { inherit fetchurl; });
|
2015-08-06 17:06:38 +00:00
|
|
|
|
2015-10-20 14:08:44 +00:00
|
|
|
inputFile = writeText "steam-runtime.json" (builtins.toJSON input);
|
2015-08-06 17:06:38 +00:00
|
|
|
|
2015-10-20 14:08:44 +00:00
|
|
|
in stdenv.mkDerivation {
|
2016-03-03 14:04:17 +00:00
|
|
|
name = "steam-runtime-2016-03-03";
|
2015-10-20 14:08:44 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ python2 dpkg binutils ];
|
2015-08-06 17:06:38 +00:00
|
|
|
|
2015-10-20 14:08:44 +00:00
|
|
|
buildCommand = ''
|
2015-08-06 17:06:38 +00:00
|
|
|
mkdir -p $out
|
2015-10-20 14:08:44 +00:00
|
|
|
python2 ${./build-runtime.py} -i ${inputFile} -r $out
|
2015-08-06 17:06:38 +00:00
|
|
|
'';
|
|
|
|
|
2015-08-23 15:12:16 +00:00
|
|
|
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" ];
|
|
|
|
};
|
|
|
|
|
2015-08-06 17:06:38 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "The official runtime used by Steam";
|
2015-08-23 15:12:16 +00:00
|
|
|
homepage = https://github.com/ValveSoftware/steam-runtime;
|
2015-10-20 14:08:44 +00:00
|
|
|
license = licenses.unfreeRedistributable; # Includes NVIDIA CG toolkit
|
|
|
|
maintainers = with maintainers; [ hrdinka abbradar ];
|
2015-08-06 17:06:38 +00:00
|
|
|
};
|
|
|
|
}
|