Merge pull request #29857 from peterbb/master

urweb: support darwin, depend on gcc, fix paths.
This commit is contained in:
Austin Seipp 2017-09-27 16:01:20 -05:00 committed by GitHub
commit 04d449aa7b

View File

@ -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 ];
};
}