File tree Expand file tree Collapse file tree 1 file changed +24
-8
lines changed Expand file tree Collapse file tree 1 file changed +24
-8
lines changed Original file line number Diff line number Diff line change 22 lib ,
33 stdenv ,
44 fetchurl ,
5+
56 libX11 ,
67} :
78
8- stdenv . mkDerivation rec {
9+ stdenv . mkDerivation ( finalAttrs : {
910 pname = "3dpong" ;
1011 version = "0.5" ;
12+
1113 src = fetchurl {
12- url = "ftp ://ftp. tuxpaint.org/unix/x/3dpong/src/3dpong-${ version } .tar.gz" ;
13- sha256 = "1ibb79sbzlbn4ra3n0qk22gqr6fg7q0jy6cm0wg2qj4z64c7hmdi " ;
14+ url = "https ://tuxpaint.org/ftp/ unix/x/3dpong/src/3dpong-${ finalAttrs . version } .tar.gz" ;
15+ hash = "sha256-sVV4GDGfSCweB5UZLwE+z5mMnxATAztUJnbRv3Q6a8U= " ;
1416 } ;
1517
16- buildInputs = [ libX11 ] ;
18+ postPatch = ''
19+ substituteInPlace src/3dpong.c --replace-fail \
20+ "#include <stdio.h>" \
21+ "#include <stdio.h>
22+ #include <unistd.h>"
23+
24+ substituteInPlace src/randnum.c --replace-fail \
25+ "#include <stdio.h>" \
26+ "#include <stdio.h>
27+ #include <stdlib.h>"
1728
18- preConfigure = ''
19- sed -i s,/usr/local,$out, Makefile
20- mkdir -p $out/bin
29+ substituteInPlace src/text.c --replace-fail \
30+ "#include <X11/Xlib.h>" \
31+ "#include <X11/Xlib.h>
32+ #include <string.h>"
2133 '' ;
2234
35+ buildInputs = [ libX11 ] ;
36+
37+ makeFlags = [ "PREFIX=$(out)" ] ;
38+
2339 meta = {
2440 homepage = "http://www.newbreedsoftware.com/3dpong/" ;
2541 description = "One or two player 3d sports game based on Pong from Atari" ;
2642 license = lib . licenses . gpl2Plus ;
2743 platforms = lib . platforms . linux ;
2844 } ;
29- }
45+ } )
You can’t perform that action at this time.
0 commit comments