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