From 27f8d98f8e5608ebb0a466fd8d19f3bcb860263f Mon Sep 17 00:00:00 2001 From: Andrew Miloradovsky Date: Fri, 6 Dec 2019 11:36:52 +0300 Subject: gnu: libraft: Update to 0.9.11. * gnu/packages/cluster.scm (libraft): Update to 0.9.11. [arguments]: Enable libuv I/O backend. Add phase to skip some tests. [inputs]: Add libuv. Signed-off-by: Efraim Flashner --- gnu/packages/cluster.scm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/gnu/packages/cluster.scm b/gnu/packages/cluster.scm index 9548352d12..03700b0bcb 100644 --- a/gnu/packages/cluster.scm +++ b/gnu/packages/cluster.scm @@ -26,6 +26,7 @@ #:use-module (guix packages) #:use-module (gnu packages autotools) #:use-module (gnu packages gettext) + #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages sphinx) @@ -87,7 +88,7 @@ independently or together to provide resilient infrastructures.") (define-public libraft (package (name "libraft") - (version "0.9.5") + (version "0.9.11") (home-page "https://github.com/canonical/raft") (source (origin (method git-fetch) @@ -96,10 +97,17 @@ independently or together to provide resilient infrastructures.") (file-name (git-file-name name version)) (sha256 (base32 - "1q49f5mmv6nr6dxhnp044xwc6jlczgh0nj0bl6718wiqh28411x0")))) - (arguments '(#:configure-flags '("--disable-uv"))) - ;; The uv plugin tests fail, if libuv (or the example) is enabled, - ;; because setting up the environment requires too much privileges. + "00rsq4z9nykmf7r5rlpv1y6bvckcmg3zv57vh1h681y5pij6cch1")))) + (arguments '(#:configure-flags '("--enable-uv") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-failing-tests + (lambda _ + (substitute* "Makefile.am" + ((".*test_uv_append.c.*") "")) + #t))))) + (inputs + `(("libuv" ,libuv))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) -- cgit v1.2.3 From bc587eb178799ccb9bd051f8f46569e1673a9991 Mon Sep 17 00:00:00 2001 From: nixo Date: Sun, 8 Dec 2019 12:27:31 +0100 Subject: gnu: enchive: Update to 3.5. * gnu/packages/crypto.scm (enchive): Update to 3.5. [source]: Replace url-fetch with git-fetch. Signed-off-by: Efraim Flashner --- gnu/packages/crypto.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index 80c598ed86..e63823de2c 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -852,15 +852,16 @@ cannot sign messages in OpenBSD format yet.") (define-public enchive (package (name "enchive") - (version "3.4") + (version "3.5") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/skeeto/" name "/archive/" - version ".tar.gz")) - (sha256 - (base32 - "17hrxpp4cpn10bk48sfvfjc8hghky34agsnypam1v9f36kbalqfk")) - (file-name (string-append name "-" version ".tar.gz")))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/skeeto/enchive") + (commit version))) + (sha256 + (base32 + "0fdrfc5l42lj2bvmv9dmkmhmm7qiszwk7cmdvnqad3fs7652g0qa")) + (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments '(#:tests? #f ; no check target ' -- cgit v1.2.3 From 04b33ce205f38813b4dbd04b6ad3c7aa0be0b6f6 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 10 Dec 2019 18:20:51 -0500 Subject: gnu: nss: Fix CVE-2019-11745 via graft. * gnu/packages/patches/nss-CVE-2019-11745.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/nss.scm (nss/fixed): New variable. (nss)[replacement]: Add field. --- gnu/local.mk | 1 + gnu/packages/nss.scm | 9 +++++++++ gnu/packages/patches/nss-CVE-2019-11745.patch | 24 ++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 gnu/packages/patches/nss-CVE-2019-11745.patch diff --git a/gnu/local.mk b/gnu/local.mk index 0faa0ba07c..00ff3b8d61 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1180,6 +1180,7 @@ dist_patch_DATA = \ %D%/packages/patches/ngircd-handle-zombies.patch \ %D%/packages/patches/nm-plugin-path.patch \ %D%/packages/patches/nsis-env-passthru.patch \ + %D%/packages/patches/nss-CVE-2019-11745.patch \ %D%/packages/patches/nss-freebl-stubs.patch \ %D%/packages/patches/nss-increase-test-timeout.patch \ %D%/packages/patches/nss-pkgconfig.patch \ diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index 65f95aaa8a..4f421f6e9d 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -71,6 +71,7 @@ in the Mozilla clients.") (package (name "nss") (version "3.46.1") + (replacement nss/fixed) (source (origin (method url-fetch) (uri (let ((version-with-underscores @@ -183,3 +184,11 @@ applications. Applications built with NSS can support SSL v2 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other security standards.") (license license:mpl2.0))) + +(define nss/fixed + (package + (inherit nss) + (source (origin + (inherit (package-source nss)) + (patches (append (search-patches "nss-CVE-2019-11745.patch") + (origin-patches (package-source nss)))))))) diff --git a/gnu/packages/patches/nss-CVE-2019-11745.patch b/gnu/packages/patches/nss-CVE-2019-11745.patch new file mode 100644 index 0000000000..ae0eeda3c8 --- /dev/null +++ b/gnu/packages/patches/nss-CVE-2019-11745.patch @@ -0,0 +1,24 @@ +Fix CVE-2019-11745 (Out-of-bounds write when passing an output buffer smaller +than the block size to NSC_EncryptUpdate). + +Copied from Debian, equivalent to upstream fix: +. + +# HG changeset patch +# User Craig Disselkoen +# Date 1574189697 25200 +# Node ID 60bca7c6dc6dc44579b9b3e0fb62ca3b82d92eec +# Parent 64e55c9f658e2a75f0835d00a8a1cdc2f25c74d6 +Bug 1586176 - EncryptUpdate should use maxout not block size. r=franziskus + +--- a/nss/lib/softoken/pkcs11c.c ++++ b/nss/lib/softoken/pkcs11c.c +@@ -1285,7 +1285,7 @@ NSC_EncryptUpdate(CK_SESSION_HANDLE hSes + } + /* encrypt the current padded data */ + rv = (*context->update)(context->cipherInfo, pEncryptedPart, +- &padoutlen, context->blockSize, context->padBuf, ++ &padoutlen, maxout, context->padBuf, + context->blockSize); + if (rv != SECSuccess) { + return sftk_MapCryptError(PORT_GetError()); -- cgit v1.2.3 From 498abd95347d45a453e4987e0b1990a9d16c4df6 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Wed, 6 Nov 2019 13:58:44 +0100 Subject: gnu: kdevelop-pg-qt: Update to 2.2.0. * gnu/packages/kde.scm(kdevelop-pg-qt): Update to 2.2.0. --- gnu/packages/kde.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index 9e6a2cff3e..b01af5e55d 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -233,7 +233,7 @@ software (Git, Subversion, Mercurial, CVS and Bazaar).") (define-public kdevelop-pg-qt (package (name "kdevelop-pg-qt") - (version "2.0.0") + (version "2.2.0") (source (origin (method url-fetch) @@ -241,7 +241,7 @@ software (Git, Subversion, Mercurial, CVS and Bazaar).") version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 - (base32 "1av8plqz7hyhrd07avnmn6ryslqlarmxn0pw7swzvb6ddiqp59j4")))) + (base32 "15ja19gg6x7gww4ch12hy585x55ghbkpsiyr8fqiyjk0j6v07hh5")))) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules))) (inputs -- cgit v1.2.3 From 6e23bee6346dc99f4bf8f08eb63bc406ced2ba66 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sat, 19 Oct 2019 10:37:41 +0200 Subject: gnu: kdevelop: Update to 5.4.5. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/kde.scm(kdevelop): Update to 5.4.5, use qt-build-sytem. [native-inputs]: Move shared-mime-info from … [inputs] … here; Remove kconfig, kdevplatform, libepoxy; Add apr, apr-util, astyle, attica, boost, kconfigwidgets, kservice, libkomparediff2, oxygen-icons, qtquickcontrols2, sonnet, subversion; structure and sort list of inputs. [arguments] Disable tests. : Base on phases from qt-build-system. {wrap-executable}: Remove. {add-include-path}: New phase. {check} Keep it.. --- gnu/packages/kde.scm | 101 +++++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 47 deletions(-) diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index b01af5e55d..6fac2ae969 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -37,6 +37,7 @@ #:use-module (gnu packages apr) #:use-module (gnu packages audio) #:use-module (gnu packages boost) + #:use-module (gnu packages code) #:use-module (gnu packages compression) #:use-module (gnu packages curl) #:use-module (gnu packages documentation) @@ -145,7 +146,7 @@ projects.") (define-public kdevelop (package (name "kdevelop") - (version "5.1.2") + (version "5.4.5") (source (origin (method url-fetch) @@ -154,73 +155,79 @@ projects.") version ".tar.xz")) (sha256 (base32 - "1iqaq0ilijjigqb34v5wq9in6bnjs0p9cmgbygjmy53xhh3yhm5g")))) - (build-system cmake-build-system) + "08vhbg9ql0402bw3y3xw1kdxhig9sv3ss8g0h4477vy3z17m1h4j")))) + (build-system qt-build-system) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules) ("pkg-config" ,pkg-config) + ("shared-mime-info" ,shared-mime-info) ("qttools" ,qttools))) (inputs - `(("kdevplatform" ,kdevplatform) - ("kdevelop-pg-qt" ,kdevelop-pg-qt) - ("qtbase" ,qtbase) - ("qtdeclarative" ,qtdeclarative) - ("qtquickcontrols" ,qtquickcontrols) - ("qtwebkit" ,qtwebkit) + `(("boost" ,boost) + ("clang" ,clang) + ("grantlee" ,grantlee) ("karchive" ,karchive) ("kcmutils" ,kcmutils) - ("kconfig" ,kconfig) + ("kcrash" ,kcrash) ("kdeclarative" ,kdeclarative) ("kdoctools" ,kdoctools) ("kguiaddons" ,kguiaddons) ("ki18n" ,ki18n) - ("kio" ,kio) ("kiconthemes" ,kiconthemes) + ("kio" ,kio) ;; not checked as requirement ("kitemmodels" ,kitemmodels) ("kitemviews" ,kitemviews) ("kjobwidgets" ,kjobwidgets) - ("knotifyconfig" ,knotifyconfig) ("knotifications" ,knotifications) + ("knotifyconfig" ,knotifyconfig) ("kparts" ,kparts) - ("kcrash" ,kcrash) - ("knewstuff" ,knewstuff) - ("krunner" ,krunner) - ("kxmlgui" ,kxmlgui) - ("libksysguard" ,libksysguard) - ("threadweaver" ,threadweaver) + ("kservice" ,kservice) ("ktexteditor" ,ktexteditor) ("kwindowsystem" ,kwindowsystem) + ("kxmlgui" ,kxmlgui) + ("libkomparediff2" ,libkomparediff2) + ("oxygen-icons" ,oxygen-icons) + ("qtbase" ,qtbase) + ("qtdeclarative" ,qtdeclarative) + ("qtquickcontrols" ,qtquickcontrols) ;; not checked as requirement + ("qtquickcontrols2" ,qtquickcontrols2) ;; not checked as requirement + ("qtwebkit" ,qtwebkit) + ("threadweaver" ,threadweaver) + + ;; recommendes + ("astyle" ,astyle) + ("kdevelop-pg-qt" ,kdevelop-pg-qt) + ("libksysguard" ,libksysguard) + + ;; optional + ("apr" ,apr) ; required for subversion support + ("apr-util" ,apr-util) ; required for subversion support + ("attica" ,attica) + ("kconfigwidgets" ,kconfigwidgets) + ("knewstuff" ,knewstuff) + ("krunner" ,krunner) + ;; TODO: OktetaGui, OktetaKastenControllers ("plasma" ,plasma-framework) - ("grantlee" ,grantlee) - ("libepoxy" ,libepoxy) - ("clang" ,clang) - ("shared-mime-info" ,shared-mime-info))) + ;; TODO: purpose + ("sonnet" ,sonnet) + ("subversion" ,subversion))) + + ;; run-time packages - TODO + ;; ClazyStandalone + ;; Cppcheck + ;; heaptrack + ;; heaptrack_gui + ;; meson (arguments - `(#:phases - (modify-phases %standard-phases - (delete 'check) ;; there are some issues with the test suite - (add-after 'install 'wrap-executable - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (kdevplatform (assoc-ref inputs "kdevplatform")) - (kio (assoc-ref inputs "kio")) - (kcmutils (assoc-ref inputs "kcmutils")) - (qtquickcontrols (assoc-ref inputs "qtquickcontrols")) - (qtbase (assoc-ref inputs "qtbase")) - (qtdeclarative (assoc-ref inputs "qtdeclarative")) - (qml "/qml")) - (wrap-program (string-append out "/bin/kdevelop") - `("XDG_DATA_DIRS" ":" prefix - ,(map (lambda (s) (string-append s "/share")) - (list out kdevplatform kcmutils))) - `("QT_QPA_PLATFORM_PLUGIN_PATH" ":" = - (,(string-append qtbase "/plugins/platforms"))) - `("QT_PLUGIN_PATH" ":" prefix - ,(map (lambda (s) (string-append s "/lib/plugins")) - (list out kdevplatform kio))) - `("QML2_IMPORT_PATH" ":" prefix - (,(string-append qtquickcontrols qml) - ,(string-append qtdeclarative qml)))))))))) + `(#:tests? #f ;; there are some issues with the test suite + #:phases + (modify-phases (@ (guix build qt-build-system) %standard-phases) + (add-before 'configure 'add-include-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "cmake/modules/FindClang.cmake" + (("^\\s*PATHS \"\\$\\{CLANG_LIBRARY_DIRS\\}\"" line) + (string-append line " " (assoc-ref inputs "clang") "/lib"))) + #t))))) (home-page "https://kdevelop.org") (synopsis "IDE for C, C++, Python, Javascript and PHP") (description "The KDevelop IDE provides semantic syntax highlighting, as -- cgit v1.2.3 From e87b83b62c2d21e0efc4ae62a115405aeef756a6 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Wed, 6 Nov 2019 13:55:37 +0100 Subject: gnu: Deprecate kdevplatform package. * gnu/packages/kde.scm (kdevplatform): Define as a deprecated alias for 'kdevelop`. --- gnu/packages/kde.scm | 74 +++------------------------------------------------- 1 file changed, 3 insertions(+), 71 deletions(-) diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index 6fac2ae969..24d8eedd84 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -27,6 +27,7 @@ (define-module (gnu packages kde) #:use-module (guix build-system cmake) #:use-module (guix build-system qt) + #:use-module (guix deprecation) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) @@ -260,77 +261,8 @@ software (Git, Subversion, Mercurial, CVS and Bazaar).") for some KDevelop language plugins (Ruby, PHP, CSS...).") (license license:lgpl2.0+))) -(define-public kdevplatform - (package - (name "kdevplatform") - (version "5.1.2") - (source (origin - (method url-fetch) - (uri (string-append "mirror://kde/stable/kdevelop" - "/" version "/src/kdevplatform-" - version ".tar.xz")) - (sha256 - (base32 - "0jk6g1kiqpyjy8pca0236b9944gxqnymqv8ny6m8nrraannxs8p6")))) - (build-system cmake-build-system) - (native-inputs - `(("extra-cmake-modules" ,extra-cmake-modules) - ("pkg-config" ,pkg-config))) - (inputs - `(("apr" ,apr) - ("apr-util" ,apr-util) - ("boost" ,boost) - ("karchive" ,karchive) - ("kconfigwidgets" ,kconfigwidgets) - ("kcmutils" ,kcmutils) - ("kiconthemes" ,kiconthemes) - ("kdeclarative" ,kdeclarative) - ("kdoctools" ,kdoctools) - ("kguiaddons" ,kguiaddons) - ("kinit" ,kinit) - ("kitemmodels" ,kitemmodels) - ("knewstuff" ,knewstuff) - ("knotifications" ,knotifications) - ("knotifyconfig" ,knotifyconfig) - ("kwindowsystem" ,kwindowsystem) - ("kio" ,kio) - ("ki18n" ,ki18n) - ("kparts" ,kparts) - ("kservice" ,kservice) - ("grantlee" ,grantlee) - ("libkomparediff2" ,libkomparediff2) - ("sonnet" ,sonnet) - ("threadweaver" ,threadweaver) - ("ktexteditor" ,ktexteditor) - ("qtbase" ,qtbase) - ("qtdeclarative" ,qtdeclarative) - ("qtscript" ,qtscript) - ("qtwebkit" ,qtwebkit) - ("qtx11extras" ,qtx11extras) - ("plasma" ,plasma-framework) - ("subversion" ,subversion) - ("zlib" ,zlib))) - (arguments - `(#:phases - (modify-phases %standard-phases - (delete 'check) - (add-after 'install 'check - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (setenv "CTEST_OUTPUT_ON_FAILURE" "1") - (setenv "QT_PLUGIN_PATH" - (string-append out "/lib/plugins:" - (getenv "QT_PLUGIN_PATH"))) - (setenv "XDG_DATA_DIRS" - (string-append out "/share:" - (getenv "XDG_DATA_DIRS"))) - (invoke "ctest" "-R" ; almost all tests require a display - "filteringstrategy|kdevvarlengtharray|kdevhash"))))))) - (home-page "https://github.com/KDE/kdevplatform") - (synopsis "Framework to build integrated development environments (IDEs)") - (description "KDevPlatform is the basis of KDevelop and contains some -plugins, as well as code to create plugins, or complete applications.") - (license license:gpl3+))) +;; kdevplatform was merged into kdevelop as of 5.2.x +(define-deprecated kdevplatform kdevelop kdevelop) (define-public krita (package -- cgit v1.2.3 From 5d387030e8ccc87234a1197cb2bb9fdac1b074ee Mon Sep 17 00:00:00 2001 From: Nicolò Balzarotti Date: Wed, 11 Dec 2019 10:00:13 +0100 Subject: gnu: Add r-statcheck. * gnu/packages/cran.scm (r-statcheck): New variable. Signed-off-by: Ricardo Wurmus --- gnu/packages/cran.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 11d254001f..839f6360b5 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -4168,6 +4168,30 @@ supports arbitrary vertex/edge/graph attributes.") software developed by the Statnet Project.") (license license:gpl3))) +(define-public r-statcheck + (package + (name "r-statcheck") + (version "1.3.0") + (source + (origin + (method url-fetch) + (uri (cran-uri "statcheck" version)) + (sha256 + (base32 + "0ivybdcrymlsfv6pg6p5bv70qdvgxf2vgp0kf4r0pf2fcvav1mcp")))) + (build-system r-build-system) + (propagated-inputs + `(("r-ggplot2" ,r-ggplot2) + ("r-plyr" ,r-plyr) + ("r-rmarkdown" ,r-rmarkdown))) + (home-page "https://cran.r-project.org/web/packages/statcheck/") + (synopsis "Extract statistics from articles and recompute p-values") + (description "This package can automatically extract statistical +null-hypothesis significant testing (NHST) results from articles and recompute +the p-values based on the reported test statistic and degrees of freedom to +detect possible inconsistencies.") + (license license:gpl2))) + (define-public r-sna (package (name "r-sna") -- cgit v1.2.3 From f00da07471d3f1e01df07cb1af970faf50e6d622 Mon Sep 17 00:00:00 2001 From: Nicolò Balzarotti Date: Wed, 11 Dec 2019 09:19:47 +0100 Subject: gnu: Add r-xmlparsedata. * gnu/packages/cran.scm (r-xmlparsedata): New variable. Signed-off-by: Ricardo Wurmus --- gnu/packages/cran.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 839f6360b5..b3bde41d79 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -14719,6 +14719,27 @@ they are often difficult to interpret. Rex allows you to build complex regular expressions from human readable expressions") (license license:expat))) +(define-public r-xmlparsedata + (package + (name "r-xmlparsedata") + (version "1.0.3") + (source + (origin + (method url-fetch) + (uri (cran-uri "xmlparsedata" version)) + (sha256 + (base32 + "0gjr3l5z5dp276lchr2649as1rkj56d2mlvbr66yg393zzw50lsh")))) + (properties `((upstream-name . "xmlparsedata"))) + (build-system r-build-system) + (home-page "https://github.com/r-lib/xmlparsedata#readme") + (synopsis "Parse data of @code{R} code as an @code{XML} tree") + (description + "This package provides tools to convert the output of +@code{utils::getParseData()} to an @code{XML} tree, that one can search via +@code{XPath}, and is easier to manipulate in general.") + (license license:expat))) + (define-public r-sctransform (package (name "r-sctransform") -- cgit v1.2.3 From bd538a031e34fbec0dc5af2e576dd679f6836675 Mon Sep 17 00:00:00 2001 From: Nicolò Balzarotti Date: Wed, 11 Dec 2019 09:19:47 +0100 Subject: gnu: Add r-cyclocomp. * gnu/packages/cran.scm (r-cyclocomp): New variable. Signed-off-by: Ricardo Wurmus --- gnu/packages/cran.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index b3bde41d79..73626cb4d2 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -14740,6 +14740,34 @@ regular expressions from human readable expressions") @code{XPath}, and is easier to manipulate in general.") (license license:expat))) +(define-public r-cyclocomp + (package + (name "r-cyclocomp") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (cran-uri "cyclocomp" version)) + (sha256 + (base32 + "0gky3svk02wiajw7nfjh30684h3qxili4bvsab0m7b6cggw6bgyd")))) + (properties `((upstream-name . "cyclocomp"))) + (build-system r-build-system) + (propagated-inputs + `(("r-callr" ,r-callr) + ("r-crayon" ,r-crayon) + ("r-desc" ,r-desc) + ("r-remotes" ,r-remotes) + ("r-withr" ,r-withr))) + (home-page "https://github.com/MangoTheCat/cyclocomp") + (synopsis "Cyclomatic complexity of R code") + (description + "Cyclomatic complexity is a software metric, used to indicate the +complexity of a program. It is a quantitative measure of the number of +linearly independent paths through a program's source code. This package +provides tools to compute this metric.") + (license license:expat))) + (define-public r-sctransform (package (name "r-sctransform") -- cgit v1.2.3 From 6c3021a84006924d924d282f22aa1f338d4b3528 Mon Sep 17 00:00:00 2001 From: Nicolò Balzarotti Date: Wed, 11 Dec 2019 09:19:47 +0100 Subject: gnu: Add r-lintr. * gnu/packages/cran.scm (r-lintr): New variable. Signed-off-by: Ricardo Wurmus --- gnu/packages/cran.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 73626cb4d2..ad8c6ebe67 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -14768,6 +14768,40 @@ linearly independent paths through a program's source code. This package provides tools to compute this metric.") (license license:expat))) +(define-public r-lintr + (package + (name "r-lintr") + (version "2.0.0") + (source + (origin + (method url-fetch) + (uri (cran-uri "lintr" version)) + (sha256 + (base32 + "09gbci4v5n4gsfzminly8332fw7faxdi1kkyvpa10dydx02sjcwb")))) + (properties `((upstream-name . "lintr"))) + (build-system r-build-system) + (propagated-inputs + `(("r-codetools" ,r-codetools) + ("r-crayon" ,r-crayon) + ("r-cyclocomp" ,r-cyclocomp) + ("r-digest" ,r-digest) + ("r-httr" ,r-httr) + ("r-jsonlite" ,r-jsonlite) + ("r-knitr" ,r-knitr) + ("r-rex" ,r-rex) + ("r-rstudioapi" ,r-rstudioapi) + ("r-stringdist" ,r-stringdist) + ("r-testthat" ,r-testthat) + ("r-xml2" ,r-xml2) + ("r-xmlparsedata" ,r-xmlparsedata))) + (home-page "https://github.com/jimhester/lintr") + (synopsis "Linter for R code") + (description "This package checks adherence to a given style, syntax +errors and possible semantic issues. It supports on the fly checking of R +code edited with @code{RStudio IDE}, @code{Emacs} and @code{Vim}.") + (license license:expat))) + (define-public r-sctransform (package (name "r-sctransform") -- cgit v1.2.3 From ddd59159004ca73c9449a27945116ff5069c3743 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 10 Dec 2019 20:13:04 +0100 Subject: import: utils: 'recursive-import' returns packages in topological order. * guix/import/utils.scm (topological-sort): New procedure. (recursive-import): Rewrite to use it. * tests/import-utils.scm ("recursive-import"): New test. * guix/import/cran.scm (cran->guix-package): Always return two values. * guix/scripts/import/cran.scm (guix-import-cran): Remove 'reverse' call on 'cran-recursive-import' result. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * guix/scripts/import/gem.scm (guix-import-gem): Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage): Likewise. * guix/scripts/import/opam.scm (guix-import-opam): Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi): Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage): Likewise. * tests/gem.scm ("gem-recursive-import"): Change the order of package expressions accordingly. --- guix/import/cran.scm | 4 +- guix/import/utils.scm | 84 ++++++++++++++++++++++++---------------- guix/scripts/import/cran.scm | 7 ++-- guix/scripts/import/crate.scm | 5 +-- guix/scripts/import/elpa.scm | 7 ++-- guix/scripts/import/gem.scm | 5 +-- guix/scripts/import/hackage.scm | 5 +-- guix/scripts/import/opam.scm | 5 +-- guix/scripts/import/pypi.scm | 5 +-- guix/scripts/import/stackage.scm | 5 +-- tests/gem.scm | 22 +++++------ tests/import-utils.scm | 25 +++++++++++- 12 files changed, 105 insertions(+), 74 deletions(-) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index e47aff2b12..d9018cc7da 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus -;;; Copyright © 2015, 2016, 2017 Ludovic Courtès +;;; Copyright © 2015, 2016, 2017, 2019 Ludovic Courtès ;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. @@ -505,7 +505,7 @@ s-expression corresponding to that package, or #f on failure." ((bioconductor) ;; Retry import from CRAN (cran->guix-package package-name 'cran)) - (else #f))))))) + (else (values #f '())))))))) (define* (cran-recursive-import package-name #:optional (repo 'cran)) (recursive-import package-name repo diff --git a/guix/import/utils.scm b/guix/import/utils.scm index 4694b6e7ef..ef7c13259d 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -34,12 +34,14 @@ #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix download) + #:use-module (guix sets) #:use-module (gnu packages) #:use-module (ice-9 match) #:use-module (ice-9 rdelim) #:use-module (ice-9 receive) #:use-module (ice-9 regex) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-9) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) #:use-module (srfi srfi-41) @@ -377,40 +379,54 @@ separated by PRED." (chr (char-downcase chr))) name))) +(define (topological-sort nodes + node-dependencies + node-name) + "Perform a breadth-first traversal of the graph rooted at NODES, a list of +nodes, and return the list of nodes sorted in topological order. Call +NODE-DEPENDENCIES to obtain the dependencies of a node, and NODE-NAME to +obtain a node's uniquely identifying \"key\"." + (let loop ((nodes nodes) + (result '()) + (visited (set))) + (match nodes + (() + result) + ((head . tail) + (if (set-contains? visited (node-name head)) + (loop tail result visited) + (let ((dependencies (node-dependencies head))) + (loop (append dependencies tail) + (cons head result) + (set-insert (node-name head) visited)))))))) + (define* (recursive-import package-name repo #:key repo->guix-package guix-name #:allow-other-keys) - "Generate a stream of package expressions for PACKAGE-NAME and all its -dependencies." - (define (exists? dependency) - (not (null? (find-packages-by-name (guix-name dependency))))) - (define initial-state (list #f (list package-name) (list))) - (define (step state) - (match state - ((prev (next . rest) done) - (define (handle? dep) - (and - (not (equal? dep next)) - (not (member dep done)) - (not (exists? dep)))) - (receive (package . dependencies) (repo->guix-package next repo) - (list - (if package package '()) ;; default #f on failure would interrupt - (if package - (lset-union equal? rest (filter handle? (car dependencies))) - rest) - (cons next done)))) - ((prev '() done) - (list #f '() done)))) - - ;; Generate a lazy stream of package expressions for all unknown - ;; dependencies in the graph. - (stream-unfold - ;; map: produce a stream element - (match-lambda ((latest queue done) latest)) - ;; predicate - (match-lambda ((latest queue done) latest)) - ;; generator: update the queue - step - ;; initial state - (step initial-state))) + "Return a stream of package expressions for PACKAGE-NAME and all its +dependencies, sorted in topological order. For each package, +call (REPO->GUIX-PACKAGE NAME REPO), which should return a package expression +and a list of dependencies; call (GUIX-NAME NAME) to obtain the Guix package +name corresponding to the upstream name." + (define-record-type + (make-node name package dependencies) + node? + (name node-name) + (package node-package) + (dependencies node-dependencies)) + + (define (exists? name) + (not (null? (find-packages-by-name (guix-name name))))) + + (define (lookup-node name) + (receive (package dependencies) (repo->guix-package name repo) + (make-node name package dependencies))) + + (list->stream ;TODO: remove streams + (map node-package + (topological-sort (list (lookup-node package-name)) + (lambda (node) + (map lookup-node + (remove exists? + (node-dependencies node)))) + node-name)))) diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm index b6592f78a9..d47be584ae 100644 --- a/guix/scripts/import/cran.scm +++ b/guix/scripts/import/cran.scm @@ -98,10 +98,9 @@ Import and convert the CRAN package for PACKAGE-NAME.\n")) (if (assoc-ref opts 'recursive) ;; Recursive import (map package->definition - (reverse - (stream->list - (cran-recursive-import package-name - (or (assoc-ref opts 'repo) 'cran))))) + (stream->list + (cran-recursive-import package-name + (or (assoc-ref opts 'repo) 'cran)))) ;; Single import (let ((sexp (cran->guix-package package-name (or (assoc-ref opts 'repo) 'cran)))) diff --git a/guix/scripts/import/crate.scm b/guix/scripts/import/crate.scm index 4690cceb4d..a388dc368d 100644 --- a/guix/scripts/import/crate.scm +++ b/guix/scripts/import/crate.scm @@ -101,9 +101,8 @@ Import and convert the crate.io package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (reverse - (stream->list - (crate-recursive-import name)))) + (stream->list + (crate-recursive-import name))) (let ((sexp (crate->guix-package name version))) (unless sexp (leave (G_ "failed to download meta-data for package '~a'~%") diff --git a/guix/scripts/import/elpa.scm b/guix/scripts/import/elpa.scm index f1ed5016ba..3cdb49eae4 100644 --- a/guix/scripts/import/elpa.scm +++ b/guix/scripts/import/elpa.scm @@ -101,10 +101,9 @@ Import the latest package named PACKAGE-NAME from an ELPA repository.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (reverse - (stream->list - (elpa-recursive-import package-name - (or (assoc-ref opts 'repo) 'gnu))))) + (stream->list + (elpa-recursive-import package-name + (or (assoc-ref opts 'repo) 'gnu)))) (let ((sexp (elpa->guix-package package-name (assoc-ref opts 'repo)))) (unless sexp (leave (G_ "failed to download package '~a'~%") package-name)) diff --git a/guix/scripts/import/gem.scm b/guix/scripts/import/gem.scm index b6d9ccaae4..afd7bf6d3e 100644 --- a/guix/scripts/import/gem.scm +++ b/guix/scripts/import/gem.scm @@ -95,9 +95,8 @@ Import and convert the RubyGems package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (reverse - (stream->list - (gem-recursive-import package-name 'rubygems)))) + (stream->list + (gem-recursive-import package-name 'rubygems))) (let ((sexp (gem->guix-package package-name))) (unless sexp (leave (G_ "failed to download meta-data for package '~a'~%") diff --git a/guix/scripts/import/hackage.scm b/guix/scripts/import/hackage.scm index f4aac61078..023cc1e700 100644 --- a/guix/scripts/import/hackage.scm +++ b/guix/scripts/import/hackage.scm @@ -130,9 +130,8 @@ version.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (reverse - (stream->list - (apply hackage-recursive-import arguments)))) + (stream->list + (apply hackage-recursive-import arguments))) ;; Single import (apply hackage->guix-package arguments)))) (unless sexp (error-fn)) diff --git a/guix/scripts/import/opam.scm b/guix/scripts/import/opam.scm index 2d249a213f..10410f714d 100644 --- a/guix/scripts/import/opam.scm +++ b/guix/scripts/import/opam.scm @@ -94,9 +94,8 @@ Import and convert the opam package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (reverse - (stream->list - (opam-recursive-import package-name)))) + (stream->list + (opam-recursive-import package-name))) ;; Single import (let ((sexp (opam->guix-package package-name))) (unless sexp diff --git a/guix/scripts/import/pypi.scm b/guix/scripts/import/pypi.scm index 7bd83818ba..f5f34b3c1b 100644 --- a/guix/scripts/import/pypi.scm +++ b/guix/scripts/import/pypi.scm @@ -95,9 +95,8 @@ Import and convert the PyPI package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (reverse - (stream->list - (pypi-recursive-import package-name)))) + (stream->list + (pypi-recursive-import package-name))) ;; Single import (let ((sexp (pypi->guix-package package-name))) (unless sexp diff --git a/guix/scripts/import/stackage.scm b/guix/scripts/import/stackage.scm index b4b12581bf..9325341c84 100644 --- a/guix/scripts/import/stackage.scm +++ b/guix/scripts/import/stackage.scm @@ -110,9 +110,8 @@ Import and convert the LTS Stackage package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (reverse - (stream->list - (apply stackage-recursive-import arguments)))) + (stream->list + (apply stackage-recursive-import arguments))) ;; Single import (apply stackage->guix-package arguments)))) (unless sexp (error-fn)) diff --git a/tests/gem.scm b/tests/gem.scm index a12edb294c..82b2c3cea1 100644 --- a/tests/gem.scm +++ b/tests/gem.scm @@ -123,22 +123,21 @@ (_ (error "Unexpected URL: " url))))) (match (stream->list (gem-recursive-import "foo")) ((('package - ('name "ruby-foo") + ('name "ruby-bar") ('version "1.0.0") ('source ('origin ('method 'url-fetch) - ('uri ('rubygems-uri "foo" 'version)) + ('uri ('rubygems-uri "bar" 'version)) ('sha256 ('base32 "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) ('build-system 'ruby-build-system) ('propagated-inputs ('quasiquote - (("bundler" ('unquote 'bundler)) - ("ruby-bar" ('unquote 'ruby-bar))))) - ('synopsis "A cool gem") - ('description "This package provides a cool gem") + (('"bundler" ('unquote 'bundler))))) + ('synopsis "Another cool gem") + ('description "Another cool gem") ('home-page "https://example.com") ('license ('list 'license:expat 'license:asl2.0))) ('package @@ -157,21 +156,22 @@ ('home-page "https://bundler.io/") ('license 'license:expat)) ('package - ('name "ruby-bar") + ('name "ruby-foo") ('version "1.0.0") ('source ('origin ('method 'url-fetch) - ('uri ('rubygems-uri "bar" 'version)) + ('uri ('rubygems-uri "foo" 'version)) ('sha256 ('base32 "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) ('build-system 'ruby-build-system) ('propagated-inputs ('quasiquote - (('"bundler" ('unquote 'bundler))))) - ('synopsis "Another cool gem") - ('description "Another cool gem") + (("bundler" ('unquote 'bundler)) + ("ruby-bar" ('unquote 'ruby-bar))))) + ('synopsis "A cool gem") + ('description "This package provides a cool gem") ('home-page "https://example.com") ('license ('list 'license:expat 'license:asl2.0)))) #t) diff --git a/tests/import-utils.scm b/tests/import-utils.scm index c3ab25d788..3400433bbb 100644 --- a/tests/import-utils.scm +++ b/tests/import-utils.scm @@ -24,7 +24,9 @@ #:use-module (guix packages) #:use-module (guix build-system) #:use-module (gnu packages) - #:use-module (srfi srfi-64)) + #:use-module (srfi srfi-41) + #:use-module (srfi srfi-64) + #:use-module (ice-9 match)) (test-begin "import-utils") @@ -41,6 +43,27 @@ 'license:lgpl2.0 (license->symbol license:lgpl2.0)) +(test-equal "recursive-import" + '((package ;package expressions in topological order + (name "bar")) + (package + (name "foo") + (inputs `(("bar" ,bar))))) + (stream->list + (recursive-import "foo" 'repo + #:repo->guix-package + (match-lambda* + (("foo" 'repo) + (values '(package + (name "foo") + (inputs `(("bar" ,bar)))) + '("bar"))) + (("bar" 'repo) + (values '(package + (name "bar")) + '()))) + #:guix-name identity))) + (test-assert "alist->package with simple source" (let* ((meta '(("name" . "hello") ("version" . "2.10") -- cgit v1.2.3 From 70a8e13277d4a44b89dd9ee2290b98105f0235f1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 11 Dec 2019 10:52:58 +0100 Subject: import: utils: 'recursive-import' returns a list rather than a stream. * guix/import/utils.scm (recursive-import): Remove 'list->stream' call. * guix/scripts/import/cran.scm (guix-import-cran): Remove 'stream->list' call. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * guix/scripts/import/gem.scm (guix-import-gem): Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage): Likewise. * guix/scripts/import/opam.scm (guix-import-opam): Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi): Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage): Likewise. * tests/gem.scm ("gem-recursive-import"): Likewise. * tests/import-utils.scm ("recursive-import"): Likewise. Co-authored-by: Brian Leung --- guix/import/utils.scm | 16 +++++++--------- guix/scripts/import/cran.scm | 6 ++---- guix/scripts/import/crate.scm | 4 +--- guix/scripts/import/elpa.scm | 6 ++---- guix/scripts/import/gem.scm | 4 +--- guix/scripts/import/hackage.scm | 4 +--- guix/scripts/import/opam.scm | 4 +--- guix/scripts/import/pypi.scm | 4 +--- guix/scripts/import/stackage.scm | 4 +--- tests/gem.scm | 3 +-- tests/import-utils.scm | 28 +++++++++++++--------------- 11 files changed, 31 insertions(+), 52 deletions(-) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index ef7c13259d..47fc8276a9 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -44,7 +44,6 @@ #:use-module (srfi srfi-9) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) - #:use-module (srfi srfi-41) #:export (factorize-uri flatten @@ -422,11 +421,10 @@ name corresponding to the upstream name." (receive (package dependencies) (repo->guix-package name repo) (make-node name package dependencies))) - (list->stream ;TODO: remove streams - (map node-package - (topological-sort (list (lookup-node package-name)) - (lambda (node) - (map lookup-node - (remove exists? - (node-dependencies node)))) - node-name)))) + (map node-package + (topological-sort (list (lookup-node package-name)) + (lambda (node) + (map lookup-node + (remove exists? + (node-dependencies node)))) + node-name))) diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm index d47be584ae..d6f371ef3a 100644 --- a/guix/scripts/import/cran.scm +++ b/guix/scripts/import/cran.scm @@ -27,7 +27,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) - #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-cran)) @@ -98,9 +97,8 @@ Import and convert the CRAN package for PACKAGE-NAME.\n")) (if (assoc-ref opts 'recursive) ;; Recursive import (map package->definition - (stream->list - (cran-recursive-import package-name - (or (assoc-ref opts 'repo) 'cran)))) + (cran-recursive-import package-name + (or (assoc-ref opts 'repo) 'cran))) ;; Single import (let ((sexp (cran->guix-package package-name (or (assoc-ref opts 'repo) 'cran)))) diff --git a/guix/scripts/import/crate.scm b/guix/scripts/import/crate.scm index a388dc368d..92034dab3c 100644 --- a/guix/scripts/import/crate.scm +++ b/guix/scripts/import/crate.scm @@ -28,7 +28,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) - #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-crate)) @@ -101,8 +100,7 @@ Import and convert the crate.io package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (stream->list - (crate-recursive-import name))) + (crate-recursive-import name)) (let ((sexp (crate->guix-package name version))) (unless sexp (leave (G_ "failed to download meta-data for package '~a'~%") diff --git a/guix/scripts/import/elpa.scm b/guix/scripts/import/elpa.scm index 3cdb49eae4..d270d2b4bc 100644 --- a/guix/scripts/import/elpa.scm +++ b/guix/scripts/import/elpa.scm @@ -27,7 +27,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) - #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-elpa)) @@ -101,9 +100,8 @@ Import the latest package named PACKAGE-NAME from an ELPA repository.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (stream->list - (elpa-recursive-import package-name - (or (assoc-ref opts 'repo) 'gnu)))) + (elpa-recursive-import package-name + (or (assoc-ref opts 'repo) 'gnu))) (let ((sexp (elpa->guix-package package-name (assoc-ref opts 'repo)))) (unless sexp (leave (G_ "failed to download package '~a'~%") package-name)) diff --git a/guix/scripts/import/gem.scm b/guix/scripts/import/gem.scm index afd7bf6d3e..c64596b514 100644 --- a/guix/scripts/import/gem.scm +++ b/guix/scripts/import/gem.scm @@ -26,7 +26,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) - #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-gem)) @@ -95,8 +94,7 @@ Import and convert the RubyGems package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (stream->list - (gem-recursive-import package-name 'rubygems))) + (gem-recursive-import package-name 'rubygems)) (let ((sexp (gem->guix-package package-name))) (unless sexp (leave (G_ "failed to download meta-data for package '~a'~%") diff --git a/guix/scripts/import/hackage.scm b/guix/scripts/import/hackage.scm index 023cc1e700..710e786a79 100644 --- a/guix/scripts/import/hackage.scm +++ b/guix/scripts/import/hackage.scm @@ -27,7 +27,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) - #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-hackage)) @@ -130,8 +129,7 @@ version.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (stream->list - (apply hackage-recursive-import arguments))) + (apply hackage-recursive-import arguments)) ;; Single import (apply hackage->guix-package arguments)))) (unless sexp (error-fn)) diff --git a/guix/scripts/import/opam.scm b/guix/scripts/import/opam.scm index 10410f714d..20da1437fe 100644 --- a/guix/scripts/import/opam.scm +++ b/guix/scripts/import/opam.scm @@ -25,7 +25,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) - #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-opam)) @@ -94,8 +93,7 @@ Import and convert the opam package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (stream->list - (opam-recursive-import package-name))) + (opam-recursive-import package-name)) ;; Single import (let ((sexp (opam->guix-package package-name))) (unless sexp diff --git a/guix/scripts/import/pypi.scm b/guix/scripts/import/pypi.scm index f5f34b3c1b..33167174e2 100644 --- a/guix/scripts/import/pypi.scm +++ b/guix/scripts/import/pypi.scm @@ -26,7 +26,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) - #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-pypi)) @@ -95,8 +94,7 @@ Import and convert the PyPI package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (stream->list - (pypi-recursive-import package-name))) + (pypi-recursive-import package-name)) ;; Single import (let ((sexp (pypi->guix-package package-name))) (unless sexp diff --git a/guix/scripts/import/stackage.scm b/guix/scripts/import/stackage.scm index 9325341c84..d77328dcbf 100644 --- a/guix/scripts/import/stackage.scm +++ b/guix/scripts/import/stackage.scm @@ -27,7 +27,6 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) - #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-stackage)) @@ -110,8 +109,7 @@ Import and convert the LTS Stackage package for PACKAGE-NAME.\n")) `(define-public ,(string->symbol name) ,pkg)) (_ #f)) - (stream->list - (apply stackage-recursive-import arguments))) + (apply stackage-recursive-import arguments)) ;; Single import (apply stackage->guix-package arguments)))) (unless sexp (error-fn)) diff --git a/tests/gem.scm b/tests/gem.scm index 82b2c3cea1..5158238d18 100644 --- a/tests/gem.scm +++ b/tests/gem.scm @@ -24,7 +24,6 @@ #:use-module (gcrypt hash) #:use-module (guix tests) #:use-module ((guix build utils) #:select (delete-file-recursively)) - #:use-module (srfi srfi-41) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) @@ -121,7 +120,7 @@ (values (open-input-string test-bundler-json) (string-length test-bundler-json))) (_ (error "Unexpected URL: " url))))) - (match (stream->list (gem-recursive-import "foo")) + (match (gem-recursive-import "foo") ((('package ('name "ruby-bar") ('version "1.0.0") diff --git a/tests/import-utils.scm b/tests/import-utils.scm index 3400433bbb..87dda3238f 100644 --- a/tests/import-utils.scm +++ b/tests/import-utils.scm @@ -24,7 +24,6 @@ #:use-module (guix packages) #:use-module (guix build-system) #:use-module (gnu packages) - #:use-module (srfi srfi-41) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) @@ -49,20 +48,19 @@ (package (name "foo") (inputs `(("bar" ,bar))))) - (stream->list - (recursive-import "foo" 'repo - #:repo->guix-package - (match-lambda* - (("foo" 'repo) - (values '(package - (name "foo") - (inputs `(("bar" ,bar)))) - '("bar"))) - (("bar" 'repo) - (values '(package - (name "bar")) - '()))) - #:guix-name identity))) + (recursive-import "foo" 'repo + #:repo->guix-package + (match-lambda* + (("foo" 'repo) + (values '(package + (name "foo") + (inputs `(("bar" ,bar)))) + '("bar"))) + (("bar" 'repo) + (values '(package + (name "bar")) + '()))) + #:guix-name identity)) (test-assert "alist->package with simple source" (let* ((meta '(("name" . "hello") -- cgit v1.2.3 From 4982de4c3299f367ab582e0865c39186a12ab3a1 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Wed, 11 Dec 2019 11:30:47 +0100 Subject: import: crate: Add recursive import test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tests/crate.scm (test-crate): Rename to... (test-foo-crate): ... this. (test-dependencies): Rename to... (test-foo-dependencies): ... this. (test-root-crate, test-root-dependencies, test-intermediate-1-crate) (test-intermediate-1-dependencies, test-intermediate-2-crate) (test-intermediate-2-dependencies, test-leaf-alice-crate) (test-leaf-alice-dependencies, test-leaf-bob-crate) (test-leaf-bob-dependencies): New variables. ("crate->guix-package"): Adjust accordingly. ("cargo-recursive-import"): New test. Co-authored-by: Ludovic Courtès --- tests/crate.scm | 334 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 330 insertions(+), 4 deletions(-) diff --git a/tests/crate.scm b/tests/crate.scm index c14862ad9f..fc6a8ac24d 100644 --- a/tests/crate.scm +++ b/tests/crate.scm @@ -28,7 +28,7 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-64)) -(define test-crate +(define test-foo-crate "{ \"crate\": { \"max_version\": \"1.0.0\", @@ -50,7 +50,7 @@ } }") -(define test-dependencies +(define test-foo-dependencies "{ \"dependencies\": [ { @@ -60,6 +60,176 @@ ] }") +(define test-root-crate + "{ + \"crate\": { + \"max_version\": \"1.0.0\", + \"name\": \"root\", + \"description\": \"summary\", + \"homepage\": \"http://example.com\", + \"repository\": \"http://example.com\", + \"keywords\": [\"dummy\" \"test\"], + \"categories\": [\"test\"] + \"actual_versions\": [ + { \"id\": \"foo\", + \"num\": \"1.0.0\", + \"license\": \"MIT OR Apache-2.0\", + \"links\": { + \"dependencies\": \"/api/v1/crates/root/1.0.0/dependencies\" + } + } + ] + } +}") + +(define test-root-dependencies + "{ + \"dependencies\": [ + { + \"crate_id\": \"intermediate-1\", + \"kind\": \"normal\", + }, + { + \"crate_id\": \"intermediate-2\", + \"kind\": \"normal\", + } + { + \"crate_id\": \"leaf-alice\", + \"kind\": \"normal\", + }, + { + \"crate_id\": \"leaf-bob\", + \"kind\": \"normal\", + }, + ] +}") + +(define test-intermediate-1-crate + "{ + \"crate\": { + \"max_version\": \"1.0.0\", + \"name\": \"intermediate-1\", + \"description\": \"summary\", + \"homepage\": \"http://example.com\", + \"repository\": \"http://example.com\", + \"keywords\": [\"dummy\" \"test\"], + \"categories\": [\"test\"] + \"actual_versions\": [ + { \"id\": \"intermediate-1\", + \"num\": \"1.0.0\", + \"license\": \"MIT OR Apache-2.0\", + \"links\": { + \"dependencies\": \"/api/v1/crates/intermediate-1/1.0.0/dependencies\" + } + } + ] + } +}") + +(define test-intermediate-1-dependencies + "{ + \"dependencies\": [ + { + \"crate_id\": \"intermediate-2\", + \"kind\": \"normal\", + }, + { + \"crate_id\": \"leaf-alice\", + \"kind\": \"normal\", + }, + { + \"crate_id\": \"leaf-bob\", + \"kind\": \"normal\", + } + ] +}") + +(define test-intermediate-2-crate + "{ + \"crate\": { + \"max_version\": \"1.0.0\", + \"name\": \"intermediate-2\", + \"description\": \"summary\", + \"homepage\": \"http://example.com\", + \"repository\": \"http://example.com\", + \"keywords\": [\"dummy\" \"test\"], + \"categories\": [\"test\"] + \"actual_versions\": [ + { \"id\": \"intermediate-2\", + \"num\": \"1.0.0\", + \"license\": \"MIT OR Apache-2.0\", + \"links\": { + \"dependencies\": \"/api/v1/crates/intermediate-2/1.0.0/dependencies\" + } + } + ] + } +}") + +(define test-intermediate-2-dependencies + "{ + \"dependencies\": [ + { + \"crate_id\": \"leaf-bob\", + \"kind\": \"normal\", + }, + ] +}") + +(define test-leaf-alice-crate + "{ + \"crate\": { + \"max_version\": \"1.0.0\", + \"name\": \"leaf-alice\", + \"description\": \"summary\", + \"homepage\": \"http://example.com\", + \"repository\": \"http://example.com\", + \"keywords\": [\"dummy\" \"test\"], + \"categories\": [\"test\"] + \"actual_versions\": [ + { \"id\": \"leaf-alice\", + \"num\": \"1.0.0\", + \"license\": \"MIT OR Apache-2.0\", + \"links\": { + \"dependencies\": \"/api/v1/crates/leaf-alice/1.0.0/dependencies\" + } + } + ] + } +}") + +(define test-leaf-alice-dependencies + "{ + \"dependencies\": [] +}") + +(define test-leaf-bob-crate + "{ + \"crate\": { + \"max_version\": \"1.0.0\", + \"name\": \"leaf-bob\", + \"description\": \"summary\", + \"homepage\": \"http://example.com\", + \"repository\": \"http://example.com\", + \"keywords\": [\"dummy\" \"test\"], + \"categories\": [\"test\"] + \"actual_versions\": [ + { \"id\": \"leaf-bob\", + \"num\": \"1.0.0\", + \"license\": \"MIT OR Apache-2.0\", + \"links\": { + \"dependencies\": \"/api/v1/crates/leaf-bob/1.0.0/dependencies\" + } + } + ] + } +}") + +(define test-leaf-bob-dependencies + "{ + \"dependencies\": [] +}") + (define test-source-hash "") @@ -79,14 +249,14 @@ (lambda (url . rest) (match url ("https://crates.io/api/v1/crates/foo" - (open-input-string test-crate)) + (open-input-string test-foo-crate)) ("https://crates.io/api/v1/crates/foo/1.0.0/download" (set! test-source-hash (bytevector->nix-base32-string (sha256 (string->bytevector "empty file\n" "utf-8")))) (open-input-string "empty file\n")) ("https://crates.io/api/v1/crates/foo/1.0.0/dependencies" - (open-input-string test-dependencies)) + (open-input-string test-foo-dependencies)) (_ (error "Unexpected URL: " url))))) (match (crate->guix-package "foo") (('package @@ -111,4 +281,160 @@ (x (pk 'fail x #f))))) +(test-assert "cargo-recursive-import" + ;; Replace network resources with sample data. + (mock ((guix http-client) http-fetch + (lambda (url . rest) + (match url + ("https://crates.io/api/v1/crates/root" + (open-input-string test-root-crate)) + ("https://crates.io/api/v1/crates/root/1.0.0/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/root/1.0.0/dependencies" + (open-input-string test-root-dependencies)) + ("https://crates.io/api/v1/crates/intermediate-1" + (open-input-string test-intermediate-1-crate)) + ("https://crates.io/api/v1/crates/intermediate-1/1.0.0/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/intermediate-1/1.0.0/dependencies" + (open-input-string test-intermediate-1-dependencies)) + ("https://crates.io/api/v1/crates/intermediate-2" + (open-input-string test-intermediate-2-crate)) + ("https://crates.io/api/v1/crates/intermediate-2/1.0.0/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/intermediate-2/1.0.0/dependencies" + (open-input-string test-intermediate-2-dependencies)) + ("https://crates.io/api/v1/crates/leaf-alice" + (open-input-string test-leaf-alice-crate)) + ("https://crates.io/api/v1/crates/leaf-alice/1.0.0/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/leaf-alice/1.0.0/dependencies" + (open-input-string test-leaf-alice-dependencies)) + ("https://crates.io/api/v1/crates/leaf-bob" + (open-input-string test-leaf-bob-crate)) + ("https://crates.io/api/v1/crates/leaf-bob/1.0.0/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/leaf-bob/1.0.0/dependencies" + (open-input-string test-leaf-bob-dependencies)) + (_ (error "Unexpected URL: " url))))) + (match (crate-recursive-import "root") + ;; rust-intermediate-2 has no dependency on the rust-leaf-alice package, so this is a valid ordering + ((('package + ('name "rust-leaf-alice") + ('version (? string? ver)) + ('source + ('origin + ('method 'url-fetch) + ('uri ('crate-uri "leaf-alice" 'version)) + ('file-name + ('string-append 'name "-" 'version ".tar.gz")) + ('sha256 + ('base32 + (? string? hash))))) + ('build-system 'cargo-build-system) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license ('list 'license:expat 'license:asl2.0))) + ('package + ('name "rust-leaf-bob") + ('version (? string? ver)) + ('source + ('origin + ('method 'url-fetch) + ('uri ('crate-uri "leaf-bob" 'version)) + ('file-name + ('string-append 'name "-" 'version ".tar.gz")) + ('sha256 + ('base32 + (? string? hash))))) + ('build-system 'cargo-build-system) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license ('list 'license:expat 'license:asl2.0))) + ('package + ('name "rust-intermediate-2") + ('version (? string? ver)) + ('source + ('origin + ('method 'url-fetch) + ('uri ('crate-uri "intermediate-2" 'version)) + ('file-name + ('string-append 'name "-" 'version ".tar.gz")) + ('sha256 + ('base32 + (? string? hash))))) + ('build-system 'cargo-build-system) + ('arguments + ('quasiquote + ('#:cargo-inputs (("rust-leaf-bob" ('unquote rust-leaf-bob)))))) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license ('list 'license:expat 'license:asl2.0))) + ('package + ('name "rust-intermediate-1") + ('version (? string? ver)) + ('source + ('origin + ('method 'url-fetch) + ('uri ('crate-uri "intermediate-1" 'version)) + ('file-name + ('string-append 'name "-" 'version ".tar.gz")) + ('sha256 + ('base32 + (? string? hash))))) + ('build-system 'cargo-build-system) + ('arguments + ('quasiquote + ('#:cargo-inputs (("rust-intermediate-2" ('unquote rust-intermediate-2)) + ("rust-leaf-alice" ('unquote rust-leaf-alice)) + ("rust-leaf-bob" ('unquote rust-leaf-bob)))))) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license ('list 'license:expat 'license:asl2.0))) + ('package + ('name "rust-root") + ('version (? string? ver)) + ('source + ('origin + ('method 'url-fetch) + ('uri ('crate-uri "root" 'version)) + ('file-name + ('string-append 'name "-" 'version ".tar.gz")) + ('sha256 + ('base32 + (? string? hash))))) + ('build-system 'cargo-build-system) + ('arguments + ('quasiquote + ('#:cargo-inputs (("rust-intermediate-1" ('unquote rust-intermediate-1)) + ("rust-intermediate-2" ('unquote rust-intermediate-2)) + ("rust-leaf-alice" ('unquote rust-leaf-alice)) + ("rust-leaf-bob" ('unquote rust-leaf-bob)))))) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license ('list 'license:expat 'license:asl2.0)))) + #t) + (x + (pk 'fail x #f))))) + (test-end "crate") -- cgit v1.2.3 From 263a267b75e472cb84428571580dabd99d5dff0c Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Tue, 26 Nov 2019 21:17:21 +0100 Subject: import: crate: Better handle license expressions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/import/crate.scm (%dual-license-rx): Removed function. (crate->guix-package): Handle most of the multi-licensing cases. * tests/crate.scm (licenses): Add tests for some licenses. Co-authored-by: Ludovic Courtès --- guix/import/crate.scm | 17 ++++++++--------- tests/crate.scm | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 8dc014d232..4c3f8000d0 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -178,21 +178,20 @@ and LICENSE." (close-port port) pkg)) -(define %dual-license-rx - ;; Dual licensing is represented by a string such as "MIT OR Apache-2.0". - ;; This regexp matches that. - (make-regexp "^(.*) OR (.*)$")) +(define (string->license string) + (filter-map (lambda (license) + (and (not (string-null? license)) + (not (any (lambda (elem) (string=? elem license)) + '("AND" "OR" "WITH"))) + (or (spdx-string->license license) + 'unknown-license!))) + (string-split string (string->char-set " /")))) (define* (crate->guix-package crate-name #:optional version) "Fetch the metadata for CRATE-NAME from crates.io, and return the `package' s-expression corresponding to that package, or #f on failure. When VERSION is specified, attempt to fetch that version; otherwise fetch the latest version of CRATE-NAME." - (define (string->license string) - (match (regexp-exec %dual-license-rx string) - (#f (list (spdx-string->license string))) - (m (list (spdx-string->license (match:substring m 1)) - (spdx-string->license (match:substring m 2)))))) (define (normal-dependency? dependency) (eq? (crate-dependency-kind dependency) 'normal)) diff --git a/tests/crate.scm b/tests/crate.scm index fc6a8ac24d..61933a8de8 100644 --- a/tests/crate.scm +++ b/tests/crate.scm @@ -233,6 +233,9 @@ (define test-source-hash "") +(define string->license + (@@ (guix import crate) string->license)) + (test-begin "crate") (test-equal "guix-package->crate-name" @@ -437,4 +440,24 @@ (x (pk 'fail x #f))))) +(test-equal "licenses: MIT OR Apache-2.0" + '(license:expat license:asl2.0) + (string->license "MIT OR Apache-2.0")) + +(test-equal "licenses: Apache-2.0 / MIT" + '(license:asl2.0 license:expat) + (string->license "Apache-2.0 / MIT")) + +(test-equal "licenses: Apache-2.0 WITH LLVM-exception" + '(license:asl2.0 unknown-license!) + (string->license "Apache-2.0 WITH LLVM-exception")) + +(test-equal "licenses: MIT/Apache-2.0 AND BSD-2-Clause" + '(license:expat license:asl2.0 unknown-license!) + (string->license "MIT/Apache-2.0 AND BSD-2-Clause")) + +(test-equal "licenses: MIT/Apache-2.0" + '(license:expat license:asl2.0) + (string->license "MIT/Apache-2.0")) + (test-end "crate") -- cgit v1.2.3 From a0993c29da668f85ba16b209c4c064c3af4e6bd3 Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Wed, 4 Dec 2019 17:02:04 +0100 Subject: gnu: Add vde2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/networking.scm (vde2): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/networking.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 3ddf5975d7..e4190e98d4 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -35,6 +35,7 @@ ;;; Copyright © 2019 Alex Griffin ;;; Copyright © 2019 Jan Wielkiewicz ;;; Copyright © 2019 Daniel Schaefer +;;; Copyright © 2019 Diego N. Barbato ;;; ;;; This file is part of GNU Guix. ;;; @@ -2822,3 +2823,33 @@ to be a teaching tool and presents the subnetting results as easy-to-understand binary values.") (home-page "http://jodies.de/ipcalc") (license license:gpl2+))) + +(define-public vde2 + (package + (name "vde2") + (version "2.3.2") + (source + (origin + (method url-fetch) + (uri "mirror://sourceforge/vde/vde2/2.3.2/vde2-2.3.2.tar.gz") + (sha256 + (base32 "14xga0ib6p1wrv3hkl4sa89yzjxv7f1vfqaxsch87j6scdm59pr2")))) + (build-system gnu-build-system) + (arguments + `(#:parallel-build? #f)) ; Build fails if #t. + (inputs + `(("python" ,python) + ("libpcap" ,libpcap) + ("openssl" ,openssl-1.0))) ; Build fails with 1.1. + (home-page "https://github.com/virtualsquare/vde-2") + (synopsis "Virtual Distributed Ethernet") + (description "VDE is a set of programs to provide virtual software-defined +Ethernet network interface controllers across multiple virtual or +physical, local or remote devices. The VDE architecture provides +virtual counterparts to hardware components such as switches and +cables.") + (license (list license:gpl2 + license:lgpl2.1 ; libvdeplug + (license:non-copyleft ; slirpvde + "file://COPYING.slirpvde" + "See COPYING.slirpvde in the distribution."))))) -- cgit v1.2.3 From 1e2640baacc320e30c852683b6b7544b6290def8 Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Wed, 4 Dec 2019 17:02:05 +0100 Subject: gnu: qemu: Build with vde2 support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/virtualization.scm (qemu)[inputs]: Add vde2. * gnu/packages/virtualization.scm (qemu-minimal)[inputs]: Remove vde2 from inherited inputs. Signed-off-by: Ludovic Courtès --- gnu/packages/virtualization.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index dd0222730f..e83ae43da2 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -220,7 +220,7 @@ exec smbd $@"))) ("spice" ,spice) ("usbredir" ,usbredir) ("util-linux" ,util-linux) - ;; ("vde2" ,vde2) + ("vde2" ,vde2) ("virglrenderer" ,virglrenderer) ("zlib" ,zlib))) (native-inputs `(("gettext" ,gettext-minimal) @@ -268,7 +268,7 @@ server and embedded PowerPC, and S390 guests.") '("gettext"))) (inputs (fold alist-delete (package-inputs qemu) '("libusb" "mesa" "sdl2" "spice" "virglrenderer" "gtk+" - "usbredir" "libdrm" "libepoxy" "pulseaudio"))))) + "usbredir" "libdrm" "libepoxy" "pulseaudio" "vde2"))))) ;; The GRUB test suite fails with later versions of Qemu, so we ;; keep it at 2.10 for now. See -- cgit v1.2.3 From b47e083b594dc2c6c26e93723e6244d964f4d19d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 11 Dec 2019 12:21:54 +0100 Subject: gnu: vpnc-scripts: Use WRAP-SCRIPT. * gnu/packages/vpn.scm (vpnc-scripts)[arguments]: Use WRAP-SCRIPT instead of WRAP-PROGRAM. [inputs]: Add guile. --- gnu/packages/vpn.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index 1fd313c46c..1c2228c426 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2018 Meiyo Peng ;;; Copyright © 2019 Leo Famulari ;;; Copyright © 2019 Rutger Helling +;;; Copyright © 2019 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,6 +43,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages gettext) #:use-module (gnu packages gnupg) + #:use-module (gnu packages guile) #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages nss) @@ -134,7 +136,8 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.") (base32 "1g41yarz2bl0f73kbjqnywr485ghanbp7nmspklfb0n07yp0z6ak")))) (build-system gnu-build-system) - (inputs `(("coreutils" ,coreutils) + (inputs `(("guile" ,guile-2.2) ; for the wrapper scripts + ("coreutils" ,coreutils) ("grep" ,grep) ("iproute2" ,iproute) ; for ‘ip’ ("net-tools" ,net-tools) ; for ‘ifconfig’, ‘route’ @@ -177,7 +180,7 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.") (let ((out (assoc-ref outputs "out"))) (for-each (lambda (script) - (wrap-program script + (wrap-script (string-append out "/etc/vpnc/" script) `("PATH" ":" prefix ,(map (lambda (name) (let ((input (assoc-ref inputs name))) @@ -189,8 +192,9 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.") "net-tools" "sed" "which"))))) - (find-files (string-append out "/etc/vpnc/vpnc-script") - "^vpnc-script")) + (list "vpnc-script-ptrtd" + "vpnc-script-sshd" + "vpnc-script")) #t)))) #:tests? #f)) ; no tests (home-page "http://git.infradead.org/users/dwmw2/vpnc-scripts.git") -- cgit v1.2.3 From 98aecd3a5eb2b3a4018213eb40ee9966554d8ca2 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 11 Dec 2019 15:42:28 +0100 Subject: gnu: python-argcomplete: Update to 1.10.3. Co-authored-by: pimi * gnu/packages/python-xyz.scm (python-argcomplete): Update to 1.10.3. [arguments]: Patch completion script to keep tool references. [inputs]: Add "grep" and "which". [native-inputs]: Add "python-coverage", "python-flake8", "python-wheel", and "fish". --- gnu/packages/python-xyz.scm | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 57c40aa3f0..03dddcde43 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -11768,19 +11768,41 @@ PNG, JPEG, JPEG2000 and GIF files in pure Python.") (define-public python-argcomplete (package (name "python-argcomplete") - (version "1.7.0") + (version "1.10.3") (source - (origin - (method url-fetch) - (uri (pypi-uri "argcomplete" version)) - (sha256 - (base32 - "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x")))) + (origin + (method url-fetch) + (uri (pypi-uri "argcomplete" version)) + (sha256 + (base32 + "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'embed-tool-references + (lambda _ + (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh" + ((" grep") + (string-append " " (which "grep"))) + ((" egrep") + (string-append " " (which "egrep"))) + (("elif which") + (string-append "elif " (which "which"))) + (("\\$\\(which") + (string-append "$(" (which "which")))) + #t))))) + (inputs + `(("grep" ,grep) + ("which" ,which))) (native-inputs - `(("python-pexpect" ,python-pexpect) + `(("python-coverage" ,python-coverage) + ("python-flake8" ,python-flake8) + ("python-pexpect" ,python-pexpect) + ("python-wheel" ,python-wheel) ("tcsh" ,tcsh) - ("bash-full" ,bash))) ;full Bash for 'test_file_completion' + ("fish" ,fish) + ("bash-full" ,bash))) ;full Bash for 'test_file_completion' (home-page "https://github.com/kislyuk/argcomplete") (synopsis "Shell tab completion for Python argparse") (description "argcomplete provides extensible command line tab completion -- cgit v1.2.3 From 997153a132f8390df7716e281787658c5fc4552c Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Sun, 8 Dec 2019 17:11:34 +0100 Subject: gnu: gnome-shell-extension-dash-to-dock: Update to 66. * gnu/packages/gnome-xyz.scm (gnome-shell-extension-dash-to-dock): Update to 66. Signed-off-by: Efraim Flashner --- gnu/packages/gnome-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm index bc5e4047dd..d05bdf0ac0 100644 --- a/gnu/packages/gnome-xyz.scm +++ b/gnu/packages/gnome-xyz.scm @@ -117,7 +117,7 @@ the Obsidian icon theme.") (define-public gnome-shell-extension-dash-to-dock (package (name "gnome-shell-extension-dash-to-dock") - (version "65") + (version "66") (source (origin (method git-fetch) (uri (git-reference @@ -126,7 +126,7 @@ the Obsidian icon theme.") version)))) (sha256 (base32 - "0ln49l9s0yfl30pi77pz7xlmh63l9vjppi863kry5lay10dsvz47")) + "04krl6rxlp1qc97psraf2kwin7h0mx4c7pnfpi7vhplmvasrwkfh")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments -- cgit v1.2.3 From b0945d6944bcf3ccd77a85c781ce8ebb3c29985c Mon Sep 17 00:00:00 2001 From: Alex Griffin Date: Wed, 11 Dec 2019 13:38:15 -0600 Subject: gnu: netcat-openbsd: Update to 1.206-1. * gnu/packages/admin.scm (netcat-openbsd): Update to 1.206-1. --- gnu/packages/admin.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index e0f239a6ae..c2be85e81e 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -629,7 +629,7 @@ would need and has several interesting built-in capabilities.") (define-public netcat-openbsd (package (name "netcat-openbsd") - (version "1.203-2") + (version "1.206-1") (source (origin (method git-fetch) (uri (git-reference @@ -638,7 +638,7 @@ would need and has several interesting built-in capabilities.") (file-name (git-file-name name version)) (sha256 (base32 - "0j85gzbjzs6yrhgabh3zkwzd27qkr5s0zjjczl0hah8q7yhrjk3m")))) + "08r3mmck3s5pbvwyq19wp5g8jqcxza3cm8nkc6jm7rqn4jdydc4z")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no test suite -- cgit v1.2.3 From 1f3a2ebd6a88e66e1843a49ec348b6ae11afcb29 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 11 Dec 2019 21:58:42 +0100 Subject: gnu: Add emacs-almost-mono-themes. * gnu/packages/emacs-xyz.scm (emacs-almost-mono-themes): New variable. --- gnu/packages/emacs-xyz.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 8207088db7..6a5c192d97 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -19734,6 +19734,30 @@ You can customize: @code{tao-theme-scale-fn}, that returns 16 2-digit numbers; @code{tao-theme-use-height}.") (license license:gpl3+)))) +(define-public emacs-almost-mono-themes + (let ((commit "c3a85c1a665530a5d830665969725cdba8eceb75") + (revision "0")) + (package + (name "emacs-almost-mono-themes") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cryon/almost-mono-themes.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "034k32xkr5ma415hlkbl35z0jxc4sa1inf87hg3y6lrlfl83fyjh")))) + (build-system emacs-build-system) + (home-page "https://github.com/cryon/almost-mono-themes") + (synopsis "Almost monochromatic themes for emacs in a few variants") + (description + "This package provides a collection of almost monochrome Emacs themes: +@code{almost-mono-black} and @code{almost-mono-white}.") + (license license:gpl3+)))) + (define-public emacs-doom-themes (package (name "emacs-doom-themes") -- cgit v1.2.3 From 1e667df433288784e30830031585e1c1fdf462d3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 11 Dec 2019 19:58:46 +0100 Subject: gnu: libvpx: Do not build static libraries. * gnu/packages/video.scm (libvpx)[arguments]: Add "--disable-static" to #:configure-flags. --- gnu/packages/video.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 3bf5a22c87..3280114878 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1454,6 +1454,7 @@ projects while introducing many more.") (build-system gnu-build-system) (arguments `(#:configure-flags (list "--enable-shared" + "--disable-static" "--as=yasm" ;; Limit size to avoid CVE-2015-1258 "--size-limit=16384x16384" -- cgit v1.2.3 From 29256cbef3ef77afa43628f4bf4a588527a8adee Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 11 Dec 2019 20:11:01 +0100 Subject: gnu: speex: Do not build static libraries. * gnu/packages/xiph.scm (speex)[arguments]: New field. --- gnu/packages/xiph.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm index be02106f9a..61d836a50b 100644 --- a/gnu/packages/xiph.scm +++ b/gnu/packages/xiph.scm @@ -143,6 +143,8 @@ compressed video format.") (base32 "150047wnllz4r94whb9r73l5qf0z5z3rlhy98bawfbblmkq8mbpa")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs -- cgit v1.2.3 From 0222de2c65fa688a65c2435862b842b8706d7db9 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 11 Dec 2019 20:29:50 +0100 Subject: gnu: libgit2: Update to 0.28.4 [security fixes]. This fixes CVE-2019-1348, CVE-2019-1349, CVE-2019-1350, CVE-2019-1351, CVE-2019-1352, CVE-2019-1353, CVE-2019-1354, and CVE-2019-1387. * gnu/packages/version-control.scm (libgit2): Update to 0.28.4. --- gnu/packages/version-control.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 21b3d76796..0e08edda1f 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -531,7 +531,7 @@ everything from small to very large projects with speed and efficiency.") (define-public libgit2 (package (name "libgit2") - (version "0.28.3") + (version "0.28.4") (source (origin (method git-fetch) (uri (git-reference @@ -540,7 +540,7 @@ everything from small to very large projects with speed and efficiency.") (file-name (git-file-name name version)) (sha256 (base32 - "07068flm9xi25wmcs65nyfg6a7ikgfv96i2nhgyj5gzs9gljqiz2")) + "171b25aym4q88bidc4c76y4l6jmdwifm3q9zjqsll0wjhlkycfy1")) (patches (search-patches "libgit2-avoid-python.patch" "libgit2-mtime-0.patch")) -- cgit v1.2.3 From 2ecb5e7901ab9e826f8eb5ff21dbd84fb032c46f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 11 Dec 2019 20:35:48 +0100 Subject: gnu: libssh: Update to 0.9.3 [fixes CVE-2019-14889]. * gnu/packages/ssh.scm (libssh): Update to 0.9.3. [arguments]: Remove #:phases. --- gnu/packages/ssh.scm | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index b82d280089..de33effc89 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -71,7 +71,7 @@ (define-public libssh (package (name "libssh") - (version "0.9.2") + (version "0.9.3") (source (origin (method git-fetch) (uri (git-reference @@ -79,23 +79,13 @@ (commit (string-append "libssh-" version)))) (sha256 (base32 - "14g4rvp91skn2hlsjyhkv58vhng65xrf34cfqffixa4al869hzgj")) + "175i3xybg69d5lb078334v6dd3njm743kww8f67ix9w33969rmzf")) (file-name (git-file-name name version)))) (build-system cmake-build-system) (outputs '("out" "debug")) (arguments '(#:configure-flags '("-DWITH_GCRYPT=ON") - #:phases (modify-phases %standard-phases - (add-before 'configure 'avoid-werror - (lambda _ - ;; Avoid '-Werror'. Presumably this works fine with - ;; gcc@8 on x86_64 but leads to errors with our older - ;; compiler. - (substitute* "CompilerChecks.cmake" - (("-Werror=") "-W")) - #t))) - ;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite. #:tests? #f)) (inputs `(("zlib" ,zlib) -- cgit v1.2.3 From 71ce0b52901e49002502d220551dad21c07a7fed Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 11 Dec 2019 21:18:43 +0100 Subject: gnu: fmt: Build shared library instead of static. * gnu/packages/pretty-print.scm (fmt)[arguments]: New field. * gnu/packages/networking.scm (fmt-restinio): Remove variable. (restinio)[propagated-inputs]: Change from FMT-RESTINIO to FMT. (opendht)[inputs]: Likewise. --- gnu/packages/networking.scm | 10 ++-------- gnu/packages/pretty-print.scm | 9 +++++++++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index e4190e98d4..cfa244c39b 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -2523,12 +2523,6 @@ communication over HTTP.") (home-page "https://github.com/Corvusoft/restbed") (license license:agpl3+)))) -(define fmt-restinio - (package - (inherit fmt) - (arguments - '(#:configure-flags '("-DCMAKE_CXX_FLAGS=-fPIC"))))) - (define-public restinio (package (name "restinio") @@ -2553,7 +2547,7 @@ communication over HTTP.") ("sobjectizer" ,sobjectizer))) (propagated-inputs `(("asio", asio) - ("fmt" ,fmt-restinio) + ("fmt" ,fmt) ("http-parser", http-parser))) (arguments `(#:configure-flags '("-DRESTINIO_INSTALL=on") @@ -2592,7 +2586,7 @@ and targeted primarily for asynchronous processing of HTTP-requests.") ("readline" ,readline) ("jsoncpp" ,jsoncpp) ("openssl" ,openssl) - ("fmt" ,fmt-restinio))) + ("fmt" ,fmt))) (propagated-inputs `(("argon2" ,argon2) ; TODO: Needed for the pkg-config .pc file to work? ("msgpack" ,msgpack))) ;included in several installed headers diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index cfe06a0be2..34d49938ac 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -174,6 +174,8 @@ different programming languages.") (base32 "0h148anbaqgch6n69pxsvs1c9wmykgd052wmzgdia7qpz8w6p8dl")))) (build-system cmake-build-system) + (arguments + '(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) (native-inputs `(("unzip" ,unzip))) (home-page "http://fmtlib.net/") @@ -185,6 +187,13 @@ to @code{IOStreams}.") ;; The library is bsd-2, but documentation and tests include other licenses. (license (list bsd-2 bsd-3 psfl)))) +(define-public fmt-restinio + (hidden-package + (package/inherit + fmt + (arguments + '(#:configure-flags '("-DCMAKE_CXX_FLAGS=-fPIC")))))) + (define-public source-highlight (package (name "source-highlight") -- cgit v1.2.3 From dbc533c1683bec0c59ef2977b928c9dfca49eb05 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 11 Dec 2019 21:39:36 +0100 Subject: gnu: seabios: Update to 1.13.0. * gnu/packages/firmware.scm (seabios): Update to 1.13.0. [native-inputs]: Change from PYTHON-2 to PYTHON-WRAPPER. --- gnu/packages/firmware.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index cc92c228ad..12b40389d0 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -186,7 +186,7 @@ by the b43-open driver of Linux-libre.") (define-public seabios (package (name "seabios") - (version "1.12.1") + (version "1.13.0") (source (origin (method git-fetch) @@ -195,10 +195,10 @@ by the b43-open driver of Linux-libre.") (commit (string-append "rel-" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1g9y03r5ky58q2g9rhbwfhs42z0zb9f59wfxpwh6zjqa6fyv1r80")))) + (base32 "1n1bd6msfs7xn8844sz2qnm7hb5x2qfl3zb06kp4bx9vdc3i6619")))) (build-system gnu-build-system) (native-inputs - `(("python-2" ,python-2))) + `(("python" ,python-wrapper))) (arguments `(#:tests? #f ; no check target #:phases -- cgit v1.2.3 From 3158c805f02aea24427299813c5615abdbbdf2a9 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 11 Dec 2019 22:47:26 +0100 Subject: gnu: Add emacs-quasi-monochrome. * gnu/packages/emacs-xyz.scm (emacs-quasi-monochrome): New variable. --- gnu/packages/emacs-xyz.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 6a5c192d97..c7da8b9556 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -19758,6 +19758,30 @@ You can customize: @code{tao-theme-scale-fn}, that returns 16 2-digit numbers; @code{almost-mono-black} and @code{almost-mono-white}.") (license license:gpl3+)))) +(define-public emacs-quasi-monochrome + (let ((commit "68060dbbc0bbfe4924387392874186c5a29bb434") + (revision "0")) + (package + (name "emacs-quasi-monochrome") + (version (git-version "1.2" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/lbolla/emacs-quasi-monochrome.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0zp2xr0bjfqrpb0bqczzick1vvbjmipjavrdi70kw6a9caynvq22")))) + (build-system emacs-build-system) + (home-page "https://github.com/lbolla/emacs-quasi-monochrome") + (synopsis "Dark color theme for Emacs") + (description + "This package provides a dark color theme with a black background, high +contrast and few colors.") + (license license:gpl3+)))) + (define-public emacs-doom-themes (package (name "emacs-doom-themes") -- cgit v1.2.3 From 27664ea0f08e6c207b7b61c1fd7b8446dce98478 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 11 Dec 2019 22:48:39 +0100 Subject: gnu: Remove fmt-restinio. This is a follow-up to commit 71ce0b52901e49002502d220551dad21c07a7fed. * gnu/packages/pretty-print.scm (fmt-restinio): Remove variable. --- gnu/packages/pretty-print.scm | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gnu/packages/pretty-print.scm b/gnu/packages/pretty-print.scm index 34d49938ac..6f2b3f78ea 100644 --- a/gnu/packages/pretty-print.scm +++ b/gnu/packages/pretty-print.scm @@ -187,13 +187,6 @@ to @code{IOStreams}.") ;; The library is bsd-2, but documentation and tests include other licenses. (license (list bsd-2 bsd-3 psfl)))) -(define-public fmt-restinio - (hidden-package - (package/inherit - fmt - (arguments - '(#:configure-flags '("-DCMAKE_CXX_FLAGS=-fPIC")))))) - (define-public source-highlight (package (name "source-highlight") -- cgit v1.2.3