gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / mg.scm
CommitLineData
2184ed91
TUBK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.org>
25925725 3;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
2184ed91
TUBK
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages mg)
21 #:use-module (guix licenses)
22 #:use-module (guix download)
23 #:use-module (guix packages)
24 #:use-module (guix build-system gnu)
25925725 25 #:use-module (gnu packages libbsd)
2184ed91
TUBK
26 #:use-module (gnu packages ncurses)
27 #:use-module (gnu packages pkg-config))
28
29(define-public mg
30 (package
31 (name "mg")
25925725 32 (version "20161005")
2184ed91
TUBK
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "http://homepage.boetes.org/software/mg/mg-"
36 version ".tar.gz"))
37 (sha256
38 (base32
25925725 39 "0qaydk2cy765n9clghmi5gdnpwn15y2v0fj6r0jcm0v7d89vbz5p"))
2184ed91
TUBK
40 (modules '((guix build utils)))
41 (snippet
42 '(begin
25925725
EB
43 (substitute* "GNUmakefile"
44 (("/usr/bin/") ""))))))
2184ed91 45 (build-system gnu-build-system)
25925725
EB
46 (native-inputs
47 `(("pkg-config" ,pkg-config)))
2184ed91 48 (inputs
25925725
EB
49 `(("libbsd" ,libbsd)
50 ("ncurses" ,ncurses)))
2184ed91
TUBK
51 (arguments
52 ;; No test suite available.
53 '(#:tests? #f
25925725
EB
54 #:make-flags (list (string-append "prefix=" %output)
55 "CURSES_LIBS=-lncurses"
56 "CC=gcc")
57 #:phases (modify-phases %standard-phases
58 (delete 'configure)
59 (add-before 'install 'patch-tutorial-location
60 (lambda* (#:key outputs #:allow-other-keys)
61 (substitute* "mg.1"
62 (("/usr") (assoc-ref outputs "out")))
63 #t))
64 (add-after 'install 'install-tutorial
65 (lambda* (#:key outputs #:allow-other-keys)
66 (let* ((out (assoc-ref outputs "out"))
67 (doc (string-append out "/share/doc/mg")))
68 (install-file "tutorial" doc)
69 #t))))))
2184ed91
TUBK
70 (home-page "http://homepage.boetes.org/software/mg/")
71 (synopsis "Microscopic GNU Emacs clone")
72 (description
25925725
EB
73 "Mg (mg) is a GNU Emacs style editor, with which it is \"broadly\"
74compatible. This is a portable version of the mg maintained by the OpenBSD
75team.")
2184ed91 76 (license public-domain)))