lol
1{ stdenv, fetchurl, gcc
2, mesa_glu, libX11, libXext, libXcursor, libpulseaudio
3}:
4stdenv.mkDerivation {
5 name = "scrolls-2015-10-13";
6
7 meta = {
8 description = "A strategy collectible card game";
9 homepage = "https://scrolls.com/";
10 # http://www.reddit.com/r/Scrolls/comments/2j3pxw/linux_client_experimental/
11
12 platforms = [ "x86_64-linux" ];
13
14 license = stdenv.lib.licenses.unfree;
15 };
16
17 src = fetchurl {
18 url = "http://download.scrolls.com/client/linux.tar.gz";
19 sha256 = "ead1fd14988aa07041fedfa7f845c756cd5077a5a402d85bfb749cb669ececec";
20 };
21
22 libPath = stdenv.lib.makeLibraryPath [
23 gcc
24 mesa_glu
25 libX11
26 libXext
27 libXcursor
28 libpulseaudio
29 ];
30
31 phases = [ "unpackPhase" "installPhase" ];
32 installPhase = ''
33 mkdir -p "$out/opt/Scrolls"
34 cp -r ../Scrolls "$out/opt/Scrolls/"
35 cp -r ../Scrolls_Data "$out/opt/Scrolls/"
36 chmod +x "$out/opt/Scrolls/Scrolls"
37
38 patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
39 --set-rpath "$libPath" "$out/opt/Scrolls/Scrolls"
40
41 mkdir "$out/bin"
42 ln -s "$out/opt/Scrolls/Scrolls" "$out/bin/Scrolls"
43 '';
44
45}