pulsar: 1.124.0 -> 1.125.0 (#376475)
[NixPkgs.git] / pkgs / by-name / st / steam-unwrapped / package.nix
blob98e1ee15ac45bd34ee9c333b2fa30a244eddb612
2   lib,
3   stdenv,
4   fetchurl,
5   bash,
6 }:
8 stdenv.mkDerivation (finalAttrs: {
9   pname = "steam-unwrapped";
10   version = "1.0.0.81";
12   src = fetchurl {
13     # use archive url so the tarball doesn't 404 on a new release
14     url = "https://repo.steampowered.com/steam/archive/stable/steam_${finalAttrs.version}.tar.gz";
15     hash = "sha256-Gia5182s4J4E3Ia1EeC5kjJX9mSltsr+b+1eRtEXtPk=";
16   };
18   makeFlags = [
19     "DESTDIR=$(out)"
20     "PREFIX="
21   ];
23   postInstall = ''
24     rm $out/bin/steamdeps
26     # install udev rules
27     mkdir -p $out/etc/udev/rules.d/
28     cp ./subprojects/steam-devices/*.rules $out/etc/udev/rules.d/
29     substituteInPlace $out/etc/udev/rules.d/60-steam-input.rules \
30       --replace "/bin/sh" "${bash}/bin/bash"
32     # this just installs a link, "steam.desktop -> /lib/steam/steam.desktop"
33     rm $out/share/applications/steam.desktop
34     sed -e 's,/usr/bin/steam,steam,g' steam.desktop > $out/share/applications/steam.desktop
35   '';
37   passthru.updateScript = ./update.py;
39   meta = with lib; {
40     description = "Digital distribution platform";
41     longDescription = ''
42       Steam is a video game digital distribution service and storefront from Valve.
44       To install on NixOS, please use the option `programs.steam.enable = true`.
45     '';
46     homepage = "https://store.steampowered.com/";
47     license = licenses.unfreeRedistributable;
48     maintainers = lib.teams.steam.members ++ [ lib.maintainers.jagajaga ];
49     mainProgram = "steam";
50   };