From 1872dce57814eb0a80d9d0163e427b0644554554 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 12 Aug 2021 19:39:20 +0200 Subject: gnu: drones: Remove it. Remove this file as the ardupilot packages are broken for a long time and no one complained. * gnu/packages/drones.scm: Remove it. * gnu/local.mk (GNU_SYSTEM_MODULES): Ditto. --- gnu/local.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 32ac19d20e..5c323d3eb4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -187,7 +187,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/docbook.scm \ %D%/packages/docker.scm \ %D%/packages/documentation.scm \ - %D%/packages/drones.scm \ %D%/packages/dunst.scm \ %D%/packages/dvtm.scm \ %D%/packages/easyrpg.scm \ -- cgit v1.2.3 From 05effbbfc2fc6223aafacf8a3cb2b2d970b6bb66 Mon Sep 17 00:00:00 2001 From: Giovanni Biscuolo Date: Thu, 12 Aug 2021 18:09:02 +0200 Subject: gnu: adb: Make compatible with OpenSSL 1.1. OpenSSL version 1.1 brought some API changes which broke the build here, fix that by accessing rsa->n (and e) directly, using RSA_get0_key instead. * gnu/packages/patches/adb-libssl_11-compatibility.patch: New file * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/android.scm (android-platform-system-core)[origin]: Use it. (adb)[inputs]: Replace openssl-1.0 with openssl. --- gnu/local.mk | 1 + gnu/packages/android.scm | 3 +- .../patches/adb-libssl_11-compatibility.patch | 35 ++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/adb-libssl_11-compatibility.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 5c323d3eb4..6dda311743 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -805,6 +805,7 @@ dist_patch_DATA = \ %D%/packages/patches/abseil-cpp-fix-gtest.patch \ %D%/packages/patches/abseil-cpp-fix-strerror_test.patch \ %D%/packages/patches/adb-add-libraries.patch \ + %D%/packages/patches/adb-libssl_11-compatibility.patch \ %D%/packages/patches/aegis-constness-error.patch \ %D%/packages/patches/aegis-perl-tempdir1.patch \ %D%/packages/patches/aegis-perl-tempdir2.patch \ diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index eb538f6540..99c283dfaf 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -148,6 +148,7 @@ use their packages mostly unmodified in our Android NDK build system.") "libutils-remove-damaging-includes.patch" "libutils-add-includes.patch" "adb-add-libraries.patch" + "adb-libssl_11-compatibility.patch" "libziparchive-add-includes.patch")))) (define (android-platform-system-extras version) @@ -388,7 +389,7 @@ various Android core host applications.") `(("android-libbase" ,android-libbase) ("android-libcutils" ,android-libcutils) ("android-liblog" ,android-liblog) - ("openssl" ,openssl-1.0))) + ("openssl" ,openssl))) (home-page "https://developer.android.com/studio/command-line/adb.html") (synopsis "Android Debug Bridge") (description diff --git a/gnu/packages/patches/adb-libssl_11-compatibility.patch b/gnu/packages/patches/adb-libssl_11-compatibility.patch new file mode 100644 index 0000000000..9affe58b5d --- /dev/null +++ b/gnu/packages/patches/adb-libssl_11-compatibility.patch @@ -0,0 +1,35 @@ +This patch is taken from Debian +URL: https://sources.debian.org/data/main/a/android-platform-system-core/1%3A7.0.0%2Br33-1/debian/patches/adb_libssl_11.diff +Description: adb: Make compatible with openssl 1.1 + OpenSSL version 1.1 brought some API changes which broke the build here, + fix that by accessing rsa->n (and e) directly, using RSA_get0_key instead. +Author: Chirayu Desai n); ++ RSA_get0_key(rsa, &n, &e, NULL); + BN_set_bit(r, RSANUMWORDS * 32); + BN_mod_sqr(rr, r, n, ctx); + BN_div(NULL, rem, n, r32, ctx); +@@ -92,7 +93,7 @@ + BN_div(n, rem, n, r32, ctx); + pkey->n[i] = BN_get_word(rem); + } +- pkey->exponent = BN_get_word(rsa->e); ++ pkey->exponent = BN_get_word(e); + + out: + BN_free(n0inv); -- cgit v1.2.3 From d31301dfe08076e5d229175b2cd093c6fe60a6d5 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 2 Aug 2021 14:15:39 +0530 Subject: gnu: Add python-pyan3. * gnu/packages/python-xyz.scm (python-pyan3): New variable. * gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch, gnu/packages/patches/python-pyan3-fix-positional-arguments.patch: New files. * gnu/local.mk: Register them. --- gnu/local.mk | 2 + .../python-pyan3-fix-absolute-path-bug.patch | 160 +++++++++++++++++++++ .../python-pyan3-fix-positional-arguments.patch | 22 +++ gnu/packages/python-xyz.scm | 42 ++++++ 4 files changed, 226 insertions(+) create mode 100644 gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch create mode 100644 gnu/packages/patches/python-pyan3-fix-positional-arguments.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 6dda311743..8c69ddc907 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1649,6 +1649,8 @@ dist_patch_DATA = \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python-pycrypto-time-clock.patch \ + %D%/packages/patches/python-pyan3-fix-absolute-path-bug.patch \ + %D%/packages/patches/python-pyan3-fix-positional-arguments.patch \ %D%/packages/patches/python-pydot-regression-test.patch \ %D%/packages/patches/python2-pygobject-2-deprecation.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ diff --git a/gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch b/gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch new file mode 100644 index 0000000000..0b6a083fa3 --- /dev/null +++ b/gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch @@ -0,0 +1,160 @@ +From ac1bd55d07fd1bad2f4a92dc0809607c407d9140 Mon Sep 17 00:00:00 2001 +From: "Maciej A. Czyzewski" +Date: Wed, 9 Jun 2021 15:29:18 +0200 +Subject: [PATCH] feature: new params for graphviz + solves #70 + +- solve abs path bug #70 +- new params for graphviz (ranksep; layout) +- tested layout `dot`; `fdp` (square graph) +- updated `.gitignore` (files gen. after `visualize_pyan_architecture.sh`) +--- + .gitignore | 5 ++++ + README.md | 6 ++-- + pyan/main.py | 55 +++++++++++++++++++++++++++++++--- + visualize_pyan_architecture.sh | 5 ++++ + 4 files changed, 64 insertions(+), 7 deletions(-) + +diff --git a/.gitignore b/.gitignore +index 990fdc0c..93313aaf 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -162,3 +162,8 @@ htmlcov + .idea/ + .history/ + .vscode/ ++ ++# our vis. of architecture ++architecture.dot ++architecture.html ++architecture.svg +diff --git a/README.md b/README.md +index d1f19dcf..9e6919a3 100644 +--- a/README.md ++++ b/README.md +@@ -48,7 +48,7 @@ See `pyan3 --help`. + + Example: + +-`pyan *.py --uses --no-defines --colored --grouped --annotated --dot >myuses.dot` ++`pyan3 *.py --uses --no-defines --colored --grouped --annotated --dot >myuses.dot` + + Then render using your favorite GraphViz filter, mainly `dot` or `fdp`: + +@@ -56,11 +56,11 @@ Then render using your favorite GraphViz filter, mainly `dot` or `fdp`: + + Or use directly + +-`pyan *.py --uses --no-defines --colored --grouped --annotated --svg >myuses.svg` ++`pyan3 *.py --uses --no-defines --colored --grouped --annotated --svg >myuses.svg` + + You can also export as an interactive HTML + +-`pyan *.py --uses --no-defines --colored --grouped --annotated --html > myuses.html` ++`pyan3 *.py --uses --no-defines --colored --grouped --annotated --html > myuses.html` + + Alternatively, you can call `pyan` from a script + +diff --git a/pyan/main.py b/pyan/main.py +index 5d079714..b1a16f63 100644 +--- a/pyan/main.py ++++ b/pyan/main.py +@@ -141,6 +141,31 @@ def main(cli_args=None): + ), + ) + ++ parser.add_argument( ++ "--dot-ranksep", ++ default="0.5", ++ dest="ranksep", ++ help=( ++ "specifies the dot graph 'ranksep' property for " ++ "controlling desired rank separation, in inches. " ++ "Allowed values: [0.02 .. 1000.0]. " ++ "[dot only]" ++ ), ++ ) ++ ++ parser.add_argument( ++ "--graphviz-layout", ++ default="dot", ++ dest="layout", ++ help=( ++ "specifies the graphviz 'layout' property for " ++ "the name of the layout algorithm to use. " ++ "Allowed values: ['dot', 'neato', 'fdp', 'sfdp', 'twopi', 'circo']. " ++ "Recommended values: ['dot', 'fdp']. " ++ "[graphviz only]" ++ ), ++ ) ++ + parser.add_argument( + "-a", + "--annotated", +@@ -159,7 +184,12 @@ def main(cli_args=None): + + known_args, unknown_args = parser.parse_known_args(cli_args) + +- filenames = [fn2 for fn in unknown_args for fn2 in glob(fn, recursive=True)] ++ ++ filenames = [] ++ for fn in unknown_args: ++ for fn2 in glob(fn, recursive=True): ++ abs_fn2 = os.path.abspath(fn2) ++ filenames.append(abs_fn2) + + # determine root + if known_args.root is not None: +@@ -203,6 +233,11 @@ def main(cli_args=None): + handler = logging.FileHandler(known_args.logname) + logger.addHandler(handler) + ++ logger.debug(f"[files] {unknown_args}") ++ ++ if root: ++ root = os.path.abspath(root) ++ + v = CallGraphVisitor(filenames, logger=logger, root=root) + + if known_args.function or known_args.namespace: +@@ -222,13 +257,25 @@ def main(cli_args=None): + writer = None + + if known_args.dot: +- writer = DotWriter(graph, options=["rankdir=" + known_args.rankdir], output=known_args.filename, logger=logger) ++ writer = DotWriter(graph, options=[ ++ "rankdir=" + known_args.rankdir, ++ "ranksep=" + known_args.ranksep, ++ "layout=" + known_args.layout, ++ ], output=known_args.filename, logger=logger) + + if known_args.html: +- writer = HTMLWriter(graph, options=["rankdir=" + known_args.rankdir], output=known_args.filename, logger=logger) ++ writer = HTMLWriter(graph, options=[ ++ "rankdir=" + known_args.rankdir, ++ "ranksep=" + known_args.ranksep, ++ "layout=" + known_args.layout, ++ ], output=known_args.filename, logger=logger) + + if known_args.svg: +- writer = SVGWriter(graph, options=["rankdir=" + known_args.rankdir], output=known_args.filename, logger=logger) ++ writer = SVGWriter(graph, options=[ ++ "rankdir=" + known_args.rankdir, ++ "ranksep=" + known_args.ranksep, ++ "layout=" + known_args.layout, ++ ], output=known_args.filename, logger=logger) + + if known_args.tgf: + writer = TgfWriter(graph, output=known_args.filename, logger=logger) +diff --git a/visualize_pyan_architecture.sh b/visualize_pyan_architecture.sh +index 22c63342..81b6ca24 100755 +--- a/visualize_pyan_architecture.sh ++++ b/visualize_pyan_architecture.sh +@@ -2,3 +2,8 @@ + echo -ne "Pyan architecture: generating architecture.{dot,svg}\n" + python3 -m pyan pyan/*.py --no-defines --uses --colored --annotate --dot -V >architecture.dot 2>architecture.log + dot -Tsvg architecture.dot >architecture.svg ++echo -ne "Pyan architecture: generating architecture.{html,graphviz=fdp}\n" ++python3 -m pyan pyan/*.py --no-defines --uses \ ++ --grouped --nested-groups \ ++ --graphviz-layout fdp \ ++ --colored --html > architecture.html diff --git a/gnu/packages/patches/python-pyan3-fix-positional-arguments.patch b/gnu/packages/patches/python-pyan3-fix-positional-arguments.patch new file mode 100644 index 0000000000..81923d7a41 --- /dev/null +++ b/gnu/packages/patches/python-pyan3-fix-positional-arguments.patch @@ -0,0 +1,22 @@ +From 37404bb039bd9c5509b4aec8f61e360dfba50715 Mon Sep 17 00:00:00 2001 +From: Wenxin Ling +Date: Mon, 1 Mar 2021 15:21:16 +0100 +Subject: [PATCH] Fix positional arguments issue for CallGraphVisitor + +--- + pyan/main.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyan/main.py b/pyan/main.py +index 18821a14..5d079714 100644 +--- a/pyan/main.py ++++ b/pyan/main.py +@@ -203,7 +203,7 @@ def main(cli_args=None): + handler = logging.FileHandler(known_args.logname) + logger.addHandler(handler) + +- v = CallGraphVisitor(filenames, logger, root=root) ++ v = CallGraphVisitor(filenames, logger=logger, root=root) + + if known_args.function or known_args.namespace: + diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 56920f68c3..87a90ab680 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -26232,3 +26232,45 @@ for the Go language tool chain; it adapts to different calling conventions and application binary interfaces (ABIs); it takes care of register allocation; it supports x86_64 instructions up to AVX-512 and SHA.") (license license:bsd-2)))) + +(define-public python-pyan3 + (package + (name "python-pyan3") + (version "1.2.0") + (source + (origin + ;; Source tarball on PyPI lacks tests. + (method git-fetch) + (uri (git-reference + (url "https://github.com/Technologicat/pyan") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z")) + (patches (search-patches "python-pyan3-fix-positional-arguments.patch" + "python-pyan3-fix-absolute-path-bug.patch")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Extend PYTHONPATH so the built package will be found. + (setenv "PYTHONPATH" + (string-append (getcwd) ":" (getenv "PYTHONPATH"))) + (invoke "pytest"))))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-wheel" ,python-wheel))) + (propagated-inputs + `(("python-jinja2" ,python-jinja2))) + (home-page "https://github.com/Technologicat/pyan") + (synopsis "Offline call graph generator for Python 3") + (description "Pyan takes one or more Python source files, performs +a (rather superficial) static analysis, and constructs a directed graph of the +objects in the combined source, and how they define or use each other. The +graph can be output for rendering by GraphViz or yEd.") + (license license:gpl2))) -- cgit v1.2.3 From bb61100ee320b749f644f6847dba5bcb92d3c5aa Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Tue, 10 Aug 2021 17:07:16 +0200 Subject: gnu: minetest: Search for mods in MINETEST_MOD_PATH. * gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch: New file. * gnu/packages/games.scm (minetest)[source]{patches}: Add it. (minetest)[native-search-paths]: Add "MINETEST_MOD_PATH". * gnu/local.mk (dist_patch_DATA): Add the patch. Signed-off-by: Leo Prikler --- gnu/local.mk | 1 + gnu/packages/games.scm | 8 +- .../patches/minetest-add-MINETEST_MOD_PATH.patch | 156 +++++++++++++++++++++ 3 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8c69ddc907..3dd9bb5807 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1452,6 +1452,7 @@ dist_patch_DATA = \ %D%/packages/patches/meson-for-build-rpath.patch \ %D%/packages/patches/metabat-fix-compilation.patch \ %D%/packages/patches/mhash-keygen-test-segfault.patch \ + %D%/packages/patches/minetest-add-MINETEST_MOD_PATH.patch \ %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ %D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \ %D%/packages/patches/mingw-w64-reproducible-gendef.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 37d658ee13..291733234e 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -3596,6 +3596,9 @@ match, cannon keep, and grave-itation pit.") (base32 "062ilb7s377q3hwfhl8q06vvcw2raydz5ljzlzwy2dmyzmdcndb8")) (modules '((guix build utils))) + (patches + (search-patches + "minetest-add-MINETEST_MOD_PATH.patch")) (snippet '(begin ;; Delete bundled libraries. @@ -3642,7 +3645,10 @@ match, cannon keep, and grave-itation pit.") (native-search-paths (list (search-path-specification (variable "MINETEST_SUBGAME_PATH") - (files '("share/minetest/games"))))) + (files '("share/minetest/games"))) + (search-path-specification + (variable "MINETEST_MOD_PATH") + (files '("share/minetest/mods"))))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs diff --git a/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch b/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch new file mode 100644 index 0000000000..a74034a2c5 --- /dev/null +++ b/gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch @@ -0,0 +1,156 @@ +From d10ea2ad7efc2364a8a2007b4c6d3e85511e2f84 Mon Sep 17 00:00:00 2001 +From: Maxime Devos +Date: Tue, 3 Aug 2021 01:00:23 +0200 +Subject: [PATCH] Add environment variable MINETEST_MOD_PATH + +This adds an environment variable MINETEST_MOD_PATH. +When it exists, Minetest will look there for mods +in addition to ~/.minetest/mods/. Mods can still be +installed to ~/.minetest/mods/ with the built-in installer. + +With thanks to Leo Prikler. +--- + builtin/mainmenu/pkgmgr.lua | 7 +++---- + doc/menu_lua_api.txt | 8 +++++++- + src/content/subgames.cpp | 11 +++++++++++ + src/script/lua_api/l_mainmenu.cpp | 23 +++++++++++++++++++++++ + src/script/lua_api/l_mainmenu.h | 2 ++ + 5 files changed, 46 insertions(+), 5 deletions(-) + +diff --git a/builtin/mainmenu/pkgmgr.lua b/builtin/mainmenu/pkgmgr.lua +index 787936e31..d8fba0ebe 100644 +--- a/builtin/mainmenu/pkgmgr.lua ++++ b/builtin/mainmenu/pkgmgr.lua +@@ -682,10 +682,9 @@ function pkgmgr.preparemodlist(data) + local game_mods = {} + + --read global mods +- local modpath = core.get_modpath() +- +- if modpath ~= nil and +- modpath ~= "" then ++ local modpaths = core.get_modpaths() ++ --XXX what was ‘modpath ~= ""’ and ‘modpath ~= nil’ for? ++ for _,modpath in ipairs(modpaths) do + get_mods(modpath,global_mods) + end + +diff --git a/doc/menu_lua_api.txt b/doc/menu_lua_api.txt +index b3975bc1d..132444b14 100644 +--- a/doc/menu_lua_api.txt ++++ b/doc/menu_lua_api.txt +@@ -218,7 +218,13 @@ Package - content which is downloadable from the content db, may or may not be i + * returns path to global user data, + the directory that contains user-provided mods, worlds, games, and texture packs. + * core.get_modpath() (possible in async calls) +- * returns path to global modpath ++ * returns path to global modpath, where mods can be installed ++* core.get_modpaths() (possible in async calls) ++ * returns list of paths to global modpaths, where mods have been installed ++ ++ The difference with "core.get_modpath" is that no mods should be installed in these ++ directories by Minetest -- they might be read-only. ++ + * core.get_clientmodpath() (possible in async calls) + * returns path to global client-side modpath + * core.get_gamepath() (possible in async calls) +diff --git a/src/content/subgames.cpp b/src/content/subgames.cpp +index e9dc609b0..d73f95a1f 100644 +--- a/src/content/subgames.cpp ++++ b/src/content/subgames.cpp +@@ -61,6 +61,12 @@ std::string getSubgamePathEnv() + return subgame_path ? std::string(subgame_path) : ""; + } + ++std::string getModPathEnv() ++{ ++ char *mod_path = getenv("MINETEST_MOD_PATH"); ++ return mod_path ? std::string(mod_path) : ""; ++} ++ + SubgameSpec findSubgame(const std::string &id) + { + if (id.empty()) +@@ -110,6 +116,11 @@ SubgameSpec findSubgame(const std::string &id) + std::set mods_paths; + if (!user_game) + mods_paths.insert(share + DIR_DELIM + "mods"); ++ ++ Strfnd mod_search_paths(getModPathEnv()); ++ while (!mod_search_paths.at_end()) ++ mods_paths.insert(mod_search_paths.next(PATH_DELIM)); ++ + if (user != share || user_game) + mods_paths.insert(user + DIR_DELIM + "mods"); + +diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp +index 3e9709bde..903ac3a22 100644 +--- a/src/script/lua_api/l_mainmenu.cpp ++++ b/src/script/lua_api/l_mainmenu.cpp +@@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., + #include "lua_api/l_internal.h" + #include "common/c_content.h" + #include "cpp_api/s_async.h" ++#include "util/strfnd.h" + #include "gui/guiEngine.h" + #include "gui/guiMainMenu.h" + #include "gui/guiKeyChangeMenu.h" +@@ -502,6 +503,26 @@ int ModApiMainMenu::l_get_modpath(lua_State *L) + return 1; + } + ++/******************************************************************************/ ++int ModApiMainMenu::l_get_modpaths(lua_State *L) ++{ ++ const char *c_modpath = getenv("MINETEST_MOD_PATH"); ++ if (c_modpath == NULL) ++ c_modpath = ""; ++ int index = 1; ++ lua_newtable(L); ++ Strfnd mod_search_paths{std::string(c_modpath)}; ++ while (!mod_search_paths.at_end()) { ++ std::string component = mod_search_paths.next(PATH_DELIM); ++ lua_pushstring(L, component.c_str()); ++ lua_rawseti(L, -2, index); ++ index++; ++ } ++ ModApiMainMenu::l_get_modpath(L); ++ lua_rawseti(L, -2, index); ++ return 1; ++} ++ + /******************************************************************************/ + int ModApiMainMenu::l_get_clientmodpath(lua_State *L) + { +@@ -949,6 +970,7 @@ void ModApiMainMenu::Initialize(lua_State *L, int top) + API_FCT(get_mapgen_names); + API_FCT(get_user_path); + API_FCT(get_modpath); ++ API_FCT(get_modpaths); + API_FCT(get_clientmodpath); + API_FCT(get_gamepath); + API_FCT(get_texturepath); +@@ -983,6 +1005,7 @@ void ModApiMainMenu::InitializeAsync(lua_State *L, int top) + API_FCT(get_mapgen_names); + API_FCT(get_user_path); + API_FCT(get_modpath); ++ API_FCT(get_modpaths); + API_FCT(get_clientmodpath); + API_FCT(get_gamepath); + API_FCT(get_texturepath); +diff --git a/src/script/lua_api/l_mainmenu.h b/src/script/lua_api/l_mainmenu.h +index 33ac9e721..a6a54a2cb 100644 +--- a/src/script/lua_api/l_mainmenu.h ++++ b/src/script/lua_api/l_mainmenu.h +@@ -112,6 +112,8 @@ class ModApiMainMenu: public ModApiBase + + static int l_get_modpath(lua_State *L); + ++ static int l_get_modpaths(lua_State *L); ++ + static int l_get_clientmodpath(lua_State *L); + + static int l_get_gamepath(lua_State *L); +-- +2.32.0 + -- cgit v1.2.3 From 7b9d5b6ca023647158bdc0be18ff0f6412097c41 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Tue, 10 Aug 2021 17:07:17 +0200 Subject: gnu: minetest: New package module. Aside from the 'minetest-topic' procedure which will be used for the 'home-page' field of some packages, this module is currently empty. The 'contentdb' importer defined in the following patches will be used to populate this module. * gnu/packages/minetest.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Leo Prikler --- gnu/local.mk | 1 + gnu/packages/minetest.scm | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 gnu/packages/minetest.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3dd9bb5807..14cd1cc6ad 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -383,6 +383,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/mercury.scm \ %D%/packages/mes.scm \ %D%/packages/messaging.scm \ + %D%/packages/minetest.scm \ %D%/packages/mingw.scm \ %D%/packages/microcom.scm \ %D%/packages/moe.scm \ diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm new file mode 100644 index 0000000000..f8aca3005c --- /dev/null +++ b/gnu/packages/minetest.scm @@ -0,0 +1,26 @@ +;;; Copyright © 2021 Maxime Devos +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . +(define-module (gnu packages minetest) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system minetest) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public (minetest-topic topic-id) + "Return an URL (as a string) pointing to the forum topic with +numeric identifier TOPIC-ID on the official Minetest forums." + (string-append "https://forum.minetest.net/viewtopic.php?t=" + (number->string topic-id))) -- cgit v1.2.3 From 1d94000d875fa5372b6562284f15c0c2c90ebaf2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 25 Aug 2021 13:40:53 -0400 Subject: gnu: python-execnet: Update to 1.9.0 and enable tests. * gnu/packages/patches/python-execnet-read-only-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/python-xyz.scm (python-execnet): Update to 1.9.0. [source]: Fix indentation. [arguments]: Enable tests, replacing the default check phase. --- gnu/local.mk | 1 + .../patches/python-execnet-read-only-fix.patch | 77 ++++++++++++++++++++++ gnu/packages/python-xyz.scm | 26 ++++---- 3 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 gnu/packages/patches/python-execnet-read-only-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 14cd1cc6ad..ebcb4c82f5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1635,6 +1635,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-cross-compile.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ + %D%/packages/patches/python-execnet-read-only-fix.patch \ %D%/packages/patches/python-flask-restful-werkzeug-compat.patch \ %D%/packages/patches/python-keras-integration-test.patch \ %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \ diff --git a/gnu/packages/patches/python-execnet-read-only-fix.patch b/gnu/packages/patches/python-execnet-read-only-fix.patch new file mode 100644 index 0000000000..58a4b129a7 --- /dev/null +++ b/gnu/packages/patches/python-execnet-read-only-fix.patch @@ -0,0 +1,77 @@ +From 0d6562a20b0610c5a83d1c66ac879223b84a2746 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Thu, 26 Aug 2021 00:43:26 -0400 +Subject: [PATCH] rsync_remote: Fix a problem when receiving read-only + directories. + +Before this change, when the source directories hierarchy was +read-only, the read-only mode would be preserved at the destination, +preventing child directories to be recreated by a normal user (a +permission denied error, EACCES would be raised). + +* execnet/rsync_remote.py (serve_rsync.receive_directory_structure): +Bitwise OR to ensure the write bit is set on received directories. +* testing/test_rsync.py (TestRSync) +: New test. +--- + execnet/rsync_remote.py | 8 ++++++-- + testing/test_rsync.py | 17 +++++++++++++++++ + 2 files changed, 23 insertions(+), 2 deletions(-) + +diff --git a/execnet/rsync_remote.py b/execnet/rsync_remote.py +index cd5e765..55d154c 100644 +--- a/execnet/rsync_remote.py ++++ b/execnet/rsync_remote.py +@@ -35,7 +35,11 @@ def serve_rsync(channel): + os.makedirs(path) + mode = msg.pop(0) + if mode: +- os.chmod(path, mode) ++ # Ensure directories are writable, otherwise a ++ # permission denied error (EACCES) would be raised ++ # when attempting to receive read-only directory ++ # structures. ++ os.chmod(path, mode | 0o700) + entrynames = {} + for entryname in msg: + destpath = os.path.join(path, entryname) +@@ -59,7 +63,7 @@ def serve_rsync(channel): + checksum = md5(f.read()).digest() + f.close() + elif msg_mode and msg_mode != st.st_mode: +- os.chmod(path, msg_mode) ++ os.chmod(path, msg_mode | 0o700) + return + else: + return # already fine +diff --git a/testing/test_rsync.py b/testing/test_rsync.py +index 995f229..1d6c30c 100644 +--- a/testing/test_rsync.py ++++ b/testing/test_rsync.py +@@ -157,6 +157,23 @@ class TestRSync: + mode = destdir.stat().mode + assert mode & 511 == 504 + ++ @py.test.mark.skipif("sys.platform == 'win32' or getattr(os, '_name', '') == 'nt'") ++ def test_read_only_directories(self, dirs, gw1): ++ source = dirs.source ++ dest = dirs.dest1 ++ source.ensure("sub", "subsub", dir=True) ++ source.join("sub").chmod(0o500) ++ source.join("sub", "subsub").chmod(0o500) ++ ++ # The destination directories should be created with the write ++ # permission forced, to avoid raising an EACCES error. ++ rsync = RSync(source) ++ rsync.add_target(gw1, dest) ++ rsync.send() ++ ++ assert dest.join("sub").stat().mode & 0o700 ++ assert dest.join("sub").join("subsub").stat().mode & 0o700 ++ + @needssymlink + def test_symlink_rsync(self, dirs, gw1): + source = dirs.source +-- +2.32.0 + diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index beb70c9d84..dd1b741310 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -12193,24 +12193,26 @@ pure Python module that works on virtually all Python versions.") (define-public python-execnet (package (name "python-execnet") - (version "1.4.1") + (version "1.9.0") (source (origin - (method url-fetch) - (uri (pypi-uri "execnet" version)) - (sha256 - (base32 - "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn")))) + (method url-fetch) + (uri (pypi-uri "execnet" version)) + (sha256 + (base32 + "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg")) + (patches (search-patches "python-execnet-read-only-fix.patch")))) (build-system python-build-system) (arguments - `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed - ;; The two test failures are caused by the lack of an `ssh` executable. - ;; The test suite can be run with pytest after the 'install' phase. - #:tests? #f)) + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv"))))))) (native-inputs `(("python-pytest" ,python-pytest) ("python-setuptools-scm" ,python-setuptools-scm))) - (propagated-inputs - `(("python-apipkg" ,python-apipkg))) (synopsis "Rapid multi-Python deployment") (description "Execnet provides a share-nothing model with channel-send/receive communication for distributing execution across many -- cgit v1.2.3 From b1ef8b410c334debee1e9ff577a69c6a21220100 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 26 Aug 2021 09:50:14 -0400 Subject: gnu: python-pytest-asyncio: Enable tests and patch for Python 3.8. * gnu/packages/patches/python-pytest-asyncio-python-3.8.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/check.scm (python-pytest-asyncio) [source]: Fetch from git and apply above patch. [phases]: Override the check phase, enabling tests. --- gnu/local.mk | 1 + gnu/packages/check.scm | 21 +- .../patches/python-pytest-asyncio-python-3.8.patch | 238 +++++++++++++++++++++ 3 files changed, 257 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/python-pytest-asyncio-python-3.8.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ebcb4c82f5..a0da1a96d8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1657,6 +1657,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-pydot-regression-test.patch \ %D%/packages/patches/python2-pygobject-2-deprecation.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ + %D%/packages/patches/python-pytest-asyncio-python-3.8.patch \ %D%/packages/patches/python-pytorch-runpath.patch \ %D%/packages/patches/python-pytorch-system-libraries.patch \ %D%/packages/patches/python-robotframework-source-date-epoch.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index b384b8297a..43689c3670 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1730,14 +1730,29 @@ executed.") (define-public python-pytest-asyncio (package (name "python-pytest-asyncio") + ;; Version 0.10.0 is the last version which is compatible with Pytest <= + ;; 5.4.0. (version "0.10.0") (source (origin - (method url-fetch) - (uri (pypi-uri "pytest-asyncio" version)) + (method git-fetch) ;for tests + (uri (git-reference + (url "https://github.com/pytest-dev/pytest-asyncio") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "1bysy4nii13bm7h345wxf8fxcjhab7l374pqdv7vwv3izl053b4z")))) + (base32 + "1m63b7nbph5z20mn8jgh6j9ac873i1k4in29x44vrkw3qwfwg13y")) + (patches (search-patches "python-pytest-asyncio-python-3.8.patch")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv"))))))) (native-inputs `(("python-coverage" ,python-coverage) ("python-async-generator" ,python-async-generator) diff --git a/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch b/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch new file mode 100644 index 0000000000..519f92c047 --- /dev/null +++ b/gnu/packages/patches/python-pytest-asyncio-python-3.8.patch @@ -0,0 +1,238 @@ +# Modified to apply on 0.10.0. + +From c7a111180b3f35f2fe5a07ead185e4e792f9dfa0 Mon Sep 17 00:00:00 2001 +From: Andrew Svetlov +Date: Thu, 9 Apr 2020 08:44:46 +0200 +Subject: [PATCH] Test on Python 3.8, drop 3.3 and 3.4 + +--- + .travis.yml | 7 +++--- + setup.py | 1 + + tests/conftest.py | 2 +- + tests/test_hypothesis_integration.py | 2 +- + tests/test_simple.py | 32 +++++++++++----------------- + tests/test_simple_35.py | 17 ++++++--------- + tests/test_subprocess.py | 6 ++---- + tox.ini | 5 +++-- + 8 files changed, 29 insertions(+), 43 deletions(-) + +diff --git a/.travis.yml b/.travis.yml +index fe90234..b93377a 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -1,4 +1,5 @@ + language: python ++ + matrix: + include: + - python: 3.5 +@@ -7,10 +8,8 @@ matrix: + env: TOX_ENV=py36 + - python: 3.7 + env: TOX_ENV=py37 +- # TODO: the dist and sudo keys are currently needed to use Python 3.7. +- # They should be removed once Travis-CI supports 3.7 on the default image. +- dist: xenial +- sudo: true ++ - python: 3.8 ++ env: TOX_ENV=py38 + + install: pip install tox-travis coveralls + +diff --git a/setup.py b/setup.py +index 18566bf..6175711 100644 +--- a/setup.py ++++ b/setup.py +@@ -36,6 +36,7 @@ def find_version(): + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", ++ "Programming Language :: Python :: 3.8", + "Topic :: Software Development :: Testing", + "Framework :: Pytest", + ], +diff --git a/tests/conftest.py b/tests/conftest.py +index 6203cf8..cc2ec16 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -17,7 +17,7 @@ def dependent_fixture(event_loop): + async def just_a_sleep(): + """Just sleep a little while.""" + nonlocal event_loop +- await asyncio.sleep(0.1, loop=event_loop) ++ await asyncio.sleep(0.1) + nonlocal counter + counter += 1 + +diff --git a/tests/test_simple.py b/tests/test_simple.py +index 1627139..00c07fc 100644 +--- a/tests/test_simple.py ++++ b/tests/test_simple.py +@@ -1,28 +1,26 @@ + """Quick'n'dirty unit tests for provided fixtures and markers.""" + import asyncio +-import os + import pytest + + import pytest_asyncio.plugin + + +-async def async_coro(loop=None): +- """A very simple coroutine.""" +- await asyncio.sleep(0, loop=loop) ++async def async_coro(): ++ await asyncio.sleep(0) + return 'ok' + + + def test_event_loop_fixture(event_loop): + """Test the injection of the event_loop fixture.""" + assert event_loop +- ret = event_loop.run_until_complete(async_coro(event_loop)) ++ ret = event_loop.run_until_complete(async_coro()) + assert ret == 'ok' + + + @pytest.mark.asyncio +-def test_asyncio_marker(): ++async def test_asyncio_marker(): + """Test the asyncio pytest marker.""" +- yield # sleep(0) ++ await asyncio.sleep(0) + + + @pytest.mark.xfail(reason='need a failure', strict=True) +@@ -45,13 +43,11 @@ async def closer(_, writer): + writer.close() + + server1 = await asyncio.start_server(closer, host='localhost', +- port=unused_tcp_port, +- loop=event_loop) ++ port=unused_tcp_port) + + with pytest.raises(IOError): + await asyncio.start_server(closer, host='localhost', +- port=unused_tcp_port, +- loop=event_loop) ++ port=unused_tcp_port) + + server1.close() + await server1.wait_closed() +@@ -68,20 +64,16 @@ async def closer(_, writer): + unused_tcp_port_factory()) + + server1 = await asyncio.start_server(closer, host='localhost', +- port=port1, +- loop=event_loop) ++ port=port1) + server2 = await asyncio.start_server(closer, host='localhost', +- port=port2, +- loop=event_loop) ++ port=port2) + server3 = await asyncio.start_server(closer, host='localhost', +- port=port3, +- loop=event_loop) ++ port=port3) + + for port in port1, port2, port3: + with pytest.raises(IOError): + await asyncio.start_server(closer, host='localhost', +- port=port, +- loop=event_loop) ++ port=port) + + server1.close() + await server1.wait_closed() +@@ -117,7 +109,7 @@ class Test: + @pytest.mark.asyncio + async def test_asyncio_marker_method(self, event_loop): + """Test the asyncio pytest marker in a Test class.""" +- ret = await async_coro(event_loop) ++ ret = await async_coro() + assert ret == 'ok' + + +diff --git a/tests/test_simple_35.py b/tests/test_simple_35.py +index 1e4d697..4141fb0 100644 +--- a/tests/test_simple_35.py ++++ b/tests/test_simple_35.py +@@ -6,7 +6,7 @@ + + @pytest.mark.asyncio + async def async_coro(loop): +- await asyncio.sleep(0, loop=loop) ++ await asyncio.sleep(0) + return 'ok' + + +@@ -27,8 +27,7 @@ async def closer(_, writer): + writer.close() + + server1 = await asyncio.start_server(closer, host='localhost', +- port=unused_tcp_port, +- loop=event_loop) ++ port=unused_tcp_port) + + server1.close() + await server1.wait_closed() +@@ -45,20 +44,16 @@ async def closer(_, writer): + + async def run_test(): + server1 = await asyncio.start_server(closer, host='localhost', +- port=port1, +- loop=event_loop) ++ port=port1) + server2 = await asyncio.start_server(closer, host='localhost', +- port=port2, +- loop=event_loop) ++ port=port2) + server3 = await asyncio.start_server(closer, host='localhost', +- port=port3, +- loop=event_loop) ++ port=port3) + + for port in port1, port2, port3: + with pytest.raises(IOError): + await asyncio.start_server(closer, host='localhost', +- port=port, +- loop=event_loop) ++ port=port) + + server1.close() + await server1.wait_closed() +diff --git a/tests/test_subprocess.py b/tests/test_subprocess.py +index 83490e8..069c6c2 100644 +--- a/tests/test_subprocess.py ++++ b/tests/test_subprocess.py +@@ -21,8 +21,7 @@ def event_loop(): + async def test_subprocess(event_loop): + """Starting a subprocess should be possible.""" + proc = await asyncio.subprocess.create_subprocess_exec( +- sys.executable, '--version', stdout=asyncio.subprocess.PIPE, +- loop=event_loop) ++ sys.executable, '--version', stdout=asyncio.subprocess.PIPE) + await proc.communicate() + + +@@ -30,6 +29,5 @@ async def test_subprocess(event_loop): + async def test_subprocess_forbid(event_loop): + """Starting a subprocess should be possible.""" + proc = await asyncio.subprocess.create_subprocess_exec( +- sys.executable, '--version', stdout=asyncio.subprocess.PIPE, +- loop=event_loop) ++ sys.executable, '--version', stdout=asyncio.subprocess.PIPE) + await proc.communicate() +diff --git a/tox.ini b/tox.ini +index 13d5155..eed6fb6 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -1,6 +1,7 @@ + [tox] +-envlist = py35, py36, py37 +-minversion = 2.5.0 ++minversion = 3.14.0 ++envlist = py35, py36, py37, py38 ++skip_missing_interpreters = true + + [testenv] + extras = testing -- cgit v1.2.3 From 8e8d85f722c7fa44ee6320b219274d716046b51f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 30 Aug 2021 12:26:03 +0200 Subject: build: Build (gnu system setuid). This is a followup to 45235e67e4aeac96ad8d60265bef054990aeb425. * gnu/local.mk (GNU_SYSTEM_MODULES): Add %D%/system/setuid.scm. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index a0da1a96d8..84dbc27199 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -668,6 +668,7 @@ GNU_SYSTEM_MODULES = \ %D%/system/mapped-devices.scm \ %D%/system/nss.scm \ %D%/system/pam.scm \ + %D%/system/setuid.scm \ %D%/system/shadow.scm \ %D%/system/uuid.scm \ %D%/system/vm.scm \ -- cgit v1.2.3 From b4452ffe9b8c1dbad3d449485d511b99f225adb0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 30 Aug 2021 14:27:30 +0200 Subject: build: Build (gnu packages rocm). This is a followup to df90cb1d5c82cc83a305f6323f867f14e30ce240. * gnu/local.mk (GNU_SYSTEM_MODULES): Add %D%/packages/rocm.scm. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 84dbc27199..5e4d9518bf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -493,6 +493,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/rednotebook.scm \ %D%/packages/regex.scm \ %D%/packages/robotics.scm \ + %D%/packages/rocm.scm \ %D%/packages/rpc.scm \ %D%/packages/rpm.scm \ %D%/packages/rrdtool.scm \ -- cgit v1.2.3 From a5fb1f4eeb7563bd8519660c452a45afecd296c6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 1 Sep 2021 18:42:34 +0200 Subject: gnu: mailutils: Look up Scheme variables in the right module. Fixes . Reported by Maxime Devos . * gnu/packages/patches/mailutils-variable-lookup.patch: New file. * gnu/packages/mail.scm (mailutils)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/mail.scm | 5 +++-- .../patches/mailutils-variable-lookup.patch | 26 ++++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/mailutils-variable-lookup.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 5e4d9518bf..dc2e41d384 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1435,6 +1435,7 @@ dist_patch_DATA = \ %D%/packages/patches/luit-posix.patch \ %D%/packages/patches/lvm2-static-link.patch \ %D%/packages/patches/mailutils-fix-uninitialized-variable.patch \ + %D%/packages/patches/mailutils-variable-lookup.patch \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/marble-qt-add-qt-headers.patch \ %D%/packages/patches/mariadb-CVE-2021-27928.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index c2d986effb..9d90192617 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2014, 2015, 2017, 2020 Mark H Weaver ;;; Copyright © 2014 Ian Denhardt ;;; Copyright © 2014 Sou Bunnbu @@ -269,7 +269,8 @@ example, modify the message headers or body, or encrypt or sign the message.") "17smrxjdgbbzbzakik30vj46q4iib85ksqhb82jr4vjp57akszh9")) (patches ;; Fixes https://issues.guix.gnu.org/43088. - (search-patches "mailutils-fix-uninitialized-variable.patch")))) + (search-patches "mailutils-fix-uninitialized-variable.patch" + "mailutils-variable-lookup.patch")))) (build-system gnu-build-system) (arguments `(#:phases diff --git a/gnu/packages/patches/mailutils-variable-lookup.patch b/gnu/packages/patches/mailutils-variable-lookup.patch new file mode 100644 index 0000000000..0069f3596d --- /dev/null +++ b/gnu/packages/patches/mailutils-variable-lookup.patch @@ -0,0 +1,26 @@ +Have 'send-message' look up 'mu-debug' & co. in the right +module: . + +Submitted: https://lists.gnu.org/archive/html/bug-mailutils/2021-09/msg00000.html + +--- + include/mailutils/guile.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/include/mailutils/guile.h b/include/mailutils/guile.h +index f05550678..47f89db39 100644 +--- a/include/mailutils/guile.h ++++ b/include/mailutils/guile.h +@@ -20,7 +20,8 @@ + + #include + +-#define MU_SCM_SYMBOL_VALUE(p) SCM_VARIABLE_REF(scm_c_lookup(p)) ++#define MU_SCM_SYMBOL_VALUE(p) \ ++ (scm_c_public_ref ("mailutils mailutils", p)) + + typedef struct + { +-- +2.33.0 + -- cgit v1.2.3 From ab12354c0a37fb2a232935f8c5ce388d040241e2 Mon Sep 17 00:00:00 2001 From: Simon Streit Date: Thu, 2 Sep 2021 13:50:53 +0200 Subject: gnu: python-mediafile: Update to 0.7.0. Remove patch. It is now included in upstream release. * gnu/packages/music.scm (python-mediafile): Update to 0.7.0. * gnu/packages/patches/python-mediafile-wavpack.patch: Delete patch. * gnu/local.mk: Deregister it. --- gnu/local.mk | 1 - gnu/packages/music.scm | 9 ++-- .../patches/python-mediafile-wavpack.patch | 57 ---------------------- 3 files changed, 4 insertions(+), 63 deletions(-) delete mode 100644 gnu/packages/patches/python-mediafile-wavpack.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index dc2e41d384..2bf8141408 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1646,7 +1646,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-flint-includes.patch \ %D%/packages/patches/python-libxml2-utf8.patch \ %D%/packages/patches/python-matplotlib-run-under-wayland-gtk3.patch \ - %D%/packages/patches/python-mediafile-wavpack.patch \ %D%/packages/patches/python-memcached-syntax-warnings.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 6236703f48..82c9242cd3 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -41,6 +41,7 @@ ;;; Copyright © 2021 Rovanion Luckey ;;; Copyright © 2021 Justin Veilleux ;;; Copyright © 2021 Felix Gruber +;;; Copyright © 2021 Simon Streit ;;; ;;; This file is part of GNU Guix. ;;; @@ -3604,20 +3605,18 @@ streams on an individual packet/page level.") (define-public python-mediafile (package (name "python-mediafile") - (version "0.6.0") + (version "0.8.0") (source (origin (method url-fetch) (uri (pypi-uri "mediafile" version)) - (patches (search-patches "python-mediafile-wavpack.patch")) (sha256 (base32 - "0jmsp3f57xj35ayp8b6didk85nxgl3viw34s5px3l5dwgc055yx3")))) + "0ipb001j19s9wvssmrj8wz0nrkbl0k3zr3dgzyp1bd9cjc6vklnp")))) (build-system python-build-system) (propagated-inputs `(("python-mutagen" ,python-mutagen) - ("python-six" ,python-six) - ("python-tox" ,python-tox))) + ("python-six" ,python-six))) (home-page "https://github.com/beetbox/mediafile") (synopsis "Read and write audio file tags") (description diff --git a/gnu/packages/patches/python-mediafile-wavpack.patch b/gnu/packages/patches/python-mediafile-wavpack.patch deleted file mode 100644 index 9839fe87b5..0000000000 --- a/gnu/packages/patches/python-mediafile-wavpack.patch +++ /dev/null @@ -1,57 +0,0 @@ -This patch has already been applied upstream, but is not included in the -current release 0.6.0. - -From d2fc3b59f77c515b02dfe7ad936f89264375d2b4 Mon Sep 17 00:00:00 2001 -From: Adrian Sampson -Date: Wed, 29 Jul 2020 19:42:57 -0400 -Subject: [PATCH] Fix test for WavPack bitrate - -Fixes #34. ---- - docs/index.rst | 5 +++++ - mediafile.py | 2 +- - test/test_mediafile.py | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/docs/index.rst b/docs/index.rst -index 7b622df..1465405 100644 ---- a/docs/index.rst -+++ b/docs/index.rst -@@ -100,6 +100,11 @@ Internals - Changelog - --------- - -+v0.7.0 -+'''''' -+ -+- Mutagen 1.45.0 or later is now required. -+ - v0.6.0 - '''''' - -diff --git a/mediafile.py b/mediafile.py -index 23fadaf..9e9d063 100644 ---- a/mediafile.py -+++ b/mediafile.py -@@ -56,7 +56,7 @@ - import six - - --__version__ = '0.6.0' -+__version__ = '0.7.0' - __all__ = ['UnreadableFileError', 'FileTypeError', 'MediaFile'] - - log = logging.getLogger(__name__) -diff --git a/test/test_mediafile.py b/test/test_mediafile.py -index e9e1850..7f17f44 100644 ---- a/test/test_mediafile.py -+++ b/test/test_mediafile.py -@@ -907,7 +907,7 @@ class WavpackTest(ReadWriteTestBase, unittest.TestCase): - 'bitrate': 109312, - 'format': u'WavPack', - 'samplerate': 44100, -- 'bitdepth': 0, -+ 'bitdepth': 16, - 'channels': 1, - } - -- cgit v1.2.3 From 46ba1bb068492192ba69d52c00ca8224956a3849 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 2 Sep 2021 13:57:40 +0200 Subject: gnu: beets: Update to 1.5.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/music.scm (beets) [version]: Update to 1.5.0. [#:phases]: Keep testcase, switch to pytest and respect tests?. [native-inputs]: Move plugin dependencies… [inputs]: …here. * gnu/packages/music.scm (beets-next): Mark as deprecated. * gnu/packages/patches/beets-werkzeug-compat.patch: Delete patch. * gnu/local.mk: Deregister it. --- gnu/local.mk | 1 - gnu/packages/music.scm | 127 +++++++---------------- gnu/packages/patches/beets-werkzeug-compat.patch | 18 ---- 3 files changed, 39 insertions(+), 107 deletions(-) delete mode 100644 gnu/packages/patches/beets-werkzeug-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2bf8141408..9abaf0cfec 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -879,7 +879,6 @@ dist_patch_DATA = \ %D%/packages/patches/bsd-games-prevent-name-collisions.patch \ %D%/packages/patches/bsd-games-stdio.h.patch \ %D%/packages/patches/beancount-disable-googleapis-fonts.patch \ - %D%/packages/patches/beets-werkzeug-compat.patch \ %D%/packages/patches/behave-skip-a-couple-of-tests.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ %D%/packages/patches/biber-fix-encoding-write.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index e33bf45dcd..0a1a311511 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -146,6 +146,7 @@ #:use-module (gnu packages pulseaudio) ;libsndfile #:use-module (gnu packages python) #:use-module (gnu packages python-check) + #:use-module (gnu packages python-compression) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) @@ -3786,34 +3787,27 @@ websites such as Libre.fm.") (define-public beets (package (name "beets") - (version "1.4.9") + (version "1.5.0") (source (origin (method url-fetch) (uri (pypi-uri "beets" version)) - (patches (search-patches "beets-werkzeug-compat.patch")) (sha256 (base32 - "0m40rjimvfgy1dv04p8f8d5dvi2855v4ix99a9xr900cmcn476yj")))) + "0arl4nc3y8iwa331hf6ggai19y8ns9pl03g5d6ac857wq2x7nzw8")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases - ;; Reported upstream: . - ;; Disable the faulty test as the fix is unclear. - (add-after 'unpack 'disable-failing-tests - (lambda _ - (substitute* "test/test_mediafile.py" - (("def test_read_audio_properties") "def _test_read_audio_properties")) - #t)) (add-after 'unpack 'set-HOME (lambda _ (setenv "HOME" (string-append (getcwd) "/tmp")) #t)) (replace 'check - (lambda _ - (invoke "nosetests" "-v"))) - ;; Wrap the executable, so it can find python-gi (aka pygobject) and - ;; gstreamer plugins. + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-v" "test")))) + ;; Wrap the executable, so it can find python-gi (aka + ;; pygobject) and gstreamer plugins. (add-after 'wrap 'wrap-typelib (lambda* (#:key outputs #:allow-other-keys) (let ((prog (string-append (assoc-ref outputs "out") @@ -3825,94 +3819,51 @@ websites such as Libre.fm.") `("GI_TYPELIB_PATH" ":" prefix (,types))) #t)))))) (native-inputs - `(("python-beautifulsoup4" ,python-beautifulsoup4) + `(("gobject-introspection" ,gobject-introspection) ("python-flask" ,python-flask) ("python-mock" ,python-mock) - ("python-mpd2" ,python-mpd2) - ("python-nose" ,python-nose) - ("python-pathlib" ,python-pathlib) - ("python-pyxdg" ,python-pyxdg) - ("python-pylast" ,python-pylast) - ("python-rarfile" ,python-rarfile) + ("python-py7zr" ,python-py7zr) + ("python-pytest" ,python-pytest-6) ("python-responses" ,python-responses))) - ;; TODO: Install optional plugins and dependencies. (inputs - `(("python-discogs-client" ,python-discogs-client) + `(("bash-minimal" ,bash-minimal) + ("gst-plugins-base" ,gst-plugins-base) + ("gst-plugins-good" ,gst-plugins-good) + ("gstreamer" ,gstreamer) + ("python-confuse" ,python-confuse) ("python-jellyfish" ,python-jellyfish) + ("python-mediafile" ,python-mediafile) ("python-munkres" ,python-munkres) ("python-musicbrainzngs" ,python-musicbrainzngs) - ("python-mutagen" ,python-mutagen) - ("python-pyacoustid" ,python-pyacoustid) ("python-pyyaml" ,python-pyyaml) + ("python-six" ,python-six) ("python-unidecode" ,python-unidecode) - ;; For plugin replaygain. - ("python-pygobject" ,python-pygobject) - ("gobject-introspection" ,gobject-introspection) - ("gst-plugins-base" ,gst-plugins-base) - ("gst-plugins-good" ,gst-plugins-good) - ("gstreamer" ,gstreamer))) + ;; Optional dependencies for plugins. Some of these are also required by tests. + ("python-beautifulsoup4" ,python-beautifulsoup4) ; For lyrics. + ("python-discogs-client" ,python-discogs-client) ; For discogs. + ("python-mpd2" ,python-mpd2) ; For mpdstats. + ("python-mutagen" ,python-mutagen) ; For scrub. + ("python-langdetect" ,python-langdetect) ; For lyrics. + ("python-pillow" ,python-pillow) ; For fetchart, embedart, thumbnails. + ("python-pyacoustid" ,python-pyacoustid) ; For chroma. + ("python-pygobject" ,python-pygobject) ; For bpd, replaygain. + ("python-pylast" ,python-pylast) ; For lastgenre, lastimport. + ("python-pyxdg" ,python-pyxdg) ; For thumbnails. + ("python-rarfile" ,python-rarfile) ; For import. + ("python-reflink" ,python-reflink) ; For reflink. + ("python-requests" ,python-requests) + ("python-requests-oauthlib" ,python-requests-oauthlib))) ; For beatport. (home-page "https://beets.io") (synopsis "Music organizer") - (description "The purpose of beets is to get your music collection right - once and for all. It catalogs your collection, automatically improving its - metadata as it goes using the MusicBrainz database. Then it provides a variety - of tools for manipulating and accessing your music.") + (description "The purpose of beets is to get your music collection +right once and for all. It catalogs your collection, automatically +improving its metadata as it goes using the MusicBrainz database. +Then it provides a variety of tools for manipulating and accessing +your music.") (license license:expat))) (define-public beets-next - (let ((commit "04ea754d00e2873ae9aa2d9e07c5cefd790eaee2") - (revision "1")) - (package - (inherit beets) - (name "beets-next") - (version (git-version (package-version beets) revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/beetbox/beets") - (commit commit))) - (file-name (git-file-name "beets" version)) - (sha256 - (base32 - "092a9sss2shhcjmpgbwvscv8brpm5970i5hddkhi81xcff3bg1h4")))) - (arguments - `(#:phases - (modify-phases %standard-phases - ;; XXX: unclear why this fails - (add-after 'unpack 'disable-failing-tests - (lambda _ - (substitute* "test/test_zero.py" - (("def test_album_art") "def _test_album_art")) - #t)) - (add-after 'unpack 'set-HOME - (lambda _ - (setenv "HOME" (string-append (getcwd) "/tmp")) - #t)) - (replace 'check - (lambda _ - ;; Resources must be writable. - (for-each make-file-writable - (find-files "test/rsrc" ".")) - (invoke "nosetests" "-v"))) - ;; Wrap the executable, so it can find python-gi (aka pygobject) and - ;; gstreamer plugins. - (add-after 'wrap 'wrap-typelib - (lambda* (#:key outputs #:allow-other-keys) - (let ((prog (string-append (assoc-ref outputs "out") - "/bin/beet")) - (plugins (getenv "GST_PLUGIN_SYSTEM_PATH")) - (types (getenv "GI_TYPELIB_PATH"))) - (wrap-program prog - `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,plugins)) - `("GI_TYPELIB_PATH" ":" prefix (,types))) - #t)))))) - (inputs - `(("python-confuse" ,python-confuse) - ("python-mediafile" ,python-mediafile) - ("python-reflink" ,python-reflink) - ("python-requests-oauthlib" ,python-requests-oauthlib) - ("opusfile" ,opusfile) - ,@(package-inputs beets)))))) + (deprecated-package "beets-next" beets)) (define-public beets-bandcamp (package diff --git a/gnu/packages/patches/beets-werkzeug-compat.patch b/gnu/packages/patches/beets-werkzeug-compat.patch deleted file mode 100644 index 1a91c3a3f9..0000000000 --- a/gnu/packages/patches/beets-werkzeug-compat.patch +++ /dev/null @@ -1,18 +0,0 @@ -Be compatible with python-werkzeug 1.0.0. - -Taken from upstream: -https://github.com/beetbox/beets/commit/d43d54e21cde97f57f19486925ab56b419254cc8 - -diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py -index f53fb3a954..21ff5d94ed 100644 ---- a/beetsplug/web/__init__.py -+++ b/beetsplug/web/__init__.py -@@ -169,7 +169,7 @@ def to_python(self, value): - return ids - - def to_url(self, value): -- return ','.join(value) -+ return ','.join(str(v) for v in value) - - - class QueryConverter(PathConverter): -- cgit v1.2.3 From dd7df191b6c8c3bbbece31b6946018dbaef553b4 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Sun, 5 Sep 2021 22:45:08 +0200 Subject: gnu: u-boot-nintendo-nes-classic-edition: Make it actually boot again. * gnu/packages/patches/u-boot-nintendo-nes-serial.patch: New file. * gnu/local.mk (dist_patch_DATA): Add u-boot-nintendo-nes-serial.patch. * gnu/packages/bootloaders.scm (u-boot-nintendo-nes-classic-edition): Downgrade to 2018.11. [source]: Add patch. [description]: Modify. [native-inputs]: Add python-2. --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 29 +++++++++++++++++++++- .../patches/u-boot-nintendo-nes-serial.patch | 14 +++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/u-boot-nintendo-nes-serial.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9abaf0cfec..f848a8c61f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1801,6 +1801,7 @@ dist_patch_DATA = \ %D%/packages/patches/tup-unbundle-dependencies.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-bcg729.patch \ + %D%/packages/patches/u-boot-nintendo-nes-serial.patch \ %D%/packages/patches/u-boot-rockchip-inno-usb.patch \ %D%/packages/patches/u-boot-sifive-prevent-reloc-initrd-fdt.patch \ %D%/packages/patches/u-boot-riscv64-fix-extlinux.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 2889a90d54..5f7dfa0f8f 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -802,7 +802,34 @@ it fits within common partitioning schemes.") (make-u-boot-package "A20-OLinuXino_MICRO" "arm-linux-gnueabihf")) (define-public u-boot-nintendo-nes-classic-edition - (make-u-boot-package "Nintendo_NES_Classic_Edition" "arm-linux-gnueabihf")) + (let ((base (make-u-boot-package "Nintendo_NES_Classic_Edition" + "arm-linux-gnueabihf"))) + (package + (inherit base) + ;; Starting with 2019.01, FEL doesn't work anymore on A33. + (version "2018.11") + (source (origin + (method url-fetch) + (uri (string-append + "https://ftp.denx.de/pub/u-boot/" + "u-boot-" version ".tar.bz2")) + (sha256 + (base32 + "0znkwljfwwn4y7j20pzz4ilqw8znphrfxns0x1lwdzh3xbr96z3k")) + (patches (search-patches + "u-boot-nintendo-nes-serial.patch")))) + (description "U-Boot is a bootloader used mostly for ARM boards. It +also initializes the boards (RAM etc). + +This version is for the Nintendo NES Classic Edition. It is assumed that +you have added a serial port to pins PB0 and PB1 as described on +@url{https://linux-sunxi.org/Nintendo_NES_Classic_Edition}. + +In order to use FEL mode on the device, hold the Reset button on the +device while it's being turned on (and a while longer).") + (native-inputs + `(("python" ,python-2) + ,@(package-native-inputs base)))))) (define-public u-boot-wandboard (make-u-boot-package "wandboard" "arm-linux-gnueabihf")) diff --git a/gnu/packages/patches/u-boot-nintendo-nes-serial.patch b/gnu/packages/patches/u-boot-nintendo-nes-serial.patch new file mode 100644 index 0000000000..3588236803 --- /dev/null +++ b/gnu/packages/patches/u-boot-nintendo-nes-serial.patch @@ -0,0 +1,14 @@ +Date: Sun, 5 Sep 2021 23:24:00 +0200 +Author: Danny Milosavljevic +Description: Set console UART to use pins PB0 and PB1. +--- u-boot-2018.11/configs/Nintendo_NES_Classic_Edition_defconfig.orig 2021-09-05 23:09:15.905846467 +0200 ++++ u-boot-2018.11/configs/Nintendo_NES_Classic_Edition_defconfig 2021-09-05 23:12:21.562774694 +0200 +@@ -21,7 +21,7 @@ + CONFIG_SYS_NAND_OOBSIZE=0x40 + CONFIG_AXP_DLDO1_VOLT=3300 + CONFIG_AXP_ELDO2_VOLT=1800 +-CONFIG_CONS_INDEX=5 ++CONFIG_CONS_INDEX=1 + CONFIG_USB_MUSB_GADGET=y + CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y + CONFIG_USB_FUNCTION_MASS_STORAGE=y -- cgit v1.2.3 From 550f4aa682ed8014f3e32ebc65dbab8f0d208e8d Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Mon, 6 Sep 2021 16:06:52 +0200 Subject: gnu: ocaml-ppx-variants-conv: Patch for building with ocaml-ppxlib. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch will make it build when building it with ocaml-ppxlib@0.23.0. * gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/ocaml.scm (ocaml-ppx-variants-conv): Apply the patch. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/ocaml.scm | 4 +++ .../ocaml-ppx-variants-ppxlib-api-change.patch | 42 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f848a8c61f..2a56c4a9e2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1522,6 +1522,7 @@ dist_patch_DATA = \ %D%/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch \ %D%/packages/patches/ocaml-dose3-dont-make-printconf.patch \ %D%/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch \ + %D%/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch \ %D%/packages/patches/omake-fix-non-determinism.patch \ %D%/packages/patches/oneko-remove-nonfree-characters.patch \ %D%/packages/patches/onnx-optimizer-system-library.patch \ diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index b6c9559d6e..b4ec016cbe 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5340,6 +5340,10 @@ definitions.") (uri (git-reference (url "https://github.com/janestreet/ppx_variants_conv") (commit (string-append "v" version)))) + (patches + (search-patches + ;; Fix build when building with ocaml-ppxlib@0.23.0. + "ocaml-ppx-variants-ppxlib-api-change.patch")) (file-name (git-file-name name version)) (sha256 (base32 diff --git a/gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch b/gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch new file mode 100644 index 0000000000..b437bfb061 --- /dev/null +++ b/gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch @@ -0,0 +1,42 @@ +From 6103f6fc56f978c847ba7c1f2d9f38ee93a5e337 Mon Sep 17 00:00:00 2001 +From: Sonja Heinze +Date: Tue, 9 Mar 2021 12:57:47 +0100 +Subject: [PATCH] Adapt to Ppxlib's API change + +Ppxlib is removing Lexer.keyword_table from the API in exchange for +the more lightweight Keyword.is_keyword. + +Signed-off-by: Sonja Heinze +--- +Patch from . + + ppx_variants_conv.opam | 2 +- + src/ppx_variants_conv.ml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ppx_variants_conv.opam b/ppx_variants_conv.opam +index 7e7148d..b56040f 100644 +--- a/ppx_variants_conv.opam ++++ b/ppx_variants_conv.opam +@@ -15,7 +15,7 @@ depends: [ + "base" {>= "v0.14" & < "v0.15"} + "variantslib" {>= "v0.14" & < "v0.15"} + "dune" {>= "2.0.0"} +- "ppxlib" {>= "0.14.0"} ++ "ppxlib" {>= "0.23.0"} + ] + synopsis: "Generation of accessor and iteration functions for ocaml variant types" + description: " +diff --git a/src/ppx_variants_conv.ml b/src/ppx_variants_conv.ml +index 8d60086..112fc78 100644 +--- a/src/ppx_variants_conv.ml ++++ b/src/ppx_variants_conv.ml +@@ -66,7 +66,7 @@ end + + let variant_name_to_string v = + let s = String.lowercase v in +- if Caml.Hashtbl.mem Lexer.keyword_table s ++ if Keyword.is_keyword s + then s ^ "_" + else s + -- cgit v1.2.3