From 9fc87313473d2079e01140b0aaff0c83a3f4d958 Mon Sep 17 00:00:00 2001
From: Kranium Gikos Mendoza <kranium@gikos.net>
Date: Thu, 1 Sep 2016 16:26:10 +0800
Subject: [PATCH] jimtcl: fix build

---
 pkgs/development/interpreters/jimtcl/default.nix | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/pkgs/development/interpreters/jimtcl/default.nix b/pkgs/development/interpreters/jimtcl/default.nix
index a67dc323601..4ac9b647956 100644
--- a/pkgs/development/interpreters/jimtcl/default.nix
+++ b/pkgs/development/interpreters/jimtcl/default.nix
@@ -14,6 +14,8 @@ stdenv.mkDerivation {
     sqlite readline asciidoc SDL SDL_gfx
   ];
 
+  NIX_CFLAGS_COMPILE = [ "-I${SDL.dev}/include/SDL" ];
+
   configureFlags = [
     "--with-ext=oo"
     "--with-ext=tree"
@@ -25,12 +27,6 @@ stdenv.mkDerivation {
     "--ipv6"
   ];
 
-  preConfigurePhase = ''
-    export CFLAGS=$(sdl-config --cflags)
-    export LDFLAGS=$(sdl-config --libs)
-  '';
-
-
   meta = {
     description = "An open source small-footprint implementation of the Tcl programming language";
     homepage = http://jim.tcl.tk/;