at v192 41 lines 1.2 kB view raw
1{ stdenv, fetchurl, file, openssl, mlton 2, mysql, postgresql, sqlite 3}: 4 5stdenv.mkDerivation rec { 6 name = "urweb-${version}"; 7 version = "20150819"; 8 9 src = fetchurl { 10 url = "http://www.impredicative.com/ur/${name}.tgz"; 11 sha256 = "0gpdlq3aazx121k3ia94qfa4dyv04q7478x2p6hvcjamn18vk56n"; 12 }; 13 14 buildInputs = [ openssl mlton mysql postgresql sqlite ]; 15 16 prePatch = '' 17 sed -e 's@/usr/bin/file@${file}/bin/file@g' -i configure 18 ''; 19 20 preConfigure = '' 21 export PGHEADER="${postgresql}/include/libpq-fe.h"; 22 export MSHEADER="${mysql.lib}/include/mysql/mysql.h"; 23 export SQHEADER="${sqlite}/include/sqlite3.h"; 24 25 export CCARGS="-I$out/include \ 26 -L${mysql.lib}/lib/mysql \ 27 -L${postgresql}/lib \ 28 -L${sqlite}/lib"; 29 ''; 30 31 # Be sure to keep the statically linked libraries 32 dontDisableStatic = true; 33 34 meta = { 35 description = "Advanced purely-functional web programming language"; 36 homepage = "http://www.impredicative.com/ur/"; 37 license = stdenv.lib.licenses.bsd3; 38 platforms = stdenv.lib.platforms.linux; 39 maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; 40 }; 41}