From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QAmMDOirFWVKLAEAG6o9tA:P1 (envelope-from ) for ; Thu, 28 Sep 2023 18:38:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QAmMDOirFWVKLAEAG6o9tA (envelope-from ) for ; Thu, 28 Sep 2023 18:38:00 +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 7DEBD629D8 for ; Thu, 28 Sep 2023 18:37:59 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=LLezD0WA; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695919080; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=VdHj83ljXObjrqeI2Ovudrhj8JUvAuxNcynyVZynAWU=; b=EnoBARITmKpbM8zTVrCFCjqs2mlI/bdAcfFpvxHv1k1MXHUS2kndLfaNJjpcyc+HOgZVzG K50bVys2nhzYF7BIUJCG4JxvN2ko+v0Q1b4wSPbiIYjZyXNv1aaCv2WVwi1W/SkbwbWSam 8LmSNZA/bE/Xe/vFLlWedf+OZXaaJ8KS8uvu67MoE+NI54vmNqtT+Kt5nyOOFztk8l7J6H n5pV/aqHXjkfkjG1FUYNiln9QfdOGKp8ZNR9qsYTaEivdKCJTmka0+InM11fSGRr38LJ/y X2fywDnicwVa49iuL5Aktsdm6wY/P8qmdP0qqpUsPTszJ2aqThnHkyav28J1YQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695919080; a=rsa-sha256; cv=none; b=uL5HS8lynMCvp6IiaGiivEI0K3BuqcXNdWDUgg4WQnhJRIJVHXgQKSdrB+c1SsoEOqCmFv SOQojcLDwrI5gZYphGdm0RvRn7LwQNNKyo6biij+bD71KUqdmt49KK591uceWN3vSCgtiw +76P+xTkhxV+OOABqTUQH6HN2gh1nqwZ0Qo64iZ0Qth/18YPwKGlbTw+BIbD1OnWBTjEaz 7cdrG8Pb3rb94UL7rORIV6iYJ2iTlz0wPn4Y72Bg0vBEZwbcLWg+t1C8rAKUVPGhg7XAXD aaovAYCfN9jskTdPsi2Eo/KHAP8zhaOUG+7ie5P4vABpy8LFnyHmo0ZGk8JTXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=LLezD0WA; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlu1O-0000Oz-3y; Thu, 28 Sep 2023 12:37:50 -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 1qlu1M-0000Oa-1a for guix-patches@gnu.org; Thu, 28 Sep 2023 12:37:48 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qlu1L-0000EL-Pp for guix-patches@gnu.org; Thu, 28 Sep 2023 12:37:47 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qlu1a-0003GK-0E for guix-patches@gnu.org; Thu, 28 Sep 2023 12:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65853] [PATCH] gnu: scilab: Fix and hardcode script inputs. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Sep 2023 16:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65853 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves Cc: 65853@debbugs.gnu.org, Andreas Enge , Eric Bavier Received: via spool by 65853-submit@debbugs.gnu.org id=B65853.169591902512415 (code B ref 65853); Thu, 28 Sep 2023 16:38:01 +0000 Received: (at 65853) by debbugs.gnu.org; 28 Sep 2023 16:37:05 +0000 Received: from localhost ([127.0.0.1]:54415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlu0e-0003Ds-7h for submit@debbugs.gnu.org; Thu, 28 Sep 2023 12:37:04 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:44157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlu0L-0003C5-Qz for 65853@debbugs.gnu.org; Thu, 28 Sep 2023 12:36:58 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-405621baba7so104178025e9.0 for <65853@debbugs.gnu.org>; Thu, 28 Sep 2023 09:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695918986; x=1696523786; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=VdHj83ljXObjrqeI2Ovudrhj8JUvAuxNcynyVZynAWU=; b=LLezD0WA21tnkMH+57se61VZItTKCGCVooGzZgnYND33mAzaZ2uvtWBARCk1s5Vc/J g7s4RWQzwO1UI5ljShaQ44PCzEnspBTW0TE1BHQ9xbN5wg/F0LvFaXll+YaZkDfCSQoY Hwnm+zUPdiyZzFKIEFvHiWoe5NRPE2xg2wWVD/9OK0GuijDTYAqVcYw8ZHhKSpkxzWeh 7TfI41dDTulNmDBC5BpGVK1Q+EOb60fHC0FYr+obDonrnASASFVjYzcYBHI2uKbCebE6 AUAb0clqfFZ7Upr+Qbl00m+IbS+03oidYzXTHKsYOFPay5dUlPRUfvaXwDJEB0mZ2h// b7hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695918986; x=1696523786; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VdHj83ljXObjrqeI2Ovudrhj8JUvAuxNcynyVZynAWU=; b=SaBYMskBhYBbX3IjngmH+sxy+kEM8Rmt53gN/im5s7a3xO5ZPZPgobyzwJsun5rsSU rd4TRKL6684q2+wDUpLoiNZ7adO14SlyRMv/vmiPnuXeMWAqtrIsTVfgwBREtf1gY3NA kYYlYx0kSnG6lT6sn9ejq1o5VPs/frUGa/BFj3A4d7SL2f0hNLK3c8ZimOCgOOMHpYgy 2M6o6RgwmqeDcKGcZEkPxa1PJp6a1VpmKl6rbjJWm1HKELjw5Gz71bpKJ4qMZPiLUGhs c7gvgsjxuCohVoE0RfvLc1eYOSNXA2mmotSPscYK8iWhaqj+a411vekYbgwl+eHiosUi GP6w== X-Gm-Message-State: AOJu0Yyisq+P8VFni8JA4ejHuAAELIM5jTBfo/YnnbOJnOkLSqhvIXDU +5w/Hmhf0LNE7oUPcs82PeA= X-Google-Smtp-Source: AGHT+IGNOdWi8F8sBRhrmTEI4jbtEW10UB12QPOPwL/ZVjLkjigRzQD8yaju4GpTF41CHKtmUQMBTA== X-Received: by 2002:a05:600c:21ca:b0:405:3b1f:9691 with SMTP id x10-20020a05600c21ca00b004053b1f9691mr1791828wmj.11.1695918985403; Thu, 28 Sep 2023 09:36:25 -0700 (PDT) Received: from localhost ([2a02:ed3:916:6300:c3db:b80e:a694:a54f]) by smtp.gmail.com with ESMTPSA id h17-20020a05600c261100b0040642a1df1csm4638304wma.25.2023.09.28.09.36.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 09:36:25 -0700 (PDT) Date: Thu, 28 Sep 2023 19:36:23 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Nicolas Graves , 65853@debbugs.gnu.org, Andreas Enge , Eric Bavier References: <0852115dc8e706b80b05d57cfbfae64de79fdac5.1694362722.git.ngraves@ngraves.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6ZT+OmuJDgJ9uoeU" Content-Disposition: inline In-Reply-To: <0852115dc8e706b80b05d57cfbfae64de79fdac5.1694362722.git.ngraves@ngraves.fr> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.84 X-Spam-Score: -6.84 X-Migadu-Queue-Id: 7DEBD629D8 X-TUID: 9L1OTBPSvgRE --6ZT+OmuJDgJ9uoeU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable A couple of things I noticed: On Sun, Sep 10, 2023 at 06:18:42PM +0200, Nicolas Graves wrote: > * gnu/packages/maths.scm (scilab): Fix script inputs. > [inputs]: Reorder alphabetically. Add coreutils, grep, sed. > [arguments](phases): Add phase hardcode-script-inputs. > --- > gnu/packages/maths.scm | 43 ++++++++++++++++++++++++++++++------------ > 1 file changed, 31 insertions(+), 12 deletions(-) >=20 > diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm > index 38e71e18f8..40883d71c1 100644 > --- a/gnu/packages/maths.scm > +++ b/gnu/packages/maths.scm > @@ -8448,22 +8448,25 @@ (define-public scilab > (base32 "0phg9pn24yw98hbh475ik84dnikf1225b2knh7qbhdbdx6fm2d57"))= )) > (build-system gnu-build-system) > (native-inputs (list pkg-config gfortran)) > - (inputs (list libxml2 > + (inputs (list arpack-ng > + coreutils This can be coreutils-minimal > + curl > + fftw > + gettext-minimal > + grep > + hdf5-1.8 > + lapack > + libxml2 > + libx11 > + matio > + openblas > `(,pcre "bin") > `(,pcre "out") > readline > - hdf5-1.8 > - curl > - openblas > - lapack > - arpack-ng > - fftw > - gettext-minimal > + sed > suitesparse-3 > tcl > - tk > - libx11 > - matio)) > + tk)) > (arguments > `(#:tests? #f > #:configure-flags > @@ -8534,7 +8537,23 @@ (define-public scilab > (("if \\(array_size > 0\\)") > "if (*array_size > 0)")) > ;; Set SCIHOME to /tmp before macros compilation. > - (setenv "SCIHOME" "/tmp")))))) > + (setenv "SCIHOME" "/tmp"))) > + (add-after 'install 'hardcode-script-inputs > + (lambda _ > + (substitute* (string-append #$output "/bin/scilab") > + (("grep") > + #$(file-append (this-package-input "grep") "/bin/grep= ")) These can be (search-input-file #$inputs "/bin/grep") to make it easier to swap out the packages for something else if people want. > + (("sed") I checked the script, it should be ((" sed ") since there are a couple of instances of 'sed' in the script which aren't invocations of sed. > + #$(file-append (this-package-input "sed") "/bin/sed")) > + (("uname") > + #$(file-append (this-package-input "coreutils") > + "/bin/uname")) > + (("dirname") > + #$(file-append (this-package-input "coreutils") > + "/bin/dirname")) > + (("basename") > + #$(file-append (this-package-input "coreutils") > + "/bin/basename")))))))) Are there more binaries which should be substituted? I saw glxgears, chcon, a couple instances of java, pwd, valgrind, docbook paths. And then there's a couple of other scripts and binaries in the bin/ folder. I think it'd be better to use wrap-script or wrap-program and then use substitute* to strip the leading /usr/bin/ from the different calls to the different binaries. > (home-page "https://scilab.org") > (synopsis "Software for engineers and scientists") > (description "This package provides the non-graphical version of the= Scilab >=20 > base-commit: 2eb6df537c36da8bf8e81ff698421f6fb1bfd1ab > prerequisite-patch-id: eb618ab7b10483d917c308a38792af98baa517e2 > prerequisite-patch-id: 40b6c9f09f27833367a71ec25d77afae4d2a835e > prerequisite-patch-id: c12968d02d99c253f858586a86b16fa32d41f1c1 > prerequisite-patch-id: 09d995d48139f8e61183d5634cda13a01cdb50f7 > prerequisite-patch-id: 86baa45ec2aad977c8c8135f7613aa391155de6d > prerequisite-patch-id: 3425fbbff6a603d60b4e143ea2141aabf4ddc92c > prerequisite-patch-id: c373c01aab5dcba3503a97d51c62a595147a041c > prerequisite-patch-id: cda857c790b88c681c4e713c5f71e40291970daf > prerequisite-patch-id: 8e234d0f4d93d2aad499eec8842be3d28da98707 > prerequisite-patch-id: 5f664cb2fd995a53765c5ffc19a708ac795cc0c4 > prerequisite-patch-id: ed447cba9cf9b7e1a1b47aa27acb14f8f2da0a8e > prerequisite-patch-id: 9f80c5bbbfb8cd3347951c4d57634e93ffa79924 > prerequisite-patch-id: 1aaa9f0d466e2d6837f75844df48a98beb70ff24 > prerequisite-patch-id: 34502820d8c0355b3ed2638c457084edeaba029d > prerequisite-patch-id: a96258da9e78cfb9ac9893cdcdeb38b69b75f134 > --=20 > 2.41.0 >=20 >=20 >=20 --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --6ZT+OmuJDgJ9uoeU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmUVq4cACgkQQarn3Mo9 g1EG4hAAh8ME+50XTo564T8EC73SMtQi7n5FeQhzf16YBIT2ccY7lrOosPE3JnZm vEnqscq6w84GBsOYrzGc7K/VHri6r0WNnnKuOtMY18rP2rK+a3ktFSytHBKlwUgr yWnW42aHp1FaNp1Xz4MdscQ5QBhEAZiMaYX42+D+OHbzvWpRm7csy8+GOASOecQN 8HMhNIW7g4g4IFXQhEMqCAT3ehc5B+Ajeb58bqCWn0FVvNk4CEyJMs7fw8efvqA8 riQobkgHgWejTGM1lb7Z0M5cAc/ZPlYhmXBmxT+yKMrqbiepB6IWXew7bK7WOSIM sGkzxAyIVteFomx54U5z/66l+9Y/muaiarnWwnZLjYN6ts2tQUPtIxM5PjklFgAs zsXxhMO1S/j0yLzk8n2EwynuAMpnXntZZdItTkIVpGYxN4dsLmrRfunB0D1w4i61 dyEVWfV0mqs+YdnHTXatBdpvkZtPOmH5OwsHJrKnx7wGzA2hR7HgZHSUaolSgpfL sfVefMKenCm3d2YbX2EIED8f8/bcvyXWMOzdeg5NXAhnpop4m8AND39D0wx2WWmF 2bCuuwdfUQXS2HpIqr/q5qEShhyhF3JnL1a8uC/Iy6Opz8ZqbvAGdkYF9nPdPCjH znFRBo28MP2U6/5ZdANxb1Auq3WxUq8qek8BgFxTDw7FfEPtDUQ= =D1b/ -----END PGP SIGNATURE----- --6ZT+OmuJDgJ9uoeU--