summary refs log tree commit diff
path: root/pkgs/games/steam/default.nix
blob: a687270bfc9c616c9f95f24923d142b6f31d4996 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{stdenv, fetchurl, traceDeps ? false}:

stdenv.mkDerivation rec {
  name = "${program}-${version}";
  program = "steam";
  version = "1.0.0.49";

  src = fetchurl {
    url = "http://repo.steampowered.com/steam/pool/steam/s/steam/${program}_${version}.tar.gz";
    sha256 = "1c1gl5pwvb5gnnnqf5d9hpcjnfjjgmn4lgx8v0fbx1am5xf3p2gx";
  };

  traceLog = "/tmp/steam-trace-dependencies.log";

  installPhase = ''
    make DESTDIR=$out install
    mv $out/usr/* $out #*/
    rmdir $out/usr

    rm $out/bin/steamdeps
    ${stdenv.lib.optionalString traceDeps ''
      cat > $out/bin/steamdeps <<EOF
      #! /bin/bash
      echo \$1 >> ${traceLog}
      cat \$1 >> ${traceLog}
      echo >> ${traceLog}
      EOF
      chmod +x $out/bin/steamdeps
    ''}
  '';

  meta = {
    description = "A digital distribution platform";
    homepage = http://store.steampowered.com/;
    license = stdenv.lib.licenses.unfree;
    maintainers = [ stdenv.lib.maintainers.jagajaga ];
  };
}