From db75110d7e96b35c51cd111e7b7da6bc93d859b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Sun, 7 May 2023 20:00:14 +0200 Subject: [PATCH] testing/tridactyl-native: vendor nimble package list Different mirrors seem to ship different package lists at the moment thus causing the build to fail if a certain mirror is selected. To workaround that, simply ship a package list with all dependencies as part of the package. To-Do: Also ensure that the integrity of the dependencies is verified by nimble, which doesn't seem to be the case at the moment. That is, nimble clones the repository and then just checks out a tag without verifying the integrity of the repository. --- testing/tridactyl-native/APKBUILD | 8 ++++- testing/tridactyl-native/packages.json | 42 ++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 testing/tridactyl-native/packages.json diff --git a/testing/tridactyl-native/APKBUILD b/testing/tridactyl-native/APKBUILD index 243c27a97f1..6d8db5f2141 100644 --- a/testing/tridactyl-native/APKBUILD +++ b/testing/tridactyl-native/APKBUILD @@ -9,7 +9,8 @@ arch="all !s390x" # limited by nim license="BSD-2-Clause" makedepends="nim nimble" options="net !check" # no testsuite -source="https://github.com/tridactyl/native_messenger/archive/refs/tags/$pkgver/tridactyl-native-firefox-$pkgver.tar.gz" +source="https://github.com/tridactyl/native_messenger/archive/refs/tags/$pkgver/tridactyl-native-firefox-$pkgver.tar.gz + packages.json" builddir="$srcdir/native_messenger-$pkgver" # Set custom NIMBLE_DIR to not pollute $HOME/.nimble. @@ -17,6 +18,10 @@ export NIMBLE_DIR="$srcdir/nimble" prepare() { default_prepare + + mkdir -p "${NIMBLE_DIR}" + cp "$srcdir"/packages.json "$NIMBLE_DIR/packages_official.json" + sed -i tridactyl.json \ -e "s|REPLACE_ME_WITH_SED|/usr/lib/$pkgname/native_main|" } @@ -34,4 +39,5 @@ package() { sha512sums=" 6bd29d3a024e0ec4e2a819991f3e6d36a92bb304345281bfd048f7d0d8f2c0a7ccce5d08c7fcdea67d8d729c04b9aa9cb0387e62eb0bb9e6d2fb9d5c8e881bdc tridactyl-native-firefox-0.3.8.tar.gz +cc232d45be2ccf9b463536f0136abc9975c0753aacf93c36af57ee190374a38733b3cf7d67024195bcdfb801e11514e78b859deff718c039b4da1b5dd84a10ca packages.json " diff --git a/testing/tridactyl-native/packages.json b/testing/tridactyl-native/packages.json new file mode 100644 index 00000000000..6a1d903ba9d --- /dev/null +++ b/testing/tridactyl-native/packages.json @@ -0,0 +1,42 @@ +[ + { + "name": "tempfile", + "url": "https://github.com/OpenSystemsLab/tempfile.nim", + "method": "git", + "tags": [ + "temp", + "mktemp", + "make", + "mk", + "mkstemp", + "mkdtemp" + ], + "description": "Temporary files and directories", + "license": "MIT", + "web": "https://github.com/OpenSystemsLab/tempfile.nim" + }, + { + "name": "regex", + "url": "https://github.com/nitely/nim-regex", + "method": "git", + "tags": [ + "regex" + ], + "description": "Linear time regex matching", + "license": "MIT", + "web": "https://github.com/nitely/nim-regex" + }, + { + "name": "unicodedb", + "url": "https://github.com/nitely/nim-unicodedb", + "method": "git", + "tags": [ + "unicode", + "UCD", + "unicodedata" + ], + "description": "Unicode Character Database (UCD) access for Nim", + "license": "MIT", + "web": "https://github.com/nitely/nim-unicodedb" + }, +]