summary refs log tree commit diff
path: root/pkgs/games/steam/default.nix
diff options
context:
space:
mode:
authorCarles Pagès <page@cubata.homelinux.net>2012-12-08 11:52:54 +0100
committerEvgeny Egorochkin <phreedom@yandex.ru>2013-08-10 06:08:15 +0300
commit3cd37b550b80adee64e68065c835743651407ecb (patch)
tree07ba443602ce93f7cd19230d137cf67f36b20e1b /pkgs/games/steam/default.nix
parent0fc82b73be3c653e7eb121472246d7f54d1112a7 (diff)
downloadnixpkgs-3cd37b550b80adee64e68065c835743651407ecb.tar
nixpkgs-3cd37b550b80adee64e68065c835743651407ecb.tar.gz
nixpkgs-3cd37b550b80adee64e68065c835743651407ecb.tar.bz2
nixpkgs-3cd37b550b80adee64e68065c835743651407ecb.tar.lz
nixpkgs-3cd37b550b80adee64e68065c835743651407ecb.tar.xz
nixpkgs-3cd37b550b80adee64e68065c835743651407ecb.tar.zst
nixpkgs-3cd37b550b80adee64e68065c835743651407ecb.zip
Steam: first attempt at adding the beta client.
The script installed with this expression only copies a boostrapper and another
script to the user's home folder. Those also need to be patched to get on with
the installation.
Diffstat (limited to 'pkgs/games/steam/default.nix')
-rw-r--r--pkgs/games/steam/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/games/steam/default.nix b/pkgs/games/steam/default.nix
new file mode 100644
index 00000000000..3dbeed83885
--- /dev/null
+++ b/pkgs/games/steam/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, dpkg, makeWrapper, xz }:
+
+assert stdenv.system == "i686-linux";
+
+let version = "1.0.0.16"; in
+
+stdenv.mkDerivation rec {
+  name = "steam-${version}";
+
+  src = fetchurl {
+    url = "http://media.steampowered.com/client/installer/steam.deb";
+    sha256 = "0mx92f9hjjpg3blgmgp8sz0f3jg7m9hssdscipwybks258k8926m";
+  };
+
+  buildInputs = [ dpkg makeWrapper xz ];
+
+  phases = "installPhase";
+
+  installPhase = ''
+    mkdir -p $out
+    dpkg-deb -x $src $out
+    mv $out/usr/* $out/
+    rmdir $out/usr
+    substituteInPlace "$out/bin/steam" --replace "/bin/bash" "/bin/sh"
+    substituteInPlace "$out/bin/steam" --replace "/usr/" "$out/"
+    substituteInPlace "$out/bin/steam" --replace "\`basename \$0\`" "steam"
+    sed -i '/jockey-common/d' $out/bin/steam
+    wrapProgram "$out/bin/steam" --prefix PATH ":" \
+      "${xz}/bin"
+  '';
+
+  meta = {
+    description = "A digital distribution platform";
+    homepage = http://store.steampowered.com/;
+    license = "unfree";
+  };
+}