summary refs log tree commit diff
path: root/pkgs/applications/misc/xsw
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-08-28 00:57:49 +0300
committerNikolay Amiantov <ab@fmap.me>2016-08-28 01:04:18 +0300
commit5eaacbb9818771700d88c0e18a97be200b7b109e (patch)
treeaef9948407bfd63a45969f88f859e8ce599d61a8 /pkgs/applications/misc/xsw
parent1db4cb750c98f5496ffbf27dddc4e0b2d1c9fb10 (diff)
downloadnixpkgs-5eaacbb9818771700d88c0e18a97be200b7b109e.tar
nixpkgs-5eaacbb9818771700d88c0e18a97be200b7b109e.tar.gz
nixpkgs-5eaacbb9818771700d88c0e18a97be200b7b109e.tar.bz2
nixpkgs-5eaacbb9818771700d88c0e18a97be200b7b109e.tar.lz
nixpkgs-5eaacbb9818771700d88c0e18a97be200b7b109e.tar.xz
nixpkgs-5eaacbb9818771700d88c0e18a97be200b7b109e.tar.zst
nixpkgs-5eaacbb9818771700d88c0e18a97be200b7b109e.zip
xsw: fix build
Diffstat (limited to 'pkgs/applications/misc/xsw')
-rw-r--r--pkgs/applications/misc/xsw/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/applications/misc/xsw/default.nix b/pkgs/applications/misc/xsw/default.nix
index 57ea8fe1921..b3a57e1cef2 100644
--- a/pkgs/applications/misc/xsw/default.nix
+++ b/pkgs/applications/misc/xsw/default.nix
@@ -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.