1 { lib, stdenv, fetchurl, file, openssl, mlton
2 , libmysqlclient, postgresql, sqlite, gcc, icu
5 stdenv.mkDerivation rec {
10 url = "https://github.com/urweb/urweb/releases/download/${version}/${pname}-${version}.tar.gz";
11 sha256 = "0qh6wcxfk5kf735i5gqwnkdirnnmqhnnpkfz96gz144dgz2i0c5c";
14 buildInputs = [ openssl mlton libmysqlclient postgresql sqlite icu ];
17 sed -e 's@/usr/bin/file@${file}/bin/file@g' -i configure
20 configureFlags = [ "--with-openssl=${openssl.dev}" ];
23 export PGHEADER="${postgresql}/include/libpq-fe.h";
24 export MSHEADER="${libmysqlclient}/include/mysql/mysql.h";
25 export SQHEADER="${sqlite.dev}/include/sqlite3.h";
26 export ICU_INCLUDES="-I${icu.dev}/include";
28 export CC="${gcc}/bin/gcc";
29 export CCARGS="-I$out/include \
30 -L${lib.getLib openssl}/lib \
31 -L${libmysqlclient}/lib \
32 -L${postgresql.lib}/lib \
36 env.NIX_CFLAGS_COMPILE = toString [
38 "-Wno-error=use-after-free"
41 # Be sure to keep the statically linked libraries
42 dontDisableStatic = true;
45 description = "Advanced purely-functional web programming language";
46 homepage = "http://www.impredicative.com/ur/";
47 license = lib.licenses.bsd3;
48 platforms = lib.platforms.linux ++ lib.platforms.darwin;
49 maintainers = [ lib.maintainers.thoughtpolice lib.maintainers.sheganinans ];