aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages hugs)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages))

(define-public hugs
  (package
    (name "hugs")
    (version "Sep2006")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "https://www.haskell.org/hugs/downloads/2006-09/"
                          name "98-plus-" version ".tar.gz"))
      (sha256
       (base32
        "1mdy4aq4campgmnpc2qwq7bsbfhaxfsqdghbyyz2wms4lnfcmyma"))
      (patches (search-patches "hugs-fix-build.patch"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'configure 'fix-sh-n-cp
           (lambda _
             (substitute*
                 '("configure"
                   "libraries/configure"
                   "packages/time/configure"
                   "packages/base/configure"
                   "packages/X11/configure"
                   "packages/HGL/configure"
                   "packages/OpenAL/configure"
                   "packages/OpenGL/configure"
                   "packages/network/configure"
                   "packages/unix/configure"
                   "packages/Cabal/tests/HSQL/configure"
                   "packages/ALUT/configure"
                   "packages/GLUT/configure"
                   "packages/base/cbits/execvpe.c"
                   "packages/base/System/Process/Internals.hs"
                   "packages/Cabal/Distribution/attic"
                   "packages/Cabal/Distribution/Simple/Register.hs"
                   "packages/Cabal/Distribution/Simple/Hugs.hs"
                   "tools/hugs-hc"
                   "src/machdep.c"
                   "libraries/Makefile.in")
               (("/bin/sh") (which "sh")))
             (substitute* '("demos/Makefile.in"
                            "libraries/Makefile.in")
               (("/bin/cp") (which "cp")))
             #t)))
       #:tests? #f)) ; no test target
    (home-page "https://www.haskell.org/hugs/")
    (synopsis "Functional programming system based on Haskell 98")
    (description
     "Hugs 98 is an interpreter and programming environment for developing
Haskell programs.  It provides an almost complete implementation of Haskell
98, which includes expression and pattern syntax, primitives for monadic I/O,
with support for simple interactive programs, handle-based I/O, and exception
handling.  Hugs has a nearly complete implementation of the Haskell module
system and supports a number of advanced extensions.")
   (license (non-copyleft "file://License"
                          "See License in the distribution."))))
the garbage collector (/nix/var/nix/db/reserved). */ off_t reservedSize; /* Whether SQLite should use fsync. */ bool fsyncMetadata; /* Whether SQLite should use WAL mode. */ bool useSQLiteWAL; /* Whether to call sync() before registering a path as valid. */ bool syncBeforeRegistering; /* Whether to use substitutes. */ bool useSubstitutes; /* The Unix group that contains the build users. */ string buildUsersGroup; /* Whether to build in chroot. */ bool useChroot; /* Whether to impersonate a Linux 2.6 machine on newer kernels. */ bool impersonateLinux26; /* Whether to store build logs. */ bool keepLog; /* Whether to compress logs. */ enum CompressionType logCompression; /* Maximum number of bytes a builder can write to stdout/stderr before being killed (0 means no limit). */ unsigned long maxLogSize; /* Whether to cache build failures. */ bool cacheFailure; /* How often (in seconds) to poll for locks. */ unsigned int pollInterval; /* Whether to check if new GC roots can in fact be found by the garbage collector. */ bool checkRootReachability; /* Whether the garbage collector should keep outputs of live derivations. */ bool gcKeepOutputs; /* Whether the garbage collector should keep derivers of live paths. */ bool gcKeepDerivations; /* Whether to automatically replace files with identical contents with hard links. */ bool autoOptimiseStore; /* Whether to add derivations as a dependency of user environments (to prevent them from being GCed). */ bool envKeepDerivations; /* Whether to lock the Nix client and worker to the same CPU. */ bool lockCPU; /* Whether to show a stack trace if Nix evaluation fails. */ bool showTrace; private: SettingsMap settings, overrides; void _get(string & res, const string & name); void _get(bool & res, const string & name); void _get(StringSet & res, const string & name); void _get(Strings & res, const string & name); template<class N> void _get(N & res, const string & name); }; // FIXME: don't use a global variable. extern Settings settings; extern const string nixVersion; }