all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Andreas Enge <andreas@enge.fr>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add laby.
Date: Fri, 12 Feb 2016 21:43:47 +0100	[thread overview]
Message-ID: <878u2pbqwr.fsf@gnu.org> (raw)
In-Reply-To: <20160212181333.GB8954@debian> (Andreas Enge's message of "Fri, 12 Feb 2016 19:13:33 +0100")

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

Andreas Enge writes:

> At the top of the patch file, could you add a quick explanation where it comes
> from and what it is needed for? Is it Guix specific, or an upstream
> bug?

Ah yes it is inpired by the Nix package, it is store-specific.  Ocaml
wants its "core" libraries all in the same prefix, store won't allow
that.

When I hit this, I wondered if we have a way to import/convert packages
and or what Guix's policy is on that.

Greetings,
Jan


[-- Attachment #2: 0001-gnu-Add-ocaml-findlib.patch --]
[-- Type: text/x-diff, Size: 6144 bytes --]

From 3a1afac94d0c25556af7a17c6dbb2dde44948831 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Thu, 11 Feb 2016 18:53:07 +0100
Subject: [PATCH] gnu: Add ocaml-findlib.

    * gnu/packages/ocaml.scm (ocaml-findlib): New variable.
    * gnu/packages/patches/ocaml-findlib-make-install.patch: New file.
    * gnu-system.am (dist_patch_DATA): Register it.
---
 gnu-system.am                                      |  1 +
 gnu/packages/ocaml.scm                             | 51 ++++++++++++++++++++++
 .../patches/ocaml-findlib-make-install.patch       | 20 +++++++++
 3 files changed, 72 insertions(+)
 create mode 100644 gnu/packages/patches/ocaml-findlib-make-install.patch

diff --git a/gnu-system.am b/gnu-system.am
index 3b5f241..0cd2ca3 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -624,6 +624,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/nvi-assume-preserve-path.patch		\
   gnu/packages/patches/nvi-dbpagesize-binpower.patch		\
   gnu/packages/patches/nvi-db4.patch				\
+  gnu/packages/patches/ocaml-findlib-make-install.patch	\
   gnu/packages/patches/openexr-missing-samples.patch		\
   gnu/packages/patches/openimageio-boost-1.60.patch		\
   gnu/packages/patches/openjpeg-CVE-2015-6581.patch		\
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 434b9d8..759fdad 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -42,6 +43,7 @@
   #:use-module (gnu packages lynx)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages m4)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages curl))
@@ -619,3 +621,52 @@ a collection of files and directories to be stored on different hosts
 brought up to date by propagating the changes in each replica
 to the other.")
     (license gpl3+)))
+
+(define-public ocaml-findlib
+  (package
+    (name "ocaml-findlib")
+    (version "1.6.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://download.camlcity.org/download/"
+                                  "findlib" "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721"))
+              (patches
+               (list (search-patch "ocaml-findlib-make-install.patch")))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("camlp4" ,camlp4)
+       ("m4" ,m4)
+       ("ocaml" ,ocaml)))
+    (arguments
+     `(#:tests? #f  ; no test suite
+       #:parallel-build? #f
+       #:make-flags (list "all" "opt")
+       #:phases (modify-phases %standard-phases
+                  (replace
+                   'configure
+                   (lambda* (#:key inputs outputs #:allow-other-keys)
+                     (let ((out (assoc-ref outputs "out")))
+                       (system*
+                        "./configure"
+                        "-bindir" (string-append out "/bin")
+                        "-config" (string-append out "/etc/ocamfind.conf")
+                        "-mandir" (string-append out "/share/man")
+                        "-sitelib" (string-append out "/lib/ocaml/site-lib")
+                        "-with-toolbox")))))))
+    (home-page "http://projects.camlcity.org/projects/findlib.html")
+    (synopsis "Management tool for OCaml libraries")
+    (description
+     "The \"findlib\" library provides a scheme to manage reusable software
+components (packages), and includes tools that support this scheme.  Packages
+are collections of OCaml modules for which metainformation can be stored.  The
+packages are kept in the filesystem hierarchy, but with strict directory
+structure.  The library contains functions to look the directory up that
+stores a package, to query metainformation about a package, and to retrieve
+dependency information about multiple packages.  There is also a tool that
+allows the user to enter queries on the command-line.  In order to simplify
+compilation and linkage, there are new frontends of the various OCaml
+compilers that can directly deal with packages.")
+    (license x11)))
diff --git a/gnu/packages/patches/ocaml-findlib-make-install.patch b/gnu/packages/patches/ocaml-findlib-make-install.patch
new file mode 100644
index 0000000..238f9ca
--- /dev/null
+++ b/gnu/packages/patches/ocaml-findlib-make-install.patch
@@ -0,0 +1,20 @@
+Ocaml wants to install its "core" libraries in OCAML_CORE_STDLIB.  That
+does not work in a store-based distribution.
+
+A solution was already provided by Nix
+
+    https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/ocaml/findlib/install_topfind.patch
+
+regenerated for Guix.
+
+--- findlib-1.5.3/src/findlib/Makefile	2014-09-16 13:21:46.000000000 +0200
++++ findlib-1.5.3/src/findlib/Makefile.new	2014-10-01 14:30:54.141082521 +0200
+@@ -89,7 +89,7 @@
+ install: all
+ 	mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)"
+ 	mkdir -p "$(prefix)$(OCAMLFIND_BIN)"
+-	test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)"
++	test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_SITELIB)"
+ 	files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \
+ 	cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)"
+ 	f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \
-- 
2.1.4


[-- Attachment #3: Type: text/plain, Size: 151 bytes --]


--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl

  reply	other threads:[~2016-02-12 20:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 20:27 [PATCH] gnu: Add laby Jan Nieuwenhuizen
2016-02-09 22:28 ` Christopher Allan Webber
2016-02-11 20:18   ` Efraim Flashner
2016-02-11 22:21     ` Jan Nieuwenhuizen
2016-02-12 18:09       ` Andreas Enge
2016-02-13  8:11         ` Jan Nieuwenhuizen
2016-02-13  8:43           ` Andreas Enge
2016-02-13 14:09             ` Jan Nieuwenhuizen
2016-02-13 14:16               ` Andreas Enge
2016-02-13 20:58                 ` Jan Nieuwenhuizen
2016-03-06 19:27                   ` Andreas Enge
2016-03-06 22:01                     ` Jan Nieuwenhuizen
2016-08-10 15:10                       ` Jan Nieuwenhuizen
2016-08-11 11:50                         ` 宋文武
2016-02-12 18:13       ` Andreas Enge
2016-02-12 20:43         ` Jan Nieuwenhuizen [this message]
2016-02-13  8:20           ` Andreas Enge
2016-02-13 13:08             ` Jan Nieuwenhuizen
2016-02-12 18:17       ` Andreas Enge
2016-02-12 18:30         ` Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878u2pbqwr.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=andreas@enge.fr \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.