xsw: fix build

This commit is contained in:
Nikolay Amiantov 2016-08-28 00:57:49 +03:00
parent 1db4cb750c
commit 5eaacbb981

View File

@ -1,6 +1,9 @@
{ stdenv, fetchFromGitHub, pkgconfig, autoconf, automake, SDL, SDL_image, SDL_ttf, SDL_gfx, flex, bison }:
{ stdenv, lib, fetchFromGitHub, pkgconfig, SDL, SDL_image, SDL_ttf, SDL_gfx, flex, bison }:
stdenv.mkDerivation rec {
let
makeSDLFlags = map (p: "-I${lib.getDev p}/include/SDL");
in stdenv.mkDerivation rec {
name = "xsw-${version}";
version = "0.1.2";
@ -11,7 +14,11 @@ stdenv.mkDerivation rec {
sha256 = "092vp61ngd2vscsvyisi7dv6qrk5m1i81gg19hyfl5qvjq5p0p8g";
};
buildInputs = [ pkgconfig autoconf automake SDL SDL_image SDL_ttf SDL_gfx flex bison ];
nativeBuildInputs = [ SDL SDL_image SDL_ttf SDL_gfx flex bison ];
buildInputs = [ pkgconfig ];
NIX_CFLAGS_COMPILE = makeSDLFlags [ SDL SDL_image SDL_ttf SDL_gfx ];
patches = [
./parse.patch # Fixes compilation error by avoiding redundant definitions.