nixpkgs/pkgs/games/steam/runtime.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

{ 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";
input = builtins.getAttr arch (import ./runtime-generated.nix { inherit fetchurl; });
2015-08-06 17:06:38 +00:00
inputFile = writeText "steam-runtime.json" (builtins.toJSON input);
2015-08-06 17:06:38 +00:00
in stdenv.mkDerivation {
name = "steam-runtime-2016-03-03";
nativeBuildInputs = [ python2 dpkg binutils ];
2015-08-06 17:06:38 +00:00
buildCommand = ''
2015-08-06 17:06:38 +00:00
mkdir -p $out
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;
license = licenses.unfreeRedistributable; # Includes NVIDIA CG toolkit
maintainers = with maintainers; [ hrdinka abbradar ];
2015-08-06 17:06:38 +00:00
};
}