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