summary refs log tree commit diff
path: root/pkgs/development/compilers/urweb
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2015-09-09 07:32:23 -0500
committerAustin Seipp <aseipp@pobox.com>2015-09-09 07:40:35 -0500
commit3cff7030c02c87c7ed7fb212f64b2a21d3a04765 (patch)
tree0fb4dbb47f0ec0bbc0db47035116280bed0fc18f /pkgs/development/compilers/urweb
parentbd596f41f03e20c24f1902a5a93985ddb089af1b (diff)
downloadnixlib-3cff7030c02c87c7ed7fb212f64b2a21d3a04765.tar
nixlib-3cff7030c02c87c7ed7fb212f64b2a21d3a04765.tar.gz
nixlib-3cff7030c02c87c7ed7fb212f64b2a21d3a04765.tar.bz2
nixlib-3cff7030c02c87c7ed7fb212f64b2a21d3a04765.tar.lz
nixlib-3cff7030c02c87c7ed7fb212f64b2a21d3a04765.tar.xz
nixlib-3cff7030c02c87c7ed7fb212f64b2a21d3a04765.tar.zst
nixlib-3cff7030c02c87c7ed7fb212f64b2a21d3a04765.zip
nixpkgs: clean up, adopt urweb package
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/development/compilers/urweb')
-rw-r--r--pkgs/development/compilers/urweb/default.nix78
1 files changed, 21 insertions, 57 deletions
diff --git a/pkgs/development/compilers/urweb/default.nix b/pkgs/development/compilers/urweb/default.nix
index 861a12f1f09f..90656b564c79 100644
--- a/pkgs/development/compilers/urweb/default.nix
+++ b/pkgs/development/compilers/urweb/default.nix
@@ -1,77 +1,41 @@
-{ stdenv, fetchurl, file, openssl, mlton, mysql, postgresql, sqlite }:
+{ stdenv, fetchurl, file, openssl, mlton
+, mysql, postgresql, sqlite
+}:
 
 stdenv.mkDerivation rec {
-  pname = "urweb";
+  name = "urweb-${version}";
   version = "20150819";
-  name = "${pname}-${version}";
 
   src = fetchurl {
     url = "http://www.impredicative.com/ur/${name}.tgz";
     sha256 = "0gpdlq3aazx121k3ia94qfa4dyv04q7478x2p6hvcjamn18vk56n";
   };
 
-  buildInputs = [ stdenv.cc file openssl mlton mysql postgresql sqlite ];
+  buildInputs = [ openssl mlton mysql postgresql sqlite ];
 
   prePatch = ''
     sed -e 's@/usr/bin/file@${file}/bin/file@g' -i configure
-    '';
+  '';
 
-  preConfigure =
-    ''
-      export CC="${stdenv.cc}/bin/gcc";
-      export CCARGS="-I$out/include \
-                      -L${mysql.lib}/lib/mysql -L${postgresql}/lib -L${sqlite}/lib";
+  preConfigure = ''
+    export PGHEADER="${postgresql}/include/libpq-fe.h";
+    export MSHEADER="${mysql.lib}/include/mysql/mysql.h";
+    export SQHEADER="${sqlite}/include/sqlite3.h";
 
-      export PGHEADER="${postgresql}/include/libpq-fe.h";
-      export MSHEADER="${mysql.lib}/include/mysql/mysql.h";
-      export SQHEADER="${sqlite}/include/sqlite3.h";
-    '';
-
-  configureFlags = "--with-openssl=${openssl}"; 
+    export CCARGS="-I$out/include \
+                   -L${mysql.lib}/lib/mysql \
+                   -L${postgresql}/lib \
+                   -L${sqlite}/lib";
+  '';
 
+  # Be sure to keep the statically linked libraries
   dontDisableStatic = true;
 
   meta = {
-    description = "Construct dynamic web applications backed by SQL databases";
-    longDescription = ''
-      Ur is a programming language in the tradition of ML and Haskell, but
-      featuring a significantly richer type system. Ur is functional, pure,
-      statically-typed, and strict. Ur supports a powerful kind of
-      metaprogramming based on row types.
-
-      Ur/Web is Ur plus a special standard library and associated rules for
-      parsing and optimization. Ur/Web supports construction of dynamic web
-      applications backed by SQL databases. The signature of the standard
-      library is such that well-typed Ur/Web programs "don't go wrong" in a
-      very broad sense. Not only do they not crash during particular page
-      generations, but they also may not:
-
-      * Suffer from any kinds of code-injection attacks
-      * Return invalid HTML
-      * Contain dead intra-application links
-      * Have mismatches between HTML forms and the fields expected by their handlers
-      * Include client-side code that makes incorrect assumptions about the "AJAX"-style services that the remote web server provides
-      * Attempt invalid SQL queries
-      * Use improper marshaling or unmarshaling in communication with SQL databases or between browsers and web servers
-
-      This type safety is just the foundation of the Ur/Web methodology. It is
-      also possible to use metaprogramming to build significant application pieces
-      by analysis of type structure. For instance, the demo includes an ML-style
-      functor for building an admin interface for an arbitrary SQL table. The
-      type system guarantees that the admin interface sub-application that comes
-      out will always be free of the above-listed bugs, no matter which well-typed
-      table description is given as input.
-
-      The Ur/Web compiler also produces very efficient object code that does not use
-      garbage collection. These compiled programs will often be even more efficient
-      than what most programmers would bother to write in C. For example, the
-      standalone web server generated for the demo uses less RAM than the bash shell.
-      The compiler also generates JavaScript versions of client-side code, with no need
-      to write those parts of applications in a different language.
-    '';
-
-    homepage = http://www.impredicative.com/ur/;
-    license = stdenv.lib.licenses.bsd3;
-    platforms = [ "i686-linux" "x86_64-linux" ];
+    description = "Advanced purely-functional web programming language";
+    homepage    = "http://www.impredicative.com/ur/";
+    license     = stdenv.lib.licenses.bsd3;
+    platforms   = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }