xsokoban: Fix build
This commit is contained in:
parent
8cdc40dae0
commit
55eb741146
@ -11,16 +11,19 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ libX11 xproto libXpm libXt ];
|
buildInputs = [ libX11 xproto libXpm libXt ];
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = "-I${libXpm.dev}/include/X11";
|
||||||
|
|
||||||
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
sed -e 's/getline/my_getline/' -i score.c
|
sed -e 's/getline/my_getline/' -i score.c
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libXpm.dev}/include/X11"
|
|
||||||
for i in $NIX_CFLAGS_COMPILE; do echo $i; ls ''${i#-I}; done
|
|
||||||
chmod a+rw config.h
|
chmod a+rw config.h
|
||||||
cat >>config.h <<EOF
|
cat >>config.h <<EOF
|
||||||
#define HERE "@nixos-packaged"
|
#define HERE "@nixos-packaged"
|
||||||
#define WWW 0
|
#define WWW 0
|
||||||
#define OWNER "'$(whoami)'"
|
#define OWNER "'$(whoami)'"
|
||||||
#define ROOTDIR "'$out/lib/xsokoban'"
|
#define ROOTDIR "$out/lib/xsokoban"
|
||||||
#define ANYLEVEL 1
|
#define ANYLEVEL 1
|
||||||
#define SCOREFILE ".xsokoban-score"
|
#define SCOREFILE ".xsokoban-score"
|
||||||
#define LOCKFILE ".xsokoban-score-lock"
|
#define LOCKFILE ".xsokoban-score-lock"
|
||||||
@ -42,5 +45,6 @@ stdenv.mkDerivation rec {
|
|||||||
description = "X sokoban";
|
description = "X sokoban";
|
||||||
license = licenses.publicDomain;
|
license = licenses.publicDomain;
|
||||||
maintainers = [ maintainers.raskin ];
|
maintainers = [ maintainers.raskin ];
|
||||||
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user