You might find some build systems good enough that there is little to do at all to write a package, to the point that it becomes repetitive and tedious after a while. A raison d’être of computers is to replace human beings at those boring tasks. So let’s tell Guix to do this for us and create the package definition of an R package from CRAN (the output is trimmed for conciseness):
$ guix import cran --recursive walrus (define-public r-mc2d ; ... (license gpl2+))) (define-public r-jmvcore ; ... (license gpl2+))) (define-public r-wrs2 ; ... (license gpl3))) (define-public r-walrus (package (name "r-walrus") (version "1.0.3") (source (origin (method url-fetch) (uri (cran-uri "walrus" version)) (sha256 (base32 "1nk2glcvy4hyksl5ipq2mz8jy4fss90hx6cq98m3w96kzjni6jjj")))) (build-system r-build-system) (propagated-inputs (list r-ggplot2 r-jmvcore r-r6 r-wrs2)) (home-page "https://github.com/jamovi/walrus") (synopsis "Robust Statistical Methods") (description "This package provides a toolbox of common robust statistical tests, including robust descriptives, robust t-tests, and robust ANOVA. It is also available as a module for 'jamovi' (see <https://www.jamovi.org> for more information). Walrus is based on the WRS2 package by Patrick Mair, which is in turn based on the scripts and work of Rand Wilcox. These analyses are described in depth in the book 'Introduction to Robust Estimation & Hypothesis Testing'.") (license gpl3)))
The recursive importer won’t import packages for which Guix already has package definitions, except for the very first.
Not all applications can be packaged this way, only those relying on a select number of supported systems. Read about the full list of importers in the guix import section of the manual (see Invoking guix import in GNU Guix Reference Manual).