aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-01-05 22:04:24 +0200
committerEfraim Flashner <efraim@flashner.co.il>2019-01-05 22:55:14 +0200
commit87fd7a35c2c8af364fe783947a2232a646d009cb (patch)
tree53d8c8d916a6205da998b738165d69ac784b0f66 /gnu/packages
parent918a9b584d17b7caac80a7071d7e54275a17b36c (diff)
downloadguix-87fd7a35c2c8af364fe783947a2232a646d009cb.tar.gz
guix-87fd7a35c2c8af364fe783947a2232a646d009cb.zip
gnu: streamlink: Fix build.
* gnu/packages/video.scm (streamlink)[source]: Add patch. * gnu/packages/patches/streamlink-update-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/patches/streamlink-update-test.patch70
-rw-r--r--gnu/packages/video.scm5
2 files changed, 73 insertions, 2 deletions
diff --git a/gnu/packages/patches/streamlink-update-test.patch b/gnu/packages/patches/streamlink-update-test.patch
new file mode 100644
index 0000000000..2d90009192
--- /dev/null
+++ b/gnu/packages/patches/streamlink-update-test.patch
@@ -0,0 +1,70 @@
+https://github.com/streamlink/streamlink/commit/a3123346824ee7b9c461110f292ea6987ea9a78d.patch
+This is taken from upstream, and can be removed at the next release
+
+From c6f3994e177a42792238f2edd07ba9053c10abc9 Mon Sep 17 00:00:00 2001
+From: back-to <backto@protonmail.ch>
+Date: Sat, 21 Jul 2018 14:30:51 +0200
+Subject: [PATCH] tests.localization: use en_CA instead of en_US for
+ test_equivalent
+
+**python-iso3166** got an update which breaks the Streamlink tests.
+https://pypi.org/project/iso3166/#history
+
+**python-iso3166** and **pycountry** have now a different `name` for _the United States of America_
+
+> python-iso3166: United States of America
+https://github.com/deactivated/python-iso3166/commit/e5f8b37f18b01fcb5fa0e8130d8296fc7a7b5a9f
+
+> pycountry: United States
+https://bitbucket.org/flyingcircus/pycountry/src/5aa4bb47e33798cb631a81521b7b5b18f7d6c919/src/pycountry/databases/iso3166-1.json?at=default&fileviewer=file-view-default#iso3166-1.json-1572:1578
+
+https://www.iso.org/obp/ui/#iso:code:3166:US
+
+---
+
+use **en_CA** instead of **en_US** for backwards compatibility,
+as changing the **US** name would fail with older versions of **python-iso3166** / **pycountry**
+---
+ tests/test_localization.py | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/tests/test_localization.py b/tests/test_localization.py
+index 0b81ae591..90bb3ac31 100644
+--- a/tests/test_localization.py
++++ b/tests/test_localization.py
+@@ -32,11 +32,12 @@ def test_bad_language_code(self):
+ self.assertRaises(LookupError, l10n.Localization, "enUS")
+
+ def test_equivalent(self):
+- l = l10n.Localization("en_US")
++ l = l10n.Localization("en_CA")
+ self.assertTrue(l.equivalent(language="eng"))
+ self.assertTrue(l.equivalent(language="en"))
+- self.assertTrue(l.equivalent(language="en", country="US"))
+- self.assertTrue(l.equivalent(language="en", country="United States"))
++ self.assertTrue(l.equivalent(language="en", country="CA"))
++ self.assertTrue(l.equivalent(language="en", country="CAN"))
++ self.assertTrue(l.equivalent(language="en", country="Canada"))
+
+ def test_equivalent_remap(self):
+ l = l10n.Localization("fr_FR")
+@@ -48,7 +49,7 @@ def test_not_equivalent(self):
+ self.assertFalse(l.equivalent(language="eng"))
+ self.assertFalse(l.equivalent(language="en"))
+ self.assertFalse(l.equivalent(language="en", country="US"))
+- self.assertFalse(l.equivalent(language="en", country="United States"))
++ self.assertFalse(l.equivalent(language="en", country="Canada"))
+ self.assertFalse(l.equivalent(language="en", country="ES"))
+ self.assertFalse(l.equivalent(language="en", country="Spain"))
+
+@@ -71,8 +72,8 @@ def test_get_country(self):
+ l10n.Localization.get_country("USA").alpha2)
+ self.assertEqual("GB",
+ l10n.Localization.get_country("GB").alpha2)
+- self.assertEqual("United States",
+- l10n.Localization.get_country("United States").name)
++ self.assertEqual("Canada",
++ l10n.Localization.get_country("Canada").name)
+
+ def test_get_country_miss(self):
+ self.assertRaises(LookupError, l10n.Localization.get_country, "XE")
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index b8ac09d4ad..52facebe42 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
-;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2015, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
@@ -1924,7 +1924,8 @@ and custom quantization matrices.")
(uri (pypi-uri "streamlink" version))
(sha256
(base32
- "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8"))))
+ "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8"))
+ (patches (search-patches "streamlink-update-test.patch"))))
(build-system python-build-system)
(home-page "https://github.com/streamlink/streamlink")
(native-inputs
0'>2018-03-18glob: Add an extra glob pattern compilation stage.Ludovic Courtès * guix/glob.scm (compile-glob-pattern): Rename to... (string->sglob): ... this. (compile-sglob, string->compiled-sglob): New procedures. (glob-match?): Replace '?, 'range, and 'set with a single clause. * tests/glob.scm (test-compile-glob-pattern): Rename to... (test-string->sglob): ... this. Adjust accordingly. (test-glob-match): Use 'string->compiled-sglob' instead of 'compile-glob-pattern'. * gnu/build/linux-modules.scm (read-module-aliases): Use 'string->compiled-sglob' instead of 'compile-glob-pattern'. 2018-03-18linux-modules: 'load-linux-module*' honors BLACK-LIST in recursive calls.Ludovic Courtès * gnu/build/linux-modules.scm (load-linux-module*): Pass BLACK-LIST in recursive call. 2018-03-18linux-modules: Add 'current-kernel-directory'.Ludovic Courtès * gnu/build/linux-modules.scm (current-kernel-directory): New procedure. (current-alias-file): Use it. 2018-03-03linux-modules: Add module-aliases.Danny Milosavljevic * gnu/build/linux-modules.scm (module-aliases): New variable. 2018-03-02linux-modules: Add 'device-module-aliases' and related procedures.Ludovic Courtès * gnu/build/linux-modules.scm (readlink*, stat->device-major) (stat->device-minor): New procedures. (%not-slash): New variable. (read-uevent, device-module-aliases, read-module-aliases) (current-alias-file, known-module-aliases, matching-modules): New procedures. 2018-02-28linux-modules: Use 'load-linux-module/fd'.Ludovic Courtès This should be more efficient than loading the whole thing in user space. * gnu/build/linux-modules.scm (load-linux-module*): Use 'load-linux-module/fd' instead of 'load-linux-module'. Remove 'slurp'. 2017-04-11build: Fix compilation warnings.Mathieu Othacehe * gnu/build/linux-boot.scm (define-module): Use (guix build syscalls). * gnu/build/linux-modules.scm (define-module): Ditto. * gnu/build/file-systems (define-module): Stop re-exporting mount, umount and MS_* flags as this is now safe to include (guix build syscalls) instead. (mount): Remove procedure. (umount): Ditto. Signed-off-by: Ludovic Courtès <ludo@gnu.org>