From 0c3fd900cfdc0c67ea468a0e0236e69c2f9f062e Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Sun, 14 Jul 2024 11:35:25 -0300 Subject: [PATCH] gnu: libngspice, ngspice: Improve package style. * gnu/packages/engineering.scm (libngspice, ngspice): Reformat packages using 'guix style'. [arguments]: Use G-Expressions. Change-Id: I59efa6a78797c2dc2a960ce0be74b2a7381d6d4c --- gnu/packages/engineering.scm | 66 ++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index e4db4da957..88dd703684 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -1983,35 +1983,28 @@ (define-public libngspice (source (origin (method url-fetch) - (uri (list - (string-append "mirror://sourceforge/ngspice/ng-spice-rework/" - version "/ngspice-" version ".tar.gz") - (string-append "mirror://sourceforge/ngspice/ng-spice-rework/" - "old-releases/" version - "/ngspice-" version ".tar.gz"))) + (uri (list (string-append + "mirror://sourceforge/ngspice/ng-spice-rework/" version + "/ngspice-" version ".tar.gz") + (string-append + "mirror://sourceforge/ngspice/ng-spice-rework/" + "old-releases/" version "/ngspice-" version ".tar.gz"))) (sha256 (base32 "169nn6bw5628m2k8cy77yd1vs22plj83grisq58j07sk11pnmp8l")))) (build-system gnu-build-system) (arguments - `(;; No tests for libngspice exist. - ;; The transient tests for ngspice fail. - #:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'install 'delete-scripts - (lambda* (#:key outputs #:allow-other-keys) - (delete-file-recursively - (string-append (assoc-ref outputs "out") - "/share/ngspice/scripts"))))) - #:configure-flags - (list "--enable-openmp" - "--enable-ciderlib" - "--enable-xspice" - "--with-ngshared"))) - (native-inputs - (list bison flex)) - (inputs - (list libxaw openmpi)) + (list + #:tests? #f ;there are no tests for libngspice + #:phases #~(modify-phases %standard-phases + (add-after 'install 'delete-scripts + (lambda _ + (delete-file-recursively + (string-append #$output + "/share/ngspice/scripts"))))) + #:configure-flags #~(list "--enable-openmp" "--enable-ciderlib" + "--enable-xspice" "--with-ngshared"))) + (native-inputs (list bison flex)) + (inputs (list libxaw openmpi)) (home-page "https://ngspice.sourceforge.net/") (synopsis "Mixed-level/mixed-signal circuit simulator") (description @@ -2019,25 +2012,26 @@ (define-public libngspice @code{Spice3f5}, a circuit simulator, and @code{Xspice}, an extension that provides code modeling support and simulation of digital components through an embedded event driven algorithm.") - (license (list license:lgpl2.0+ ; code in frontend/numparam - (license:non-copyleft "file:///COPYING") ; spice3 bsd-style - license:bsd-3 ; ciderlib - license:public-domain)))) ; xspice + (license (list license:lgpl2.0+ ;code in frontend/numparam + (license:non-copyleft "file:///COPYING") ;spice3 bsd-style + license:bsd-3 ;ciderlib + license:public-domain)))) ;xspice (define-public ngspice ;; The ngspice executables (see libngpsice above.) - (package (inherit libngspice) + (package + (inherit libngspice) (name "ngspice") (arguments (substitute-keyword-arguments (package-arguments libngspice) ((#:configure-flags flags) - `(cons "--with-readline=yes" - (delete "--with-ngshared" ,flags))) + #~(cons "--with-readline=yes" + (delete "--with-ngshared" + #$flags))) ((#:phases phases) - `(modify-phases ,phases - (delete 'delete-scripts))))) - (inputs - (list libngspice readline)))) + #~(modify-phases #$phases + (delete 'delete-scripts))))) + (inputs (list libngspice readline)))) (define trilinos-serial-xyce ;; Note: This is a Trilinos containing only the packages Xyce needs, so we