From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cAMaGE7X5GIoKAEAbAwnHQ (envelope-from ) for ; Sat, 30 Jul 2022 09:01:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AGX3Fk7X5GJzLQEAG6o9tA (envelope-from ) for ; Sat, 30 Jul 2022 09:01:34 +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 C5ABE2641C for ; Sat, 30 Jul 2022 09:01:33 +0200 (CEST) Received: from localhost ([::1]:39340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oHgTc-0002h3-8I for larch@yhetil.org; Sat, 30 Jul 2022 03:01:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHgSA-0002g6-Tn for guix-patches@gnu.org; Sat, 30 Jul 2022 03:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44165) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oHgSA-00040Q-Jx for guix-patches@gnu.org; Sat, 30 Jul 2022 03:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oHgSA-0003CA-Fz for guix-patches@gnu.org; Sat, 30 Jul 2022 03:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56768] [PATCH] gnu: engineering: Add qucs-s. Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Jul 2022 07:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56768 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 56768@debbugs.gnu.org Received: via spool by 56768-submit@debbugs.gnu.org id=B56768.165916437712220 (code B ref 56768); Sat, 30 Jul 2022 07:00:02 +0000 Received: (at 56768) by debbugs.gnu.org; 30 Jul 2022 06:59:37 +0000 Received: from localhost ([127.0.0.1]:33914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHgRl-0003B1-0a for submit@debbugs.gnu.org; Sat, 30 Jul 2022 02:59:37 -0400 Received: from mail-lf1-f47.google.com ([209.85.167.47]:35806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHgRh-0003Am-LQ for 56768@debbugs.gnu.org; Sat, 30 Jul 2022 02:59:35 -0400 Received: by mail-lf1-f47.google.com with SMTP id z25so10174109lfr.2 for <56768@debbugs.gnu.org>; Fri, 29 Jul 2022 23:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc; bh=sCmF2redqzea2Vy4JTYfwdCPZOzpFz7kgBoaF3shGOw=; b=jk4ysX6AY+oyqt1RKvG5xC5JSbKaO0WlUAN//7yuPD8vG6+aA07jaeFqt6eyJX8ynh TTAq6Vfa6dH3e0b7WHCJf0st7niMW77In2/Uto8x4LfD4ymRcKCSrf/Y1ca631dRK3FG Go2udoLBHGRiXXyWYRfcXONCV8eTZR6oa5e75g7yURFCXgztAtaStJvg2qIyG+10Q6dV M9+3pWRJmRDb9LpDV9+agyGVbaqKAiAP3d4ktYVOsOyk5BJASdytbmDgIb0/2VKyud9k uocmM6HSk2XUfCMJvFf6BL4kIT/PHWwCyAm4TD+/W/tRy9O8Fq4q3nERA6LTKcv36bB7 Tx7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc; bh=sCmF2redqzea2Vy4JTYfwdCPZOzpFz7kgBoaF3shGOw=; b=PecNQod9Wf11LBlwUXf7N4P5rxF+KO0pJDY2ON5QeJjbHW2OttWcsd94fIQverHlti hSY2sZbGf5EZnbYo4VrjE0CpLPC/VKr2Ai/VL/APPQl/6LAWFAgkxlI3BbGyqkYCrQ0H o+mnrPuBAywIO1XIWdPa4vBkLNIQ8RPJVAEurHgC1gUAHRBJ8qDZWUFxbYq5n9EDcjXd rFKLx7fqKSBFIoRRUiLLNEEUkhaCF0MmMsB6w++evIj7SqTSvv/SCpF3YDG9J4CBr+xv ZDXtqpOX1KQkqtWyl1G3+XQbFlBvkhgTTLH55y48kc4AtxHmKYuho1DK8kfYbfrD3Nra KgBQ== X-Gm-Message-State: AJIora/AeesYtMi6XO/72fqx1sI93wjb3r9Rf4RHf5cNwm2z53K6IJPK K2wPy96D7kYcI9mM0oHUJlnyOunUM7AyZA== X-Google-Smtp-Source: AGRyM1teo1B8sdY65VhO33xBW1ZIXBInnqnWLYEjVFHvyiKiQXMTO5Lfpm5tEdGttQUzH8gicKMUig== X-Received: by 2002:a05:6512:4011:b0:48a:82ca:ed8a with SMTP id br17-20020a056512401100b0048a82caed8amr2486594lfb.190.1659164366652; Fri, 29 Jul 2022 23:59:26 -0700 (PDT) Received: from elephant ([5.164.203.220]) by smtp.gmail.com with ESMTPSA id k1-20020ac257c1000000b0048a9526c7d9sm858582lfo.257.2022.07.29.23.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 23:59:26 -0700 (PDT) From: "Artyom V. Poptsov" References: <87ilnlgduf.fsf@gmail.com> <87fsik0wjm.fsf@gmail.com> Date: Sat, 30 Jul 2022 09:59:21 +0300 In-Reply-To: (Maxime Devos's message of "Fri, 29 Jul 2022 18:17:30 +0200") Message-ID: <87v8rfxf06.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659164494; 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=sCmF2redqzea2Vy4JTYfwdCPZOzpFz7kgBoaF3shGOw=; b=V8+GlVgHckjstXKuHm8pF9knAyluZM7OZO9aT9av8O2ymgfX75OyttLcPK9yPxouZyGVMi AVlVuP+FWzoZiLrrTm1mqMu0GOjRJoQJ7CcRWC0o5faJOos1XStGHcXybqWscctBCgvA2d E+U/WtQEaPvreZ0PdMCjw3y0ZHcy0AJOQbixIQNNIa2D92L3drFKksO0g5ATt3UQRLkX9A faEZvCkf5xgfhKZnGNNTurk9G8Ujua1f1qKOmVlcuQGvv1lJjjYYoFgKwNfmqPDecXldTs 5yqIU6L5LjwlBYUmN0T6Dub8EHpKUlatdBDl4DF9CPGuud/N9qvqr2f4l0a60g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659164494; a=rsa-sha256; cv=none; b=gKqgVD7rxcdQUI34yl74VeCcJB3tkyXsK9sg43XDb50M8fprrHQGLXagLyy7z02qjiJsKE gQCnw94yMK6WiVpjbEx9DAtNzdVC5oyZADXQo2/MBFnLycsuC51JFtqz35HavVtXPplSfQ /FXwl8farasNJZKe69YPMBysTW4rzIpLnGLLsfacD8o0aENYcCkVJ5i7SdOeqHLOynxDQ/ Wcl9rPDIqDzSU9yLjwOVwrzL1NZmpqXerLSFWg88mqHTMnNIHtPpHoVX61MZUSAXZgmlwd 1YjzHLbcyhfZWoBlaLB7GLD4f09kOQzf41irpD8zEClGJeUslSrYeTmmgEQB/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jk4ysX6A; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: 3.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=jk4ysX6A; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Queue-Id: C5ABE2641C X-Spam-Score: 3.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: a/xNT/XQkOuO --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Maxime. > That's what I meant, thanks.=C2=A0 I guess the icons issue is GTK-specific > and doesn't happen for Qt. Yes, Qt allows the application resources (like icons) to be put into the application binary on the build time, and that's how it's done usually. > These substitutions look fine ... ... ... but they can be improved, by > replacing the assoc-ref with search-input-file: (search-input-file > inputs "/bin/ngspice"). That way, it doesn't depend on the package > name anymore, which is preferred by > (*) and makes in some > cases --with-input more usable. That blog post also has en example. Done. > By that logic, since qtbase and qtsvg are used at runtime too, they > should be propagated as well, but ... > > I tried to run simulations from the examples provided with the > > Qucs-S and it seems to me that Qucs-S mostly works as it should. > ... as you have observed, things work even when they aren't propagated > (at least for qtbase etc., ngspice and octave have not yet been > tested). I usually put into "propagated-inputs" packages that provide some binary that the current package use in the runtime. So do you mean that I should rely only on "inputs" package property, and the inputs will be propagated anyway if they're in use by the package? > In theory, the propagation shouldn't be required because you added a > 'substitute*', so in principle qucs-s should know where to find it. Following your logic I moved NGSpice and Octave from "propagated-inputs" to "inputs" as they substituted in the sources. > Also, I noticed these substitutions modify configuration, could you > verify they aren't saved in wherever qucs-s' configuration file is > located? Because if they are, then even after an update of octave etc. > it would seem that qucs-s would still use the old octave. Good catch. In my previous patch I substituted NGSpice and Octave in the part of code that is executed only when no configuration is provided, so the current binary versions used by default. However after the first run Qucs-S stores the paths to the configuration file: =2D-8<---------------cut here---------------start------------->8--- $ cat ~/.config/qucs/qucs_s.conf [General] ... NgspiceExecutable=3D/gnu/store/jl159ilvjzxd0i45xf2z8llbhvl10w54-ngspice-37/= bin/ngspice ... =2D-8<---------------cut here---------------end--------------->8--- So the next time Qucs-S run it gets the paths from the configuration file. I changed the substitutions so Qucs-S will ignore the paths to Octave and NGSpice from the configuration and will always use the paths provided by Guix. Also any custom paths to Octave and NGSpice will be overwritten in the config when the application exits. That is sub-optimal in my view as we're messing up with the application configuration logic and if a user wants to change those paths he or she will be able to remove the config and set the paths in the startup configuration dialogue, but the settings will have no effect; that will be a bit confusing. Yet at least Qucs-S will always use the right Octave/NGSpice path from GNU Guix. What do you think? Here's the patch. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-Add-qucs-s.patch Content-Transfer-Encoding: quoted-printable From=209888a6b0169bd3b9f158749f164b2fb1ebd5603a Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Mon, 25 Jul 2022 22:57:14 +0300 Subject: [PATCH] gnu: Add qucs-s. * gnu/packages/engineering.scm (qucs-s): New variable. =2D-- gnu/packages/engineering.scm | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 6eefd14d7e..4cd9e2767a 100644 =2D-- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -3757,3 +3757,51 @@ (define-public candle @item Visualizing G-code files. @end itemize") (license license:gpl3+)))) + +(define-public qucs-s + (package + (name "qucs-s") + (version "0.0.24") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ra3xdh/qucs_s") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1lbkaw0grw9w7d37z5dbhaqi8p57cpf9yp071zp6xrairkgimdx8")))) + (build-system cmake-build-system) + (native-inputs (list qttools)) + (inputs (list qtbase-5 qtscript qtsvg ngspice octave)) + (arguments + (list #:tests? #f ;no tests + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "qucs/main.cpp" + (("QucsSettings.NgspiceExecutable =3D .*;") + (string-append + "QucsSettings.NgspiceExecutable =3D \"" + (search-input-file inputs "/bin/ngspice") + "\";")) + (("QucsSettings.OctaveExecutable =3D .*;") + (string-append + "QucsSettings.OctaveExecutable =3D \"" + (search-input-file inputs "/bin/octave") "= \";")))))))) + (synopsis "GUI for different circuit simulation kernels") + (description + "@code{Qucs-S} provides a fancy graphical user interface for a number= of +popular circuit simulation engines. The package contains libraries for +schematic capture, visualization and components. The following simulation +kernels are supported: + +@itemize +@item Ngspice (recommended) +@item Xyce +@item SpiceOpus +@item Qucsator (non-spice) +@end itemize +") + (home-page "https://ra3xdh.github.io/") + (license license:gpl2+))) =2D-=20 2.34.1 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Thanks, =2D Artyom =2D-=20 Artyom "avp" Poptsov Home page: https://memory-heap.org/~avp/ CADR Hackerspace co-founder: https://cadrspace.ru/ GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFNBAEBCgA3FiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmLk1skZHHBvcHRzb3Yu YXJ0eW9tQGdtYWlsLmNvbQAKCRDpxaLZCJigLw+QB/4nOMhjV67d90LD0TTRMG2n YHFZZbt4NTQUr5CeHbWRfntv9VJYL76qHn6LDcRKJU45nb5y04rxzZFwjhr18zjY aC229fzgs7JEJGWqcibxEEmNp4Hy1i6gRJXtfM+8O4+K+xv04yaysD5aJAYSivEm gh6kJa6+bEuZfun0gM0EJ6jl8FoGCZq6nXmCZ8yTG/hr5UMR63ASQTgKOL2zBmu1 dJTwMhd2ngUteM9zf8BRcPT4kJX/1LHgavpyVND5GZ9qC90dHreGwnbFMQFZyvOT nOSaUL3mewkXwkioOKY9erxKNSQBj0Onkrs0HQ8hxOO7yxCw9+be2js5qA5HxLWO =+B9B -----END PGP SIGNATURE----- --==-=-=--