From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +PE/K7vbC2WsfAAAauVa8A:P1 (envelope-from ) for ; Thu, 21 Sep 2023 07:59:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +PE/K7vbC2WsfAAAauVa8A (envelope-from ) for ; Thu, 21 Sep 2023 07:59:23 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4C5903FDFC for ; Thu, 21 Sep 2023 07:59:22 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=aNaQpXd6; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=lepiller.eu ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695275963; a=rsa-sha256; cv=none; b=KLw4e8j0KY1yBpukJCvZsZB+I+8CEq8fYtMhI8MKyKVXz/MYuVS0OrNVNCKsw+L71AX0Q4 4Twgred6Og6Q6VGsfFX/H+sMicnUFovQYxqk6I+e0M0k1xAGCTSIvBMk4F8VfgE/lVHKNd 8cHYTc5uiB70IuyoK7TGLQvW3yRknZOhhCynwCyGrF3tv47LrIx7JgxAjJzTgeHTsVBb4s 4aw+c4D6dgI8J15Fi7p3Y7lnySapMvYgzt7bxt0MrIPenk2JsqMhkj9wnAGJcv+Vg4ig8g NjDgXtzFIfDoVy7zYSfZ1iNDtCf911IAGzO3AO/SehIhIo7oTGCVUJctTiCW2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695275963; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=obBnvxcT+xzFtnNDp8pgcwFFBP4LWfINQe+KwA4lsXs=; b=VObAjUfj94rr1otxZ751lfult6al5yiFRBwgA+9VHE6rI3eQKDkxBwMGZqy/B8jUxaDy1m 0rSznAUGwstuYibbgeKYz9/r/6Zt4C+bF3VzHV+sJND7Uw5hJEXAbX98XLBN8Tp5Jmff19 nVWtoWflEKUC99eLyr1FNT/YuVvJIUfc+Ap6PCloJP5cJ7ej3odYYjObMmCU4rRBfL8gzf u/B2nQ4q8oi1gLkg8t9PUYDe17TMz7N0CKAh2hnR+uhj2t+DyEhdaOVm5j6v1dR/UjXOQN HjOn/o2d23K6S+gZ7D4OR59K0p+mKb2wXKZCUsiSTyw9NcWIeRoaBVLRI8lMqA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=aNaQpXd6; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=lepiller.eu Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjCi4-0008OK-6A; Thu, 21 Sep 2023 01:58:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjCi1-0008Np-9w for help-guix@gnu.org; Thu, 21 Sep 2023 01:58:42 -0400 Received: from lepiller.eu ([89.234.186.109] helo=localhost) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjChy-0004cY-Rq for help-guix@gnu.org; Thu, 21 Sep 2023 01:58:41 -0400 Received: from localhost (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 468210d2; Thu, 21 Sep 2023 05:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=g8UbD31fuc7j Uw2BtMsX5UIm+r6YxfPMscmqT9S8I64=; b=aNaQpXd68Nn1byKixDgrz6hSXD8J SYK2mk0zPOg3UuMc6rO5SMnRiqP7grO27ipkf8deYAByveU2yS1I5rIPIAuFMUKK 3uGE5G7A56ShKiYN/1satyOb91OWQPU3YzpPhfjTvxqxH+ByY6e0Du7kv+Sl3zrR l5/ubXqV9zdp0TfBi1DH0QoqpLTf1hFWT0ZEsIVAcI1HrHHUV/r4bhIhmjUT/SE5 FI9ExLyh/iXtnR+mtNYPFF180Q/5RX2qq7n29Hg+MNC2bT373vfmHfmQdirul8mG 1NJbkwYuZySUCkLlmUhT2QCBIK1MO4Xsb1SiDQfNe+8D93aU+RSMR8Jl5w== Received: by localhost (OpenSMTPD) with ESMTPSA id 091bd93a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 21 Sep 2023 05:57:31 +0000 (UTC) Date: Thu, 21 Sep 2023 07:57:30 +0200 From: Julien Lepiller To: Erwan Jahier Cc: help-guix@gnu.org Subject: Re: dune-based package design trouble Message-ID: <20230921075730.6964647c@lepiller.eu> In-Reply-To: <87editff74.fsf@univ-grenoble-alpes.fr> References: <87editff74.fsf@univ-grenoble-alpes.fr> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=89.234.186.109; envelope-from=julien@lepiller.eu; helo=localhost X-Spam_score_int: 17 X-Spam_score: 1.7 X-Spam_bar: + X-Spam_report: (1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FSL_HELO_NON_FQDN_1=0.001, HELO_LOCALHOST=3.828, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.74 X-Spam-Score: -9.74 X-Migadu-Queue-Id: 4C5903FDFC X-Migadu-Scanner: mx2.migadu.com X-TUID: orjOIzS3FtWv Le Wed, 20 Sep 2023 09:52:03 +0200, Erwan Jahier a =C3=A9crit : > Hello, >=20 > I am a newguix tring to package some of his software. >=20 > Since I already have opam packages, I used =3Dguix import opam=3D, that > helped a little. Of course, my packages have dependancies, and not > all of them exist in the main guix repo. >=20 > I have able to build some of them (ocaml-junit, > ocaml-junit-alcotest, ocaml-yaml, ocaml-functory, > ocaml-conf-graphviz), but I am having trouble with > ocaml-mlgmpidl, for which the build phase isn't able to > (ocaml-)find gmp (see below). So I've tried to package ocaml-gmp, > but I am stuck again. >=20 > The error "/bin/sh: bad interpreter: No such file or directory" is > raised during the build phase that runs a =3Dconfigure=3D script > that refers to a non existing /bin/sh. >=20 > The problem is that the =3Dpatch-source-shebangs=3D phase cannot be > applied, as this =3Dconfigure=3D script is generated and run inside the > build phase (via =3Ddune build=3D). >=20 > I feel like it might be a dune expert question, but I try my luck > here. >=20 > Erwan. >=20 It's not very clean, but this works: (define-public ocaml-mlgmpidl (package (name "ocaml-mlgmpidl") (version "1.2.15") (source (origin (method url-fetch) (uri "https://github.com/nberth/mlgmpidl/archive/1.2.15.tar.gz") (sha256 (base32 "0hcaan4n5li0rnr55ilgxgd8w00lza9an6w4yj7v66dcb7plbasj")))) (build-system ocaml-build-system) (arguments `(#:tests? #f; #:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs inputs #:allow-other-keys) (substitute* "configure" ((".*query gmp.*") "echo \"$camlidl_prefix\n\" \n") (("camlidl_prefix=3D`\\$ocamlfind.*") (string-append "camlidl_prefix=3D\"" (assoc-ref inputs "camlidl") "/lib/ocaml/site-lib/camlidl\"\n"))) (invoke "./configure" "--prefix" (assoc-ref outputs "out"))))))) (inputs (list perl ocaml-findlib camlidl gmp mpfr ocaml-bigarray-compat)) (home-page "https://www.inrialpes.fr/pop-art/people/bjeannet/mlxxxidl-forge/mlgm= pidl/") (synopsis "OCaml interface to the GMP library") (description #f) (license license:lgpl2.1)) ; with linking exception )