Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchzip, 5 xorg, 6}: 7stdenv.mkDerivation rec { 8 pname = "xtris"; 9 version = "1.15"; 10 11 src = fetchzip { 12 url = "https://web.archive.org/web/20120315061213/http://www.iagora.com/~espel/xtris/xtris-${version}.tar.gz"; 13 sha256 = "1vqva99lyv7r6f9c7yikk8ahcfh9aq3clvwm4pz964wlbr9mj1v6"; 14 }; 15 16 patchPhase = '' 17 sed -i ' 18 s:/usr/local/bin:'$out'/bin: 19 s:/usr/local/man:'$out'/share/man: 20 s:mkdir:mkdir -p:g 21 s:^CFLAGS:#CFLAGS: 22 ' Makefile 23 24 sed -i '28i#include <time.h>' xtserv.c 25 sed -i '35i#include <time.h>' xtbot.c 26 ''; 27 buildInputs = [ xorg.libX11 ]; 28 29 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 30 31 meta = with lib; { 32 description = "Multi-player version of the classical game of Tetris, for the X Window system"; 33 homepage = "https://web.archive.org/web/20120315061213/http://www.iagora.com/~espel/xtris/xtris.html"; 34 license = licenses.gpl2Only; 35 platforms = platforms.unix; 36 }; 37}