summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPeter Brottveit Bock <post@peterbb.net>2017-09-27 14:44:35 +0000
committerPeter Bock <post@peterbb.net>2017-09-27 17:06:01 +0200
commit76245e0b9dc0f13af031bf9ed2057046a16fb98f (patch)
tree5184b4204fe2d6b2c5af090e39e31b4547c8bd76 /pkgs
parent9824ca6975fcbf5a2da9e6ba98dacafaa12bb1b3 (diff)
downloadnixlib-76245e0b9dc0f13af031bf9ed2057046a16fb98f.tar
nixlib-76245e0b9dc0f13af031bf9ed2057046a16fb98f.tar.gz
nixlib-76245e0b9dc0f13af031bf9ed2057046a16fb98f.tar.bz2
nixlib-76245e0b9dc0f13af031bf9ed2057046a16fb98f.tar.lz
nixlib-76245e0b9dc0f13af031bf9ed2057046a16fb98f.tar.xz
nixlib-76245e0b9dc0f13af031bf9ed2057046a16fb98f.tar.zst
nixlib-76245e0b9dc0f13af031bf9ed2057046a16fb98f.zip
urweb: support darwin, depend on gcc, fix paths.
1. Add support for the darwing platform.
2. Depend on gcc, since the urweb executable will
   call gcc when it compiles an urweb-project.
3. Fix include path and link path for the dependencies.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/urweb/default.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix
index 7145a8f2fa04..bb8cb5f17461 100644
--- a/pkgs/development/compilers/urweb/default.nix
+++ b/pkgs/development/compilers/urweb/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchurl, file, openssl, mlton
-, mysql, postgresql, sqlite
+, mysql, postgresql, sqlite, gcc
 }:
 
 stdenv.mkDerivation rec {
@@ -20,12 +20,14 @@ stdenv.mkDerivation rec {
   configureFlags = "--with-openssl=${openssl.dev}";
 
   preConfigure = ''
-    export PGHEADER="${postgresql}/include/libpq-fe.h";
+    export PGHEADER="${postgresql.dev}/include/libpq-fe.h";
     export MSHEADER="${lib.getDev mysql.client}/include/mysql/mysql.h";
     export SQHEADER="${sqlite.dev}/include/sqlite3.h";
 
+    export CC="${gcc}/bin/gcc";
     export CCARGS="-I$out/include \
-                   -L${lib.getLib mysql.client}/lib/mysql \
+                   -L${openssl.out}/lib \
+                   -L${lib.getLib mysql.client}/lib \
                    -L${postgresql.lib}/lib \
                    -L${sqlite.out}/lib";
   '';
@@ -37,7 +39,7 @@ stdenv.mkDerivation rec {
     description = "Advanced purely-functional web programming language";
     homepage    = "http://www.impredicative.com/ur/";
     license     = stdenv.lib.licenses.bsd3;
-    platforms   = stdenv.lib.platforms.linux;
+    platforms   = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
     maintainers = [ stdenv.lib.maintainers.thoughtpolice stdenv.lib.maintainers.sheganinans ];
   };
 }