From 77660206f96eef8dd91485e295abb35d14c9a346 Mon Sep 17 00:00:00 2001 Message-Id: <77660206f96eef8dd91485e295abb35d14c9a346.1640218270.git.julien@lepiller.eu> In-Reply-To: References: From: Julien Lepiller Date: Wed, 22 Dec 2021 23:01:56 +0100 Subject: [PATCH 2/3] gnu: ocaml-migrate-parstree-1: Only build ocaml4.07 variant. * gnu/packages/ocaml.scm (ocaml-migrate-parsetree-1): Rename to... (ocaml4.07-migrate-parsetree): ...this. Use package-with-ocaml4.07. --- gnu/packages/ocaml.scm | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 9fc3280f89..fd410c1ba9 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -1810,31 +1810,32 @@ (define-public ocaml-migrate-parsetree (propagated-inputs (list ocaml-ppx-derivers ocamlbuild ocaml-result)) (properties `((upstream-name . "ocaml-migrate-parsetree") - ;; OCaml 4.07 packages require version 1.* - (ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-migrate-parsetree-1))))) + (ocaml4.07-variant . ,(delay ocaml4.07-migrate-parsetree)))) (synopsis "OCaml parsetree converter") (description "This library converts between parsetrees of different OCaml versions. For each version, there is a snapshot of the parsetree and conversion functions to the next and/or previous version.") (license license:lgpl2.1+))) -(define-public ocaml-migrate-parsetree-1 - (package - (inherit ocaml-migrate-parsetree) - (name "ocaml-migrate-parsetree-1") - (version "1.8.0") - (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree") - (source - (origin - (method git-fetch) - (uri (git-reference - (url home-page) - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq")))) - (properties '((upstream-name . "ocaml-migrate-parsetree"))))) +;; OCaml 4.07 packages require version 1.* +(define-public ocaml4.07-migrate-parsetree + (package-with-ocaml4.07 + (package + (inherit ocaml-migrate-parsetree) + (name "ocaml-migrate-parsetree") + (version "1.8.0") + (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree") + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq")))) + (properties '((upstream-name . "ocaml-migrate-parsetree")))))) (define-public ocaml4.07-ppx-tools-versioned (package @@ -1857,7 +1858,7 @@ (define-public ocaml4.07-ppx-tools-versioned #:test-target "." #:package "ppx_tools_versioned")) (propagated-inputs - (list (package-with-ocaml4.07 ocaml-migrate-parsetree-1))) + (list ocaml4.07-migrate-parsetree)) (properties `((upstream-name . "ppx_tools_versioned"))) (home-page "https://github.com/let-def/ppx_tools_versioned") (synopsis "Variant of ppx_tools") -- 2.34.0