* [bug#45575] gnu: Update ocaml-merlin
@ 2020-12-31 19:54 John Soo
2020-12-31 22:00 ` [bug#45575] Add emacs-merlin John Soo
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: John Soo @ 2020-12-31 19:54 UTC (permalink / raw)
To: 45575
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
Hi Guix,
After working with ocaml a little, I felt the need to have a current
merlin. I kept the 4.07 variants of packages but I don't understand why
they exist.
Thanks!
John
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-ocaml-dot-merlin-reader.patch --]
[-- Type: text/x-patch, Size: 1712 bytes --]
From 1ee786693277dc7ec6b5a02a3f438171736399f0 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 09:25:08 -0800
Subject: [PATCH 1/9] gnu: Add ocaml-dot-merlin-reader.
* gnu/packages/ocaml.scm (ocaml-dot-merlin-reader): New variable.
---
gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c4900b6214..3c42505d6e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1753,6 +1753,34 @@ generation. It supports programs with single or multiple commands and respects
most of the POSIX and GNU conventions.")
(license license:bsd-3)))
+(define-public ocaml-dot-merlin-reader
+ (package
+ (name "ocaml-dot-merlin-reader")
+ (version "3.4.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://github.com/ocaml/merlin/releases/download/v3.4.2/merlin-v3.4.2.tbz")
+ (sha256
+ (base32
+ "109ai1ggnkrwbzsl1wdalikvs1zx940m6n65jllxj68in6bvidz1"))))
+ (build-system dune-build-system)
+ (inputs
+ `(("ocaml-biniou" ,ocaml-biniou)
+ ("ocaml-easy-format" ,ocaml-easy-format)
+ ("ocaml-yojson" ,ocaml-yojson)
+ ("ocaml-csexp" ,ocaml-csexp)
+ ("ocaml-result" ,ocaml-result)))
+ (arguments
+ `(#:package "dot-merlin-reader"
+ #:tests? #f ; No tests for dot-merlin-reader
+ ))
+ (home-page "https://github.com/ocaml/merlin")
+ (synopsis "Reads config files for merlin")
+ (description
+ "This package provices config file parsing for merlin.")
+ (license license:expat)))
+
(define-public ocaml-fmt
(package
(name "ocaml-fmt")
--
2.29.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-ocaml-version.patch --]
[-- Type: text/x-patch, Size: 2070 bytes --]
From 7dd63fafcdfb4da6d714aa1b24ca56aa6da74cd4 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 11:15:17 -0800
Subject: [PATCH 2/9] gnu: Add ocaml-version.
* gnu/packages/ocaml.scm (ocaml-version): New variable.
---
gnu/packages/ocaml.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3c42505d6e..601b52648c 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5933,3 +5933,37 @@ provides support to program with time varying values: declarative events and
signals. React doesn't define any primitive event or signal, it lets the
client chooses the concrete timeline.")
(license license:lgpl2.1+)))
+
+(define-public ocaml-version
+ (package
+ (name "ocaml-version")
+ (version "3.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://github.com/ocurrent/ocaml-version/releases/download/v3.0.0/ocaml-version-v3.0.0.tbz")
+ (sha256
+ (base32
+ "15vk8sh50p3f2mbv8z7mqnx76cffri36f2krp25zkkwix8jg7ci4"))))
+ (build-system dune-build-system)
+ (arguments
+ `(#:test-target ""))
+ (properties `((upstream-name . "ocaml-version")))
+ (home-page
+ "https://github.com/ocurrent/ocaml-version")
+ (synopsis
+ "Manipulate, parse and generate OCaml compiler version strings")
+ (description
+ "This library provides facilities to parse version numbers of the OCaml
+compiler, and enumerates the various official OCaml releases and configuration
+variants.
+
+OCaml version numbers are of the form major.minor.patch+extra, where the patch
+and extra fields are optional. This library offers the following
+functionality:
+
+- Functions to parse and serialise OCaml compiler version numbers.
+- Enumeration of official OCaml compiler version releases.
+- Test compiler versions for a particular feature (e.g. the @code{bytes} type)
+- Opam @url{https://opam.ocaml.org} compiler switch enumeration.")
+ (license license:expat)))
--
2.29.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-ocaml-sexplib0.patch --]
[-- Type: text/x-patch, Size: 3002 bytes --]
From aa809e99776de22f1c959958d5089520e14a76a3 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 11:36:57 -0800
Subject: [PATCH 3/9] gnu: Add ocaml-sexplib0.
* gnu/packages/ocaml.scm (ocaml-sexplib0): New variable.
* gnu/packages/ocaml.scm (ocaml4.07-sexplib0): Inherit from ocaml-sexplib0.
---
gnu/packages/ocaml.scm | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 601b52648c..d86555906b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4119,10 +4119,10 @@ an arbitrary number of processes. Cache coherence protocols and mutual
exclusion algorithms are typical examples of such systems.")
(license license:asl2.0)))
-(define-public ocaml4.07-sexplib0
+(define-public ocaml-sexplib0
(package
- (name "ocaml4.07-sexplib0")
- (version "0.11.0")
+ (name "ocaml-sexplib0")
+ (version "0.14.0")
(home-page "https://github.com/janestreet/sexplib0")
(source
(origin
@@ -4133,25 +4133,23 @@ exclusion algorithms are typical examples of such systems.")
(file-name (git-file-name name version))
(sha256
(base32
- "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
+ "06sb3zqhb3dwqsmn15d769hfgqwqhxnm52iqim9l767gvlwpmibb"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #f ;no tests
- #:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
+ `(#:tests? #f))
(synopsis "Library containing the definition of S-expressions and some
base converters")
(description "Part of Jane Street's Core library The Core suite of
libraries is an industrial strength alternative to OCaml's standard library
that was developed by Jane Street, the largest industrial user of OCaml.")
-(license license:expat)))
+ (license license:expat)))
-(define-public ocaml4.07-parsexp
+(define-public ocaml4.07-sexplib0
(package
- (name "ocaml4.07-parsexp")
+ (inherit ocaml-sexplib0)
+ (name "ocaml4.07-sexplib0")
(version "0.11.0")
- (home-page "https://github.com/janestreet/parsexp")
+ (home-page "https://github.com/janestreet/sexplib0")
(source
(origin
(method git-fetch)
@@ -4161,12 +4159,13 @@ that was developed by Jane Street, the largest industrial user of OCaml.")
(file-name (git-file-name name version))
(sha256
(base32
- "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"))))
- (build-system dune-build-system)
+ "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
(arguments
- `(#:ocaml ,ocaml-4.07
+ `(#:tests? #f ;no tests
+ #:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
+ #:dune ,ocaml4.07-dune))))
+
(inputs
`(("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
(synopsis "S-expression parsing library")
--
2.29.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-Add-ocaml-mdx.patch --]
[-- Type: text/x-patch, Size: 2339 bytes --]
From d9cac4f113ef8536d49b44668f2c2c7dac0fac17 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 11:43:03 -0800
Subject: [PATCH 4/9] gnu: Add ocaml-mdx.
* gnu/packages/ocaml.scm (ocaml-mdx): New variable.
---
gnu/packages/ocaml.scm | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d86555906b..707880dd5d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3965,6 +3965,49 @@ Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
format}. @code{craml} is released as a single binary (called @code{craml}).")
(license license:isc)))
+(define-public ocaml-mdx
+ (package
+ (name "ocaml-mdx")
+ (version "1.7.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://github.com/realworldocaml/mdx/releases/download/1.7.0/mdx-1.7.0.tbz")
+ (sha256
+ (base32
+ "0vpc30sngl3vpychrfvjwyi93mk311x3f2azlkxasgcj69fq03i7"))))
+ (build-system dune-build-system)
+ (inputs
+ `(("ocaml-fmt" ,ocaml-fmt)
+ ("ocaml-astring" ,ocaml-astring)
+ ("ocaml-logs" ,ocaml-logs)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)
+ ("ocaml-re" ,ocaml-re)
+ ("ocaml-result" ,ocaml-result)
+ ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
+ ("ocaml-version" ,ocaml-version)
+ ("ocaml-odoc" ,ocaml-odoc)))
+ (native-inputs
+ `(("ocaml-cppo" ,ocaml-cppo)
+ ("ocaml-lwt" ,ocaml-lwt)
+ ("ocaml-alcotest" ,ocaml-alcotest)))
+ (home-page
+ "https://github.com/realworldocaml/mdx")
+ (synopsis
+ "Executable code blocks inside markdown files")
+ (description
+ "This package allows execution of code blocks inside markdown files.
+There are (currently) two sub-commands, corresponding to two modes of
+operations: pre-processing (@command{ocaml-mdx pp}) and
+tests (@command{ocaml-mdx test}).
+
+The pre-processor mode allows to mix documentation and code, and to practice
+\"literate programming\" using markdown and OCaml.
+
+The test mode allows to ensure that shell scripts and OCaml fragments in the
+documentation always stays up-to-date.")
+ (license license:isc)))
+
(define-public ocaml4.07-merlin
(package
(name "ocaml4.07-merlin")
--
2.29.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0005-gnu-Add-ocaml-parsexp.patch --]
[-- Type: text/x-patch, Size: 2661 bytes --]
From 0f27bcdf4c47b9e4928589ac1dc0b48225d19d05 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 11:38:32 -0800
Subject: [PATCH 5/9] gnu: Add ocaml-parsexp.
* gnu/packages/ocaml.scm (ocaml-parsexp): New variable.
* gnu/packages/ocaml.scm (ocaml4.07-parsexp): Inherit from ocaml-parsexp.
---
gnu/packages/ocaml.scm | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 707880dd5d..b708f9398e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4209,8 +4209,25 @@ that was developed by Jane Street, the largest industrial user of OCaml.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))))
+(define-public ocaml-parsexp
+ (package
+ (name "ocaml-parsexp")
+ (version "0.14.0")
+ (home-page "https://github.com/janestreet/parsexp")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append home-page ".git"))
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rvbrf8ggh2imsbhqi15jzyyqbi3m5hzvy2iy2r4skx6m102mzpd"))))
+ (build-system dune-build-system)
(inputs
- `(("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
+ `(("ocaml-base" ,ocaml-base)
+ ("ocaml-sexplib0" ,ocaml-sexplib0)))
(synopsis "S-expression parsing library")
(description
"This library provides generic parsers for parsing S-expressions from
@@ -4239,11 +4256,12 @@ s-expressions from files or other external sources, you should use
parsexp_io.")
(license license:expat)))
-(define-public ocaml4.07-sexplib
+(define-public ocaml4.07-parsexp
(package
- (name "ocaml4.07-sexplib")
+ (inherit ocaml-parsexp)
+ (name "ocaml4.07-parsexp")
(version "0.11.0")
- (home-page "https://github.com/janestreet/sexplib")
+ (home-page "https://github.com/janestreet/parsexp")
(source
(origin
(method git-fetch)
@@ -4253,12 +4271,12 @@ parsexp_io.")
(file-name (git-file-name name version))
(sha256
(base32
- "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb"))))
- (build-system dune-build-system)
+ "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"))))
(arguments
`(#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
+ #:dune ,ocaml4.07-dune))))
+
(propagated-inputs
`(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
("ocaml-parsexp" ,ocaml4.07-parsexp)
--
2.29.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0006-gnu-Add-ocaml-sexplib.patch --]
[-- Type: text/x-patch, Size: 2407 bytes --]
From 81f930085e185efa330f92f5cf88529880a72b10 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 11:39:49 -0800
Subject: [PATCH 6/9] gnu: Add ocaml-sexplib.
* gnu/packages/ocaml.scm (ocaml-sexplib): New variable.
* gnu/packages/ocaml.scm (ocaml4.07-sexplib): Inherit from ocaml-sexplib.
---
gnu/packages/ocaml.scm | 39 +++++++++++++++++++++++++++++++++------
1 file changed, 33 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b708f9398e..4774a70d46 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4277,10 +4277,27 @@ parsexp_io.")
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))))
+(define-public ocaml-sexplib
+ (package
+ (name "ocaml-sexplib")
+ (version "0.14.0")
+ (home-page "https://github.com/janestreet/sexplib")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append home-page ".git"))
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "03c3j1ihx4pjbb0x3arrcif3wvp3iva2ivnywhiak4mbbslgsnzr"))))
+ (build-system dune-build-system)
(propagated-inputs
- `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
- ("ocaml-parsexp" ,ocaml4.07-parsexp)
- ("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
+ `(("ocaml-base" ,ocaml-base)
+ ("ocaml-num" ,ocaml-num)
+ ("ocaml-parsexp" ,ocaml-parsexp)
+ ("ocaml-sexplib0" ,ocaml-sexplib0)))
(synopsis
"Library for serializing OCaml values to and from S-expressions")
(description
@@ -4288,10 +4305,20 @@ parsexp_io.")
functionality for parsing and pretty-printing s-expressions.")
(license license:expat)))
-(define-public ocaml4.07-base
+(define-public ocaml4.07-sexplib
(package
- (name "ocaml4.07-base")
- (version "0.11.1")
+ (inherit ocaml-sexplib)
+ (name "ocaml4.07-sexplib")
+ (version "0.11.0")
+ (arguments
+ `(#:ocaml ,ocaml-4.07
+ #:findlib ,ocaml4.07-findlib
+ #:dune ,ocaml4.07-dune))
+ (propagated-inputs
+ `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
+ ("ocaml-parsexp" ,ocaml4.07-parsexp)
+ ("ocaml-sexplib0" ,ocaml4.07-sexplib0)))))
+
(home-page "https://github.com/janestreet/base")
(source
(origin
--
2.29.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #8: 0007-gnu-Add-ocaml-base.patch --]
[-- Type: text/x-patch, Size: 3106 bytes --]
From 17357e14c1ce843d4ee51d99ec85884d1dbe2f5f Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 11:40:59 -0800
Subject: [PATCH 7/9] gnu: Add ocaml-base.
* gnu/packages/ocaml.scm (ocaml-base): New variable.
* gnu/packages/ocaml.scm (ocaml4.07-base): Inherit from ocaml-base.
---
gnu/packages/ocaml.scm | 42 ++++++++++++++++++++++++++++++++++++------
1 file changed, 36 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4774a70d46..e0882d8f26 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4319,6 +4319,10 @@ functionality for parsing and pretty-printing s-expressions.")
("ocaml-parsexp" ,ocaml4.07-parsexp)
("ocaml-sexplib0" ,ocaml4.07-sexplib0)))))
+(define-public ocaml-base
+ (package
+ (name "ocaml-base")
+ (version "0.13.2")
(home-page "https://github.com/janestreet/base")
(source
(origin
@@ -4329,20 +4333,17 @@ functionality for parsing and pretty-printing s-expressions.")
(file-name (git-file-name name version))
(sha256
(base32
- "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
+ "0x6r37a8j9z9kvx9syg6qkm7zgmjg41m40hfshls98h61zlzp3gv"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
+ `(("ocaml-sexplib0" ,ocaml-sexplib0)))
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'build
;; make warnings non fatal (jbuilder behaviour)
(lambda _
- (invoke "dune" "build" "@install" "--profile=release"))))
- #:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
+ (invoke "dune" "build" "@install" "--profile=release"))))))
(synopsis
"Full standard library replacement for OCaml")
(description
@@ -4357,6 +4358,35 @@ provided by companion libraries such as
@url{https://github.com/janestreet/stdio, ocaml-stdio}.")
(license license:expat)))
+(define-public ocaml4.07-base
+ (package
+ (inherit ocaml-base)
+ (name "ocaml4.07-base")
+ (version "0.11.1")
+ (home-page "https://github.com/janestreet/base")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append home-page ".git"))
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
+ (propagated-inputs
+ `(("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ ;; make warnings non fatal (jbuilder behaviour)
+ (lambda _
+ (invoke "dune" "build" "@install" "--profile=release"))))
+ #:ocaml ,ocaml-4.07
+ #:findlib ,ocaml4.07-findlib
+ #:dune ,ocaml4.07-dune))))
+
(define-public ocaml4.07-compiler-libs
(package
(name "ocaml4.07-compiler-libs")
--
2.29.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #9: 0008-gnu-Add-ocaml-odoc.patch --]
[-- Type: text/x-patch, Size: 1919 bytes --]
From ba40db7ba6d91dc63ddeff68e24fae355a9e8769 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 11:42:34 -0800
Subject: [PATCH 8/9] gnu: Add ocaml-odoc.
* gnu/packages/ocaml.scm (ocaml-odoc): New variable.
---
gnu/packages/ocaml.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e0882d8f26..2975f866c9 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2424,6 +2424,39 @@ without a complete in-memory representation of the data.")
multitude of other network protocols (FTP/SMTP/RTSP/etc).")
(license license:isc)))
+(define-public ocaml-odoc
+ (package
+ (name "ocaml-odoc")
+ (version "1.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri "https://github.com/ocaml/odoc/releases/download/1.5.2/odoc-1.5.2.tbz")
+ (sha256
+ (base32
+ "0wa87h8q6izcc6rkzqn944vrb3hmc21lf0d0rmr8rhhbcvr66i6j"))))
+ (build-system dune-build-system)
+ (inputs
+ `(("ocaml-astring" ,ocaml-astring)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)
+ ("ocaml-fpath" ,ocaml-fpath)
+ ("ocaml-result" ,ocaml-result)
+ ("ocaml-tyxml" ,ocaml-tyxml)
+ ("ocaml-alcotest" ,ocaml-alcotest)
+ ("ocaml-markup" ,ocaml-markup)
+ ("ocaml-sexplib" ,ocaml-sexplib)))
+ (native-inputs
+ `(("ocaml-cppo" ,ocaml-cppo)
+ ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)))
+ ;; FIXME: Needs some extra inputs for tests to succeed
+ (arguments `(#:tests? #f))
+ (home-page "http://github.com/ocaml/odoc")
+ (synopsis "OCaml documentation generator")
+ (description
+ "Odoc is a documentation generator for OCaml. It reads doc comments,
+delimited with @code{(** ... *)}, and outputs HTML.")
+ (license license:isc)))
+
(define-public ocaml-base64
(package
(name "ocaml-base64")
--
2.29.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #10: 0009-gnu-Add-ocaml-merlin.patch --]
[-- Type: text/x-patch, Size: 3494 bytes --]
From 4427d0313fc07a8a2ff342575c7fe1e9c2a3b912 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 11:48:15 -0800
Subject: [PATCH 9/9] gnu: Add ocaml-merlin.
* gnu/packages/ocaml.scm (ocaml-merlin): New variable.
* gnu/packages/ocaml.scm (ocaml4.07-merlin): Inerhit from ocaml-merlin.
---
gnu/packages/ocaml.scm | 47 +++++++++++++++++++++++++++++++++++-------
1 file changed, 39 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2975f866c9..bb5d6c4e92 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -71,6 +71,7 @@
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
#:use-module (gnu packages virtualization)
+ #:use-module (gnu packages web)
#:use-module (gnu packages web-browsers)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -4041,8 +4042,45 @@ The test mode allows to ensure that shell scripts and OCaml fragments in the
documentation always stays up-to-date.")
(license license:isc)))
+(define-public ocaml-merlin
+ (package
+ (name "ocaml-merlin")
+ (version "3.4.2")
+ (home-page "https://ocaml.github.io/merlin/")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/merlin")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
+ (build-system dune-build-system)
+ (inputs
+ `(("ocaml-biniou" ,ocaml-biniou)
+ ("ocaml-yojson" ,ocaml-yojson)
+ ("ocaml-easy-format" ,ocaml-easy-format)))
+ (native-inputs
+ `(("ocaml-findlib" ,ocaml-findlib)
+ ("ocaml-mdx" ,ocaml-mdx)
+ ("jq" ,jq)))
+ (propagated-inputs
+ `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader)))
+ (arguments
+ `(#:package "merlin"
+ #:test-target "tests"))
+ (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
+ (description "Merlin is an editor service that provides modern IDE
+features for OCaml. Emacs and Vim support is provided out-of-the-box.
+External contributors added support for Visual Studio Code, Sublime Text and
+Atom.")
+ (license license:expat)))
+
(define-public ocaml4.07-merlin
(package
+ (inherit ocaml-merlin)
(name "ocaml4.07-merlin")
(version "3.2.2")
(home-page "https://ocaml.github.io/merlin/")
@@ -4056,7 +4094,6 @@ documentation always stays up-to-date.")
(sha256
(base32
"15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
- (build-system dune-build-system)
(inputs
`(("ocaml-biniou" ,(package-with-ocaml4.07 ocaml-biniou))
("ocaml-yojson" ,(package-with-ocaml4.07 ocaml-yojson))
@@ -4068,13 +4105,7 @@ documentation always stays up-to-date.")
#:tests? #f ;; Errors in tests in version 3.2.2
#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
- (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
- (description "Merlin is an editor service that provides modern IDE
-features for OCaml. Emacs and Vim support is provided out-of-the-box.
-External contributors added support for Visual Studio Code, Sublime Text and
-Atom.")
- (license license:expat)))
+ #:dune ,ocaml4.07-dune))))
(define-public ocaml4.07-gsl
(package
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#45575] Add emacs-merlin
2020-12-31 19:54 [bug#45575] gnu: Update ocaml-merlin John Soo
@ 2020-12-31 22:00 ` John Soo
2020-12-31 22:05 ` John Soo
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: John Soo @ 2020-12-31 22:00 UTC (permalink / raw)
To: 45575
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
I wanted to make autoloads and byte-compile the elisp provided by
merlin. After fiddling with the emacs output of ocaml-merlin, I found
it much easier to just make an emacs package for merlin. There is
further work to do to make a vim merlin package but I am not familiar
enough with vim to continue.
- John
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-emacs-merlin.patch --]
[-- Type: text/x-patch, Size: 3959 bytes --]
From 902849f8b8f586347dfd7810c46acc754a323592 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 13:34:57 -0800
Subject: [PATCH] gnu: Add emacs-merlin.
* gnu/packages/emacs-xyz.scm (emacs-merlin): New variable.
* gnu/packages/ocaml.scm (ocaml-merlin): [arguments] Remove elisp from output,
[description] Note location of emacs package.
---
gnu/packages/emacs-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++++
gnu/packages/ocaml.scm | 11 +++++++++--
2 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 0d8d6837e1..a97bd5ce1e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -135,6 +135,7 @@
#:use-module (gnu packages haskell-apps)
#:use-module (gnu packages ibus)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages ocaml)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages telephony)
@@ -646,6 +647,44 @@ process, passing on the arguments as command line arguments.")
"Magit-annex adds a few git-annex operations to the Magit interface.")
(license license:gpl3+))))
+(define-public emacs-merlin
+ (package
+ (name "emacs-merlin")
+ (version "3.4.2")
+ (home-page "https://ocaml.github.io/merlin/")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/merlin")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-auto-complete" ,emacs-auto-complete)
+ ("emacs-company" ,emacs-company)
+ ("emacs-iedit" ,emacs-iedit)
+ ("ocaml-merlin" ,ocaml-merlin)))
+ (arguments
+ `(#:tests? #f ; No tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'setup-emacs-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((merlin (assoc-ref inputs "ocaml-merlin")))
+ (chdir "emacs")
+ (for-each make-file-writable (find-files "." "\\.el$"))
+ (emacs-substitute-variables "merlin.el"
+ ("merlin-command"
+ (string-append merlin "/bin/ocamlmerlin")))))))))
+ (synopsis "Context sensitive completion for OCaml in Emacs")
+ (description "Merlin is an editor service that provides modern IDE
+features for OCaml. This package provides the Emacs support for Merlin.")
+ (license license:expat)))
+
(define-public emacs-minions
(package
(name "emacs-minions")
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bb5d6c4e92..5f8cf4613d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4070,12 +4070,19 @@ documentation always stays up-to-date.")
`(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader)))
(arguments
`(#:package "merlin"
- #:test-target "tests"))
+ #:test-target "tests"
+ #:phases
+ ;; FIXME: Make merlin.vim into a separate package.
+ (modify-phases %standard-phases
+ (add-after 'install 'remove-emacs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out") "/share/emacs")))))))
(synopsis "Context sensitive completion for OCaml in Vim and Emacs")
(description "Merlin is an editor service that provides modern IDE
features for OCaml. Emacs and Vim support is provided out-of-the-box.
External contributors added support for Visual Studio Code, Sublime Text and
-Atom.")
+Atom. To install the emacs specific package, use @code{emacs-ocaml-merlin}.")
(license license:expat)))
(define-public ocaml4.07-merlin
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#45575] Add emacs-merlin
2020-12-31 19:54 [bug#45575] gnu: Update ocaml-merlin John Soo
2020-12-31 22:00 ` [bug#45575] Add emacs-merlin John Soo
@ 2020-12-31 22:05 ` John Soo
2020-12-31 22:13 ` John Soo
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: John Soo @ 2020-12-31 22:05 UTC (permalink / raw)
To: 45575
[-- Attachment #1: Type: text/plain, Size: 93 bytes --]
Oops, I forgot to update the description of ocaml-merlin to reflect the
emacs package name.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-emacs-merlin.patch --]
[-- Type: text/x-patch, Size: 3953 bytes --]
From 26c6ad5f03381277b079165c27f75a12758e0ba5 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 13:34:57 -0800
Subject: [PATCH] gnu: Add emacs-merlin.
* gnu/packages/emacs-xyz.scm (emacs-merlin): New variable.
* gnu/packages/ocaml.scm (ocaml-merlin): [arguments] Remove elisp from output,
[description] Note location of emacs package.
---
gnu/packages/emacs-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++++
gnu/packages/ocaml.scm | 11 +++++++++--
2 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 0d8d6837e1..a97bd5ce1e 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -135,6 +135,7 @@
#:use-module (gnu packages haskell-apps)
#:use-module (gnu packages ibus)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages ocaml)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages telephony)
@@ -646,6 +647,44 @@ process, passing on the arguments as command line arguments.")
"Magit-annex adds a few git-annex operations to the Magit interface.")
(license license:gpl3+))))
+(define-public emacs-merlin
+ (package
+ (name "emacs-merlin")
+ (version "3.4.2")
+ (home-page "https://ocaml.github.io/merlin/")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/merlin")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-auto-complete" ,emacs-auto-complete)
+ ("emacs-company" ,emacs-company)
+ ("emacs-iedit" ,emacs-iedit)
+ ("ocaml-merlin" ,ocaml-merlin)))
+ (arguments
+ `(#:tests? #f ; No tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'setup-emacs-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((merlin (assoc-ref inputs "ocaml-merlin")))
+ (chdir "emacs")
+ (for-each make-file-writable (find-files "." "\\.el$"))
+ (emacs-substitute-variables "merlin.el"
+ ("merlin-command"
+ (string-append merlin "/bin/ocamlmerlin")))))))))
+ (synopsis "Context sensitive completion for OCaml in Emacs")
+ (description "Merlin is an editor service that provides modern IDE
+features for OCaml. This package provides the Emacs support for Merlin.")
+ (license license:expat)))
+
(define-public emacs-minions
(package
(name "emacs-minions")
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bb5d6c4e92..3e71f17dc8 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4070,12 +4070,19 @@ documentation always stays up-to-date.")
`(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader)))
(arguments
`(#:package "merlin"
- #:test-target "tests"))
+ #:test-target "tests"
+ #:phases
+ ;; FIXME: Make merlin.vim into a separate package.
+ (modify-phases %standard-phases
+ (add-after 'install 'remove-emacs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out") "/share/emacs")))))))
(synopsis "Context sensitive completion for OCaml in Vim and Emacs")
(description "Merlin is an editor service that provides modern IDE
features for OCaml. Emacs and Vim support is provided out-of-the-box.
External contributors added support for Visual Studio Code, Sublime Text and
-Atom.")
+Atom. To install the emacs specific package, use @code{emacs-merlin}.")
(license license:expat)))
(define-public ocaml4.07-merlin
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#45575] Add emacs-merlin
2020-12-31 19:54 [bug#45575] gnu: Update ocaml-merlin John Soo
2020-12-31 22:00 ` [bug#45575] Add emacs-merlin John Soo
2020-12-31 22:05 ` John Soo
@ 2020-12-31 22:13 ` John Soo
2020-12-31 22:32 ` [bug#45575] gnu: Update ocaml-merlin Julien Lepiller
2021-01-24 18:40 ` bug#45575: Already done John Soo
4 siblings, 0 replies; 7+ messages in thread
From: John Soo @ 2020-12-31 22:13 UTC (permalink / raw)
To: 45575
[-- Attachment #1: Type: text/plain, Size: 82 bytes --]
Another oops, I forgot to put the base32 hash string on the same line as
base32.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-emacs-merlin.patch --]
[-- Type: text/x-patch, Size: 3943 bytes --]
From 14377bc2ee93c17ac9ead0669a27b872ad86ab48 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 13:34:57 -0800
Subject: [PATCH] gnu: Add emacs-merlin.
* gnu/packages/emacs-xyz.scm (emacs-merlin): New variable.
* gnu/packages/ocaml.scm (ocaml-merlin): [arguments] Remove elisp from output,
[description] Note location of emacs package.
---
gnu/packages/emacs-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
gnu/packages/ocaml.scm | 11 +++++++++--
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 0d8d6837e1..8ab2c96db5 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -135,6 +135,7 @@
#:use-module (gnu packages haskell-apps)
#:use-module (gnu packages ibus)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages ocaml)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages telephony)
@@ -646,6 +647,43 @@ process, passing on the arguments as command line arguments.")
"Magit-annex adds a few git-annex operations to the Magit interface.")
(license license:gpl3+))))
+(define-public emacs-merlin
+ (package
+ (name "emacs-merlin")
+ (version "3.4.2")
+ (home-page "https://ocaml.github.io/merlin/")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/merlin")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-auto-complete" ,emacs-auto-complete)
+ ("emacs-company" ,emacs-company)
+ ("emacs-iedit" ,emacs-iedit)
+ ("ocaml-merlin" ,ocaml-merlin)))
+ (arguments
+ `(#:tests? #f ; No tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'setup-emacs-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((merlin (assoc-ref inputs "ocaml-merlin")))
+ (chdir "emacs")
+ (for-each make-file-writable (find-files "." "\\.el$"))
+ (emacs-substitute-variables "merlin.el"
+ ("merlin-command"
+ (string-append merlin "/bin/ocamlmerlin")))))))))
+ (synopsis "Context sensitive completion for OCaml in Emacs")
+ (description "Merlin is an editor service that provides modern IDE
+features for OCaml. This package provides the Emacs support for Merlin.")
+ (license license:expat)))
+
(define-public emacs-minions
(package
(name "emacs-minions")
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bb5d6c4e92..3e71f17dc8 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4070,12 +4070,19 @@ documentation always stays up-to-date.")
`(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader)))
(arguments
`(#:package "merlin"
- #:test-target "tests"))
+ #:test-target "tests"
+ #:phases
+ ;; FIXME: Make merlin.vim into a separate package.
+ (modify-phases %standard-phases
+ (add-after 'install 'remove-emacs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out") "/share/emacs")))))))
(synopsis "Context sensitive completion for OCaml in Vim and Emacs")
(description "Merlin is an editor service that provides modern IDE
features for OCaml. Emacs and Vim support is provided out-of-the-box.
External contributors added support for Visual Studio Code, Sublime Text and
-Atom.")
+Atom. To install the emacs specific package, use @code{emacs-merlin}.")
(license license:expat)))
(define-public ocaml4.07-merlin
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#45575] gnu: Update ocaml-merlin
2020-12-31 19:54 [bug#45575] gnu: Update ocaml-merlin John Soo
` (2 preceding siblings ...)
2020-12-31 22:13 ` John Soo
@ 2020-12-31 22:32 ` Julien Lepiller
2020-12-31 23:50 ` John Soo
2021-01-24 18:40 ` bug#45575: Already done John Soo
4 siblings, 1 reply; 7+ messages in thread
From: Julien Lepiller @ 2020-12-31 22:32 UTC (permalink / raw)
To: John Soo; +Cc: 45575
Le Thu, 31 Dec 2020 11:54:33 -0800,
John Soo <jsoo1@asu.edu> a écrit :
> Hi Guix,
>
> After working with ocaml a little, I felt the need to have a current
> merlin. I kept the 4.07 variants of packages but I don't understand
> why they exist.
>
> Thanks!
>
> John
>
>
Hi John,
thanks for the patches! I have pushed a series of patches from
Pukkamustard a few days ago that already add ocaml-merlin for the
latest OCaml compiler. Could you rebase your patches on master and
check if any of your patches is still relevant?
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#45575] gnu: Update ocaml-merlin
2020-12-31 22:32 ` [bug#45575] gnu: Update ocaml-merlin Julien Lepiller
@ 2020-12-31 23:50 ` John Soo
0 siblings, 0 replies; 7+ messages in thread
From: John Soo @ 2020-12-31 23:50 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 45575
[-- Attachment #1: Type: text/plain, Size: 686 bytes --]
Hi Julien,
Julien Lepiller <julien@lepiller.eu> writes:
> thanks for the patches! I have pushed a series of patches from
> Pukkamustard a few days ago that already add ocaml-merlin for the
> latest OCaml compiler. Could you rebase your patches on master and
> check if any of your patches is still relevant?
Oops! I have too many unmerged patches and rebasing is getting to be a
chore. ocaml-merlin on master looks good to me. The only thing I would
like to see is the emacs-merlin package. Having emacs-merlin as a
package is nice because it takes advantage of the guix autoload
machinery.
Here's a rebased patch. I understand if it needs more thought.
Thanks a lot!
- John
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-emacs-merlin.patch --]
[-- Type: text/x-patch, Size: 4594 bytes --]
From f9b6926c9e15780aab978dabc7fd6f65365200cb Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 31 Dec 2020 13:34:57 -0800
Subject: [PATCH] gnu: Add emacs-merlin.
* gnu/packages/emacs-xyz.scm (emacs-merlin): New variable.
* gnu/packages/ocaml.scm (ocaml-merlin): [arguments] Remove elisp from output,
[description] Note location of emacs package.
---
gnu/packages/emacs-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
gnu/packages/ocaml.scm | 19 ++++++++++++++-----
2 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 2f8bc1c7f2..b49106dfa3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -137,6 +137,7 @@
#:use-module (gnu packages haskell-apps)
#:use-module (gnu packages ibus)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages ocaml)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages telephony)
@@ -668,6 +669,43 @@ process, passing on the arguments as command line arguments.")
"Magit-annex adds a few git-annex operations to the Magit interface.")
(license license:gpl3+))))
+(define-public emacs-merlin
+ (package
+ (name "emacs-merlin")
+ (version "3.4.2")
+ (home-page "https://ocaml.github.io/merlin/")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/merlin")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-auto-complete" ,emacs-auto-complete)
+ ("emacs-company" ,emacs-company)
+ ("emacs-iedit" ,emacs-iedit)
+ ("ocaml-merlin" ,ocaml-merlin)))
+ (arguments
+ `(#:tests? #f ; No tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'setup-emacs-build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((merlin (assoc-ref inputs "ocaml-merlin")))
+ (chdir "emacs")
+ (for-each make-file-writable (find-files "." "\\.el$"))
+ (emacs-substitute-variables "merlin.el"
+ ("merlin-command"
+ (string-append merlin "/bin/ocamlmerlin")))))))))
+ (synopsis "Context sensitive completion for OCaml in Emacs")
+ (description "Merlin is an editor service that provides modern IDE
+features for OCaml. This package provides the Emacs support for Merlin.")
+ (license license:expat)))
+
(define-public emacs-minions
(package
(name "emacs-minions")
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2df16e7cd2..71a3a870e6 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3951,22 +3951,31 @@ format}. @code{craml} is released as a single binary (called @code{craml}).")
(base32
"0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
(build-system dune-build-system)
- (arguments '(#:package "merlin"
- #:test-target "tests"))
+ (arguments
+ `(#:package "merlin"
+ #:test-target "tests"
+ #:phases
+ ;; FIXME: Make merlin.vim into a separate package.
+ (modify-phases %standard-phases
+ (add-after 'install 'remove-emacs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out") "/share/emacs")))))))
(inputs
`(("ocaml-yojson" ,ocaml-yojson)
("ocaml-csexp" ,ocaml-csexp)
("ocaml-result" ,ocaml-result)))
(native-inputs
- `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader) ; required for tests
- ("ocaml-mdx" ,ocaml-mdx)
+ `(("ocaml-mdx" ,ocaml-mdx)
("jq" ,jq)))
+ (propagated-inputs
+ `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader)))
(home-page "https://ocaml.github.io/merlin/")
(synopsis "Context sensitive completion for OCaml in Vim and Emacs")
(description "Merlin is an editor service that provides modern IDE
features for OCaml. Emacs and Vim support is provided out-of-the-box.
External contributors added support for Visual Studio Code, Sublime Text and
-Atom.")
+Atom. To install the emacs specific package, use @code{emacs-merlin}.")
(license license:expat)))
;; ocaml-merlin 3.4.2 can not be built with old version of dune used in
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#45575: Already done
2020-12-31 19:54 [bug#45575] gnu: Update ocaml-merlin John Soo
` (3 preceding siblings ...)
2020-12-31 22:32 ` [bug#45575] gnu: Update ocaml-merlin Julien Lepiller
@ 2021-01-24 18:40 ` John Soo
4 siblings, 0 replies; 7+ messages in thread
From: John Soo @ 2021-01-24 18:40 UTC (permalink / raw)
To: 45575-done
Thanks for the patches!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-01-24 18:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-31 19:54 [bug#45575] gnu: Update ocaml-merlin John Soo
2020-12-31 22:00 ` [bug#45575] Add emacs-merlin John Soo
2020-12-31 22:05 ` John Soo
2020-12-31 22:13 ` John Soo
2020-12-31 22:32 ` [bug#45575] gnu: Update ocaml-merlin Julien Lepiller
2020-12-31 23:50 ` John Soo
2021-01-24 18:40 ` bug#45575: Already done John Soo
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).