Message ID | 874kkuoo75.fsf@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [bug#45133] Add ocaml reactiveData | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
Le mercredi 09 décembre 2020 à 18:59 +0100, zimoun a écrit : > I have not look into the details but since there is an opam file and > a > topkg.ml file, I am confused why usual OCaml build dance does not > work > here. I'm not sure that's the reason, but the ocaml build dance runs make install, and there's no install target in the Makefile, and the opam file does not need to have an install target because it installs everything. I think.
On Wed, 9 Dec 2020 at 19:05, divoplade <d@divoplade.fr> wrote: > I'm not sure that's the reason, but the ocaml build dance runs make > install, and there's no install target in the Makefile, and the opam > file does not need to have an install target because it installs > everything. I think. I do not know, I have not looked at the details, but for example: tar -jtvf $(guix build ocaml-uutf -S) does not even show a Makefile and the Guix package looks like: --8<---------------cut here---------------start------------->8--- (build-system ocaml-build-system) (arguments `(#:tests? #f #:build-flags (list "build") #:phases (modify-phases %standard-phases (delete 'configure)))) (native-inputs `(("ocamlbuild" ,ocamlbuild) ("opam" ,opam) ("topkg" ,ocaml-topkg))) --8<---------------cut here---------------end--------------->8--- That's why I find it weird to have to patch the reactiveData Makefile to be able to install it. I am probably wrong and Julien will correct me with their insight. :-) All the best, simon
The ocaml-build-system will use the Makefile if it exists, otherwise it runs opam-install -i --prefix=out --libdir=out/lib/ocaml/site-lib You need opam as an input. Le 9 décembre 2020 13:35:57 GMT-05:00, zimoun <zimon.toutoune@gmail.com> a écrit : >On Wed, 9 Dec 2020 at 19:05, divoplade <d@divoplade.fr> wrote: > >> I'm not sure that's the reason, but the ocaml build dance runs make >> install, and there's no install target in the Makefile, and the opam >> file does not need to have an install target because it installs >> everything. I think. > >I do not know, I have not looked at the details, but for example: > > tar -jtvf $(guix build ocaml-uutf -S) > >does not even show a Makefile and the Guix package looks like: > >--8<---------------cut here---------------start------------->8--- > (build-system ocaml-build-system) > (arguments > `(#:tests? #f > #:build-flags (list "build") > #:phases > (modify-phases %standard-phases > (delete 'configure)))) > (native-inputs > `(("ocamlbuild" ,ocamlbuild) > ("opam" ,opam) > ("topkg" ,ocaml-topkg))) >--8<---------------cut here---------------end--------------->8--- > >That's why I find it weird to have to patch the reactiveData Makefile >to be able to install it. I am probably wrong and Julien will correct >me with their insight. :-) > > >All the best, >simon
Hi, On Wed, 09 Dec 2020 at 14:12, Julien Lepiller <julien@lepiller.eu> wrote: > The ocaml-build-system will use the Makefile if it exists, otherwise > it runs opam-install -i --prefix=out --libdir=out/lib/ocaml/site-lib Therefore, instead of patching the Makefile, why not simple try to remove it see what happens? :-) All the best, simon
Hello, Le mercredi 09 décembre 2020 à 14:12 -0500, Julien Lepiller a écrit : > The ocaml-build-system will use the Makefile if it exists, The Makefile exists, but it is only partial (no install command). > otherwise it runs opam-install -i --prefix=out -- > libdir=out/lib/ocaml/site-lib If I delete the makefile in a snippet, the ocaml-build-system will not pass "native=true" to the pkg/build.ml script, so it fails. That's why there's a Makefile. If I replace my install command with opam-install, I get that opam- install does not exist (I have opam in inputs and native-inputs). Are you sure that this program exists? I don't see it in the opam package.
Le jeudi 10 décembre 2020 à 13:41 +0100, zimoun a écrit : > Therefore, instead of patching the Makefile, why not simple try to > remove it see what happens? :-) I tried to explain that in my previous email, if it's not clear please excuse my english skills ^^ the build fails because pkg/build.ml needs to be called with arguments (native=true or false) that ocaml-build- system ignores.
Le 10 décembre 2020 07:42:19 GMT-05:00, divoplade <d@divoplade.fr> a écrit : >Hello, > >Le mercredi 09 décembre 2020 à 14:12 -0500, Julien Lepiller a écrit : >> The ocaml-build-system will use the Makefile if it exists, > >The Makefile exists, but it is only partial (no install command). > >> otherwise it runs opam-install -i --prefix=out -- >> libdir=out/lib/ocaml/site-lib > >If I delete the makefile in a snippet, the ocaml-build-system will not >pass "native=true" to the pkg/build.ml script, so it fails. That's why >there's a Makefile. > >If I replace my install command with opam-install, I get that opam- >install does not exist (I have opam in inputs and native-inputs). Are >you sure that this program exists? I don't see it in the opam package. Sorry, opam-installer.
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index d23bd9108d..dee31730bf 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5866,47 +5866,47 @@ generate OCaml code from .glade files), libpanel, librsvg and quartz.") ;; Version 2 only, with linking exception. (license license:lgpl2.0))) -(define ocaml-reactiveData +(define-public ocaml-reactivedata ;; Future releases will use dune. (package - (name "ocaml-reactiveData") + (name "ocaml-reactivedata") (version "0.2.2") - (source - (origin - (method url-fetch) - (uri "https://github.com/ocsigen/reactiveData/archive/0.2.2.tar.gz") - (sha256 - (base32 - "0jzagyp4zla28wykvcgqwd8df71ir0vb4s8akp02cfacd5v86sng")) - (snippet - `(begin - (let ((makefile (open-file "Makefile" "a"))) - (display " + (source (origin + (method url-fetch) + (uri "https://github.com/ocsigen/reactiveData/archive/0.2.2.tar.gz") + (sha256 + (base32 + "0jzagyp4zla28wykvcgqwd8df71ir0vb4s8akp02cfacd5v86sng")) + (snippet + `(begin + (let ((makefile (open-file "Makefile" "a"))) + (display " install: \tocamlfind install reactiveData pkg/META _build/src/reactiveData.{a,cma,cmi,cmx,cmxa,cmxs} " makefile) - (close-port makefile)) - #t)))) + (close-port makefile)) + #t)))) (arguments `(#:phases (modify-phases %standard-phases (delete 'configure) (add-before 'build 'fix-deprecated - (lambda _ - (substitute* - "src/reactiveData.ml" - (("Pervasives.compare") "compare")) - #t))))) + (lambda _ + (substitute* + "src/reactiveData.ml" + (("Pervasives.compare") "compare")) + #t))))) (build-system ocaml-build-system) (native-inputs `(("ocamlbuild" ,ocamlbuild))) (propagated-inputs `(("ocaml-react" ,ocaml-react))) - (home-page - "https://github.com/ocsigen/reactiveData") - (synopsis - "Declarative events and signals for OCaml") + (home-page "https://github.com/ocsigen/reactiveData") + (synopsis "Declarative events and signals for OCaml") (description - "React is an OCaml module for functional reactive programming (FRP). It 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.") + "React is an OCaml module for functional reactive programming (FRP). It +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+)))