From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFGt2-00039t-Fa for guix-patches@gnu.org; Thu, 16 Nov 2017 04:55:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFGsw-0002oU-C4 for guix-patches@gnu.org; Thu, 16 Nov 2017 04:55:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:33920) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFGsw-0002o2-93 for guix-patches@gnu.org; Thu, 16 Nov 2017 04:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eFGsw-0000TX-1U for guix-patches@gnu.org; Thu, 16 Nov 2017 04:55:02 -0500 Subject: bug#27344: [PATCH v4 3/3] gnu: Add qucs-s. Resent-To: guix-patches@gnu.org Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87tvyksmyt.fsf@foradis.org> <20171027141819.21006-1-theodoros@foradis.org> <20171027141819.21006-3-theodoros@foradis.org> <87bmksa9xz.fsf@gnu.org> <87o9ocsm4r.fsf@foradis.org> Date: Thu, 16 Nov 2017 10:54:44 +0100 In-Reply-To: <87o9ocsm4r.fsf@foradis.org> (Theodoros Foradis's message of "Wed, 08 Nov 2017 19:42:12 +0200") Message-ID: <87h8tuim57.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Theodoros Foradis Cc: 27344-done@debbugs.gnu.org Hi Theodoros, Theodoros Foradis skribis: > Ludovic Court=C3=A8s writes: > >> Theodoros Foradis skribis: >> >>> * gnu/packages/engineering.scm (qucs-s): New variable. >> >> There seems to be a lot of duplication with =E2=80=98qucs=E2=80=99. Wou= ld it be >> possible to inherit from qucs, thereby reusing its phases, and simply >> provide any extra phase that=E2=80=99s needed? > > Some paths are different in those two packages. For example: > Qucs: >> (substitute* '("qucs/qucs/qucsdigi" >> "qucs/qucs/qucsdigilib" >> "qucs/qucs/qucsveri") > >> (wrap-program (string-append out "/bin/qucs") > > Qucs-s: >> (substitute* '("qucs/qucsdigi" >> "qucs/qucsdigilib" >> "qucs/qucsveri") > >> (let* ((out (assoc-ref outputs "out")) >> (file (string-append out "/bin/qucs-s")) >> (qucs (assoc-ref inputs "qucs")) >> (qucsator (string-append qucs "/bin/qucsator"))) >> (wrap-program file > > So qucs-s cannot inherit qucs, and this is why I dismissed that when I > looked at it in the past. > > I think we could create a procedure, that takes the variables as > arguments and returns a qucs package. So that qucs-s inherits the > application of that procedure on different arguments. > > Is this preferable to having two different packages with some identical > phases? Well you=E2=80=99re right, there=E2=80=99s no great solution in this case. Finally pushed as commit ef2c6b409568123e760a7dfa22d45fc09e713198. We=E2=80=99re done! :-) Thank you! Ludo=E2=80=99.