From 76245e0b9dc0f13af031bf9ed2057046a16fb98f Mon Sep 17 00:00:00 2001 From: Peter Brottveit Bock Date: Wed, 27 Sep 2017 14:44:35 +0000 Subject: [PATCH] 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. --- pkgs/development/compilers/urweb/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix index 7145a8f2fa0..bb8cb5f1746 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 ]; }; }