aboutsummary
aboutsummaryrefslogtreecommitdiff
// SPDX-License-Identifier: CC0-1.0

// Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
// Available under the terms of Creative Commons Zero v1.0 Universal.

{
    "$schema": "https://hydrilla.koszko.org/schemas/package_source-2.schema.json",
    "source_name": "odysee-com-fix",
    "copyright":  [
	// The text of the LicenseRef- GPL also gets included in the report.
	{"file": "report.spdx"},
	{"file": "LICENSES/CC0-1.0.txt"}
    ],
    "additional_files": [
	{"file": "LICENSES/LicenseRef-GPL-3.0-or-later-WITH-js-exceptions.txt"}
    ],
    "upstream_url": "https://git.koszko.org/hydrilla-fixes-bundle/tree/src/odysee-com-fix",
    "definitions": [{
	"type":         "mapping_and_resource",
	"identifier":   "odysee-com-fix",
	"long_name":    "Odysee fix",
	"uuid":         "0be8feb8-99da-4d63-9f9f-73dedd3059e9",
	"version":      [2022, 2, 21],
	"revision":     2,
	"description":  "Make video playback and search on odysee.com functional without relying on site-served JavaScript.",
	"dependencies": [],
	"scripts":      [{"file": "odysee.js"}],
	"payloads": {
	    // To test go to https://odysee.com/, then try searching for videos
	    // and playing them.
	    "https://odysee.com/***": {
		"identifier": "odysee-com-fix"
	    }
	}
    }],
    "reuse_generate_spdx_report": true
}
0df&id2=450cd7e15fdb65e52bccb919e99cb98d7615bc45'>diff)downloadguix-f4aec15f47eeb23bc34ce30e59147bbb206980df.tar.gz
guix-f4aec15f47eeb23bc34ce30e59147bbb206980df.zip
tests: gexp: Handle incorrect guile-bootstrap version for riscv.
The tests currently fail when run on riscv-linux (affecting the guix package) because Guile 3 is used as the bootstrap guile. Correcting the package version seems hard, so I'm just tweaking the tests to use the right effective version for riscv64-linux. * tests/gexp.scm (bootstrap-guile-effective-version): New procedure. ("gexp->derivation & with-extensions", "lower-gexp", "lower-gexp, raw-derivation-file"): Use bootstrap-guile-effective-version. Change-Id: I3995e1f6b58ada1baf38a8ec55b0173059dd0079
Diffstat
-rw-r--r--tests/gexp.scm26
1 files changed, 20 insertions, 6 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 905009caee..b35bfc920f 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -47,6 +47,13 @@
(define %store
(open-connection-for-tests))
+(define (bootstrap-guile-effective-version)
+ ;; TODO The package version of %bootstrap-guile is incorrect for
+ ;; riscv64-linux
+ (if (string=? "riscv64-linux" (%current-system))
+ "3.0"
+ (package-version %bootstrap-guile)))
+
;; Globally disable grafts because they can trigger early builds.
(%graft? #f)
@@ -1099,8 +1106,8 @@ importing.* \\(guix config\\) from the host"
(write (list the-answer (multiply 2))
port)))))))
(drv (gexp->derivation "thingie" build
- ;; %BOOTSTRAP-GUILE is 2.0.
- #:effective-version "2.0"))
+ #:effective-version
+ (bootstrap-guile-effective-version)))
(out -> (derivation->output-path drv)))
(mbegin %store-monad
(built-derivations (list drv))
@@ -1120,7 +1127,8 @@ importing.* \\(guix config\\) from the host"
mkdir-p
the-answer))))
(lexp (lower-gexp exp
- #:effective-version "2.0")))
+ #:effective-version
+ (bootstrap-guile-effective-version))))
(define (matching-input drv output)
(lambda (input)
(and (eq? (derivation-input-derivation input) drv)
@@ -1134,12 +1142,15 @@ importing.* \\(guix config\\) from the host"
(lowered-gexp-inputs lexp))
(member (string-append
(derivation->output-path extension-drv)
- "/share/guile/site/2.0")
+ "/share/guile/site/"
+ (bootstrap-guile-effective-version))
(lowered-gexp-load-path lexp))
(= 2 (length (lowered-gexp-load-path lexp)))
(member (string-append
(derivation->output-path extension-drv)
- "/lib/guile/2.0/site-ccache")
+ "/lib/guile/"
+ (bootstrap-guile-effective-version)
+ "/site-ccache")
(lowered-gexp-load-compiled-path lexp))
(= 2 (length (lowered-gexp-load-compiled-path lexp)))
(eq? (derivation-input-derivation (lowered-gexp-guile lexp))
@@ -1149,7 +1160,10 @@ importing.* \\(guix config\\) from the host"
(mlet* %store-monad ((thing -> (program-file "prog" #~(display "hi!")))
(exp -> #~(list #$(raw-derivation-file thing)))
(drv (lower-object thing))
- (lexp (lower-gexp exp #:effective-version "2.0")))
+ (lexp (lower-gexp
+ exp
+ #:effective-version
+ (bootstrap-guile-effective-version))))
(return (and (equal? `(list ,(derivation-file-name drv))
(lowered-gexp-sexp lexp))
(equal? (list (derivation-file-name drv))