mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 03:25:02 +00:00
lite: fix build error
This commit is contained in:
parent
aea7b5f08e
commit
ea5726aefe
|
@ -4,6 +4,7 @@
|
||||||
, lua52Packages
|
, lua52Packages
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
|
, openlibm
|
||||||
} :
|
} :
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -19,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper pkg-config ];
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
||||||
|
|
||||||
buildInputs = [ SDL2 lua52Packages.lua ];
|
buildInputs = [ SDL2 lua52Packages.lua openlibm ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# use system Lua 5.2
|
# use system Lua 5.2
|
||||||
|
@ -34,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||||
# extracted and adapted from build.sh
|
# extracted and adapted from build.sh
|
||||||
CC=$NIX_CC/bin/cc
|
CC=$NIX_CC/bin/cc
|
||||||
CFLAGS="-Wall -O3 -g -std=gnu11 -Isrc -DLUA_USE_POPEN $(pkg-config --cflags lua sdl2)"
|
CFLAGS="-Wall -O3 -g -std=gnu11 -Isrc -DLUA_USE_POPEN $(pkg-config --cflags lua sdl2)"
|
||||||
LDFLAGS="$(pkg-config --libs lua sdl2)"
|
LDFLAGS="$(pkg-config --libs lua sdl2 openlibm)"
|
||||||
for f in $(find src -name "*.c"); do
|
for f in $(find src -name "*.c"); do
|
||||||
$CC -c $CFLAGS $f -o "''${f//\//_}.o"
|
$CC -c $CFLAGS $f -o "''${f//\//_}.o"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue