From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eCUNX-0003wC-NP for guix-patches@gnu.org; Wed, 08 Nov 2017 12:43:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eCUNS-0003xm-Nu for guix-patches@gnu.org; Wed, 08 Nov 2017 12:43:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:50139) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eCUNS-0003xT-Kr for guix-patches@gnu.org; Wed, 08 Nov 2017 12:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eCUNS-000796-8P for guix-patches@gnu.org; Wed, 08 Nov 2017 12:43:02 -0500 Subject: [bug#27344] [PATCH v4 3/3] gnu: Add qucs-s. Resent-Message-ID: References: <87tvyksmyt.fsf@foradis.org> <20171027141819.21006-1-theodoros@foradis.org> <20171027141819.21006-3-theodoros@foradis.org> <87bmksa9xz.fsf@gnu.org> From: Theodoros Foradis In-reply-to: <87bmksa9xz.fsf@gnu.org> Date: Wed, 08 Nov 2017 19:42:12 +0200 Message-ID: <87o9ocsm4r.fsf@foradis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 27344@debbugs.gnu.org Hello Ludovic, Ludovic Courtès writes: > Theodoros Foradis skribis: > >> * gnu/packages/engineering.scm (qucs-s): New variable. > > There seems to be a lot of duplication with ‘qucs’. Would it be > possible to inherit from qucs, thereby reusing its phases, and simply > provide any extra phase that’s 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? -- Theodoros Foradis