aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-07-15 00:06:26 +0200
committerRicardo Wurmus <rekado@elephly.net>2022-07-15 00:07:42 +0200
commit9238ba58748d99970674e098c9b1b0ed8ca66c14 (patch)
tree9a7493d81a2634d522204a7e7c61440b52ef562d /gnu
parentcbdfa54c7787379c1cce6631acf906b670da8997 (diff)
downloadguix-9238ba58748d99970674e098c9b1b0ed8ca66c14.tar.gz
guix-9238ba58748d99970674e098c9b1b0ed8ca66c14.zip
gnu: r-affycompatible: Build reproducibly.
* gnu/packages/bioconductor.scm (r-affycompatible)[arguments]: Sort XML elements before generating R code from them.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bioconductor.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/packages/bioconductor.scm b/gnu/packages/bioconductor.scm
index 38c309caa4..31484799b2 100644
--- a/gnu/packages/bioconductor.scm
+++ b/gnu/packages/bioconductor.scm
@@ -2940,6 +2940,25 @@ measures for Affymetrix Oligonucleotide Arrays.")
(properties
`((upstream-name . "AffyCompatible")))
(build-system r-build-system)
+ (arguments
+ (list
+ #:phases
+ `(modify-phases %standard-phases
+ (add-after 'unpack 'make-reproducible
+ (lambda _
+ ;; Order DTD elements before generating R code from them.
+ (substitute* "R/methods-AffyCompatible.R"
+ (("dtd <- .*" m)
+ (string-append m "
+elements <- dtd$elements
+ordered <- elements[order(names(elements))]\n"))
+ (("elt in dtd\\$elements")
+ "elt in ordered"))
+ ;; Use a predictable directory name for code generation.
+ (mkdir-p "/tmp/NetAffxResourcePrototype")
+ (substitute* "R/DataClasses.R"
+ (("directory=tempdir\\(\\)")
+ "directory=\"/tmp/NetAffxResourcePrototype\"")))))))
(propagated-inputs
(list r-biostrings r-rcurl r-xml))
(home-page "https://bioconductor.org/packages/AffyCompatible/")