Yes, it's posssible, but as I said, most of our ocaml4.07-* packages will need to be fixed to work with dune 2.

Le 2 octobre 2020 04:56:20 GMT-04:00, zimoun <zimon.toutoune@gmail.com> a écrit :
Hi,

Thank you for all the patch set! :-)


On Thu, 1 Oct 2020 at 16:07, Julien Lepiller <julien@lepiller.eu> wrote:

-(define-public dune
+(define dune-bootstrap
(package
(name "dune")
- (version "1.11.3")
+ (version "2.7.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1289,17 +1289,19 @@ full_split, cut, rcut, etc..")
(file-name (git-file-name name version))
(sha256
(base32
- "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))
+ "10qgx83fq8b522y9mpllrp0l5cgmr2bs5s7aix5img21hlbm34in"))))
(build-system ocaml-build-system)
(arguments
`(#:tests? #f; require odoc
- #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ #:make-flags (list "release"
+ (string-append "PREFIX=" (assoc-ref %outputs "out"))
(string-append "LIBDIR=" (assoc-ref %outputs "out")
"/lib/ocaml/site-lib"))
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
+ (mkdir-p "src/dune")
(invoke "./configure")
#t)))))
(home-page "https://github.com/ocaml/dune")

[...]

+(define-public dune
+ (package
+ (inherit dune-bootstrap)
+ (propagated-inputs
+ `(("dune-configurator" ,dune-configurator)))
+ (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))))))
+
(define-public ocaml4.07-dune
- (package-with-ocaml4.07 dune))
+ (package
+ (inherit (package-with-ocaml4.07 dune-bootstrap))
+ (version "1.11.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/dune")
+ (commit version)))
+ (file-name (git-file-name "dune" version))
+ (sha256
+ (base32
+ "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))

Can the v2.7.1 of 'dune-bootstrap' be compiled with OCaml4.07?

All the best,
simon