unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 4db0386852e6f1769d45bf75c5c960ebc9078b19 6228 bytes (raw)
name: gnu/packages/mercury.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
 
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Brett Gilio <brettg@posteo.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/>.

;; TODO: Not all of these modules are needed.
(define-module (gnu packages mercury)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system cmake)
  #:use-module (gnu packages bdw-gc)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages commencement)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages ninja)
  #:use-module (gnu packages readline)
  #:use-module (gnu packages tex)
  #:use-module (gnu packages libunwind)
  #:use-module (gnu packages image)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages tls)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages texinfo)
  #:use-module (gnu packages flex)
  #:use-module (gnu packages shells)
  #:use-module (gnu packages bison)
  #:use-module (srfi srfi-1)
  #:use-module (ice-9 match)) ; match-lambda

(define-public mercury
  (package
    (name "mercury")
    (version "14.01.1")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://dl.mercurylang.org/release/mercury-srcdist-"
                                  version
                                  ".tar.gz"))
              (sha256
               (base32
                "12z8qi3da8q50mcsjsy5bnr4ia6ny5lkxvzy01a3c9blgbgcpxwq"))))
    (build-system gnu-build-system)
    (arguments
     `(#:imported-modules ((ice-9 match)
                           ,@%gnu-build-system-modules)
       #:modules ((ice-9 match)
                  (guix build gnu-build-system)
                  (guix build utils)
                  ,@%gnu-build-system-modules)
       #:tests? #f ; TODO: tests are cryptic. Figure it out later.
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch
           (lambda _ (substitute*
                         (list "Makefile"
                               "Mmakefile"
                               "scripts/mercury_update_interface.in"
                               "scripts/mercury_config.in"
                               "scripts/mmake.in"
                               "scripts/mmake.sh"
                               "scripts/Mmake.vars.in"
                               "scripts/mdb.in"
                               "scripts/rs6000_hack"
                               "scripts/fullarch"
                               "scripts/mmc.in"
                               "scripts/canonical_grade"
                               "scripts/mprof.in"
                               "scripts/gud.el"
                               "scripts/ml.in"
                               "scripts/canonical_grade.in"
                               "scripts/mdprof.in"
                               "scripts/vpath_find"
                               "scripts/mkfifo_using_mknod.in"
                               "scripts/prepare_install_dir.in"
                               "scripts/ml.sh"
                               "scripts/mprof_merge_runs"
                               "scripts/mtc"
                               "scripts/mgnuc.in"
                               "scripts/c2init.in"
                               "bindist/bindist.Makefile")
                       (("/bin/sh") (which "sh"))
                       (("/bin/pwd") (which "pwd"))
                       (("/bin/rm") (which "rm")))))
         (add-after 'unpack 'replace-boehm
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((boehm (assoc-ref inputs "libgc")))
               (map (match-lambda
                      ((src orig-name new-name)
                       (with-directory-excursion "."
                         (apply unpack (list #:source src))
                         (apply patch-source-shebangs (list #:source src)))
                       (delete-file-recursively new-name)
                       (invoke "mv" orig-name new-name)))
                    `((,boehm "source" "libgc")))))))))
    (native-inputs
     `(("texinfo" ,texinfo)
       ("flex" ,flex)
       ("tcsh", tcsh)
       ("bison" ,bison)
       ("readline" ,readline)
       ("libgc" ,libgc)))
    (synopsis "A pure logic programming language")
    (description "Mercury is a logic/functional programming language which 
combines the clarity and expressiveness of declarative programming with advanced
static analysis and error detection features.  Its highly optimized execution 
algorithm delivers efficiency far in excess of existing logic programming 
systems, and close to conventional programming systems. Mercury addresses 
the problems of large-scale program development, allowing modularity, 
separate compilation, and numerous optimization/time trade-offs.")
    (home-page "https://mercurylang.org")
    (license license:gpl2)))

(define-public mercury-minimal
  (package (inherit mercury)
	   (name "mercury-minimal")
	   (build-system gnu-build-system)
	   (arguments
            (substitute-keyword-arguments (package-arguments mercury)
              ((#:configure-flags flags ''())
               `(list "--enable-minimal-install"))))
           (inputs
            `(("gcc-toolchain" ,gcc-toolchain)))
           (synopsis "A pure logic programming language (used only for
compiling packages dependent on base Mercury)")))

debug log:

solving 4db0386852 ...
found 4db0386852 in https://yhetil.org/guix-patches/87o8wb7fbw.fsf@posteo.net/

applying [1/1] https://yhetil.org/guix-patches/87o8wb7fbw.fsf@posteo.net/
diff --git a/gnu/packages/mercury.scm b/gnu/packages/mercury.scm
new file mode 100644
index 0000000000..4db0386852

1:127: trailing whitespace.
    (description "Mercury is a logic/functional programming language which 
1:129: trailing whitespace.
static analysis and error detection features.  Its highly optimized execution 
1:130: trailing whitespace.
algorithm delivers efficiency far in excess of existing logic programming 
1:131: trailing whitespace.
systems, and close to conventional programming systems. Mercury addresses 
1:132: trailing whitespace.
the problems of large-scale program development, allowing modularity, 
Checking patch gnu/packages/mercury.scm...
Applied patch gnu/packages/mercury.scm cleanly.
warning: 5 lines add whitespace errors.

index at:
100644 4db0386852e6f1769d45bf75c5c960ebc9078b19	gnu/packages/mercury.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).