From 8b034964d1e8aca285f601680634130fc954070c Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 23 Aug 2015 18:12:16 +0300 Subject: [PATCH] steam-runtime: split by architectures --- pkgs/games/steam/runtime.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/pkgs/games/steam/runtime.nix b/pkgs/games/steam/runtime.nix index 9c6b07fa1245..7e3e03b04e18 100644 --- a/pkgs/games/steam/runtime.nix +++ b/pkgs/games/steam/runtime.nix @@ -1,6 +1,10 @@ { stdenv, fetchurl }: -stdenv.mkDerivation rec { +let arch = if stdenv.system == "x86_64-linux" then "amd64" + else if stdenv.system == "i686-linux" then "i386" + else abort "Unsupported platform"; + +in stdenv.mkDerivation rec { name = "steam-runtime-${version}"; version = "2014-04-15"; @@ -13,13 +17,25 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out - mv * $out/ + mv ${arch}/* $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 = http://store.steampowered.com/; - license = licenses.unfreeRedistributable; + homepage = https://github.com/ValveSoftware/steam-runtime; + license = licenses.mit; maintainers = with maintainers; [ hrdinka ]; + hydraPlatforms = []; }; }