about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-05-15 21:22:54 +0200
committerPeter Simons <simons@cryp.to>2015-05-15 21:24:02 +0200
commitdec924f5a3066851cda5a6dd27d9e0b33db8c8f1 (patch)
tree4193d5d12a5a9160a5140fb0fd6dde6fb7117f23
parent5fa611cf87c93018c5b44a947883936ff39b26a7 (diff)
downloadnixlib-dec924f5a3066851cda5a6dd27d9e0b33db8c8f1.tar
nixlib-dec924f5a3066851cda5a6dd27d9e0b33db8c8f1.tar.gz
nixlib-dec924f5a3066851cda5a6dd27d9e0b33db8c8f1.tar.bz2
nixlib-dec924f5a3066851cda5a6dd27d9e0b33db8c8f1.tar.lz
nixlib-dec924f5a3066851cda5a6dd27d9e0b33db8c8f1.tar.xz
nixlib-dec924f5a3066851cda5a6dd27d9e0b33db8c8f1.tar.zst
nixlib-dec924f5a3066851cda5a6dd27d9e0b33db8c8f1.zip
hugs: fix build
-rw-r--r--pkgs/development/compilers/hugs/default.nix60
1 files changed, 22 insertions, 38 deletions
diff --git a/pkgs/development/compilers/hugs/default.nix b/pkgs/development/compilers/hugs/default.nix
index 14751799795a..f29df2c7c73c 100644
--- a/pkgs/development/compilers/hugs/default.nix
+++ b/pkgs/development/compilers/hugs/default.nix
@@ -1,9 +1,7 @@
-{ composableDerivation, fetchurl }:
+{ stdenv, fetchurl, bison }:
+
+stdenv.mkDerivation {
 
-let edf = composableDerivation.edf;
-    wwf = composableDerivation.wwf; in
-    
-composableDerivation.composableDerivation {} {
   name = "hugs98-200609";
 
   src = fetchurl {
@@ -11,43 +9,29 @@ composableDerivation.composableDerivation {} {
     sha256 = "3cf4d27673564cffe691bd14032369f646233f14daf2bc37c6c6df9f062b46b6";
   };
 
-  #encode all character I/O using the byte encoding
-  #determined by the locale in effect at that time. To
-  #require that the UTF-8 encoding is always used, give
-  #the --enable-char-encoding=utf8 option.
-  #[default=autodetect]
-  postUnpack = ''
-    find -type f | xargs sed -i 's@/bin/cp@cp@';
-  '';
-  
-  configurePhase = "./configure --prefix=\$out --enable-char-encoding=utf8 $configureFlags";
+  buildInputs = [ bison ];
 
-  flags =
-       edf { name = "pathCanonicalization"; feat="path-canonicalization"; }
-    // edf { name="timer"; }   # enable evaluation timing (for benchmarking Hugs)
-    // edf { name="profiling"; }# enable heap profiler
-    // edf { name="stackDumps"; feat="stack-dummps"; } # enable stack dump on stack overflow
-    // edf { name="largeBanner"; feat="large-banner"; } # disable multiline startup banner
-    // edf { name="internal-prims"; } # experimental primitives to access Hugs's innards
-    // edf { name="debug"; } # include C debugging information (for debugging Hugs)
-    // edf { name="tag"; } # runtime tag checking (for debugging Hugs)
-    // edf { name="lint"; } # enable "lint" flags (for debugging Hugs)
-    // edf { name="only98"; } # build Hugs to understand Haskell 98 only
-    // edf { name="ffi"; }
-      #--with-nmake            produce a Makefile compatible with nmake
-      #--with-gui              build Hugs for Windows GUI (Borland C++ only)
-    // wwf { name="pthreads"; } #   build Hugs using POSIX threads C library
-    ;
+  postUnpack = "find -type f -exec sed -i 's@/bin/cp@cp@' {} +";
 
-  cfg = {
-    largeBannerSupport = true; # seems to be default
-    char = { cfgOption = "--enable-char-encoding"; blocks = "utf8"; };
-    utf8 = { cfgOption = "--enable-char-encoding=utf8"; blocks="char"; };
-  };
+  configureFlags = [
+    "--enable-char-encoding=utf8"       # require that the UTF-8 encoding is always used
+    "--disable-path-canonicalization"
+    "--disable-timer"                   # evaluation timing (for benchmarking Hugs)
+    "--disable-profiling"               # heap profiler
+    "--disable-stack-dumps"             # stack dump on stack overflow
+    "--enable-large-banner"             # multiline startup banner
+    "--disable-internal-prims"          # experimental primitives to access Hugs's innards
+    "--disable-debug"                   # include C debugging information (for debugging Hugs)
+    "--disable-tag"                     # runtime tag checking (for debugging Hugs)
+    "--disable-lint"                    # "lint" flags (for debugging Hugs)
+    "--disable-only98"                  # build Hugs to understand Haskell 98 only
+    "--enable-ffi"
+    "--enable-pthreads"                 # build Hugs using POSIX threads C library
+  ];
 
   meta = {
-    license = "as-is"; # gentoo is calling it this way..
-    description = "Haskell interpreter";
     homepage = http://www.haskell.org/hugs;
+    description = "Haskell interpreter";
+    license = "as-is"; # gentoo is calling it this way
   };
 }