From 18dc4d57ed56e6405ca719c6ee938e4a1255052f Mon Sep 17 00:00:00 2001
From: b-rodrigues This generates the following (note the value provided to the This generates the following The file looks like this: to generate a This call to Day-to-day use of {rix} other_pkgs = NULL,
git_pkgs = NULL,
ide = "rstudio",
- path = path_default_nix,
+ project_path = path_default_nix,
overwrite = TRUE)
default.nix
file:#>
-#> # This file was generated by the {rix} R package on Fri Aug 11 08:45:14 2023
+#> # This file was generated by the {rix} R package on Fri Aug 11 09:48:49 2023
+#> # with following call:
+#> RIX_CALL
#> # It uses nixpkgs' revision 4d2389b927696ef8da4ef76b03f2d306faf87929 for reproducibility purposes
#> # which will install R version current
#> # Report any issues to https://github.com/b-rodrigues/rix
@@ -235,12 +237,14 @@
Day-to-day use of {rix} other_pkgs = NULL,
git_pkgs = NULL,
ide = "code",
- path = path_default_nix,
+ project_path = path_default_nix,
overwrite = TRUE)
ide
argument).default.nix
file:#>
-#> # This file was generated by the {rix} R package on Fri Aug 11 08:45:14 2023
+#> # This file was generated by the {rix} R package on Fri Aug 11 09:48:49 2023
+#> # with following call:
+#> RIX_CALL
#> # It uses nixpkgs' revision 4d2389b927696ef8da4ef76b03f2d306faf87929 for reproducibility purposes
#> # which will install R version current
#> # Report any issues to https://github.com/b-rodrigues/rix
@@ -291,11 +295,13 @@
Running old projects with {rix}= c("quarto"),
git_pkgs = NULL,
ide = "other",
- path = path_default_nix,
+ project_path = path_default_nix,
overwrite = TRUE)
#>
-#> # This file was generated by the {rix} R package on Fri Aug 11 08:45:15 2023
+#> # This file was generated by the {rix} R package on Fri Aug 11 09:48:49 2023
+#> # with following call:
+#> RIX_CALL
#> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes
#> # which will install R version 4.2.1
#> # Report any issues to https://github.com/b-rodrigues/rix
@@ -343,12 +349,14 @@
Installing old packages archiv
other_pkgs = NULL,
git_pkgs = NULL,
ide = "other",
- path = path_default_nix,
+ project_path = path_default_nix,
overwrite = TRUE)
cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
#>
-#> # This file was generated by the {rix} R package on Fri Aug 11 08:45:15 2023
+#> # This file was generated by the {rix} R package on Fri Aug 11 09:48:49 2023
+#> # with following call:
+#> RIX_CALL
#> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes
#> # which will install R version 4.2.1
#> # Report any issues to https://github.com/b-rodrigues/rix
@@ -415,12 +423,14 @@
Installing packages from Github commit = "d617172447d2947efb20ad6a4463742b8a5d79dc")
),
ide = "other",
- path = path_default_nix,
+ project_path = path_default_nix,
overwrite = TRUE)
cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
#>
-#> # This file was generated by the {rix} R package on Fri Aug 11 08:45:16 2023
+#> # This file was generated by the {rix} R package on Fri Aug 11 09:48:51 2023
+#> # with following call:
+#> RIX_CALL
#> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes
#> # which will install R version 4.2.1
#> # Report any issues to https://github.com/b-rodrigues/rix
@@ -494,12 +504,14 @@
A complete example= "d617172447d2947efb20ad6a4463742b8a5d79dc")
),
ide = "rstudio",
- path = path_default_nix,
+ project_path = path_default_nix,
overwrite = TRUE)
cat(readLines(paste0(path_default_nix, "/default.nix")), sep = "\n")
#>
-#> # This file was generated by the {rix} R package on Fri Aug 11 08:45:18 2023
+#> # This file was generated by the {rix} R package on Fri Aug 11 09:48:53 2023
+#> # with following call:
+#> RIX_CALL
#> # It uses nixpkgs' revision 79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a for reproducibility purposes
#> # which will install R version 4.2.1
#> # Report any issues to https://github.com/b-rodrigues/rix
diff --git a/articles/interactive-use.html b/articles/interactive-use.html
index 3c343016..fce67be0 100644
--- a/articles/interactive-use.html
+++ b/articles/interactive-use.html
@@ -147,7 +147,7 @@
Scenario 2: you install
other_pkgs = NULL,
git_pkgs = NULL,
ide = "rstudio",
- path = ".", # change to a project's path
+ project_path = ".", # change to a project's path
overwrite = TRUE)
default.nix
, and then use that file to
generate an environment with R, Rstudio, dplyr and
diff --git a/articles/reproducible-analytical-pipelines-with-nix.html b/articles/reproducible-analytical-pipelines-with-nix.html
index 73873f42..1dceec6e 100644
--- a/articles/reproducible-analytical-pipelines-with-nix.html
+++ b/articles/reproducible-analytical-pipelines-with-nix.html
@@ -104,7 +104,7 @@ An example o
branch_name = "fusen",
commit = "1c860959310b80e67c41f7bbdc3e84cef00df18e"),
ide = "other",
- path = ".",
+ project_path = ".",
overwrite = TRUE)
rix()
generates the following
default.nix
file:An example o
you could add a Shell-hook to the generated
default.nix
file:
...
- mkShell {
- shellHook = ''
- Rscript -e "targets::tar_make()"
- '';
- LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
- buildInputs = [
- my-r
- ];
- }
-
-
+mkShell {
+ shellHook = ''
+ Rscript -e "targets::tar_make()"
+ '';
+ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
+ buildInputs = [
+ my-r
+ ];
+}
Now, each time you drop into the Nix shell for that project using
nix-shell
, the pipeline gets automatically executed.
Character, defaults to "current". The required R version. To use the current version
-of R, use "current". You can check which R versions are available using available_r
.
available_r
.
+If a nixpkgs revision is provided instead, this gets returned.
Logical, defaults to FALSE. If TRUE, overwrite the default.nix
-file in the specified path.
nix-shell
. See the "Building reproducible development environments with rix"
vignette for detailled instructions.
Packages to install from Github must be provided in a list of 4 elements:
-"package_name", "repo_url", "branch_name" and "commit". A fifth, optional
-element, "sri_hash" can be provided as well. This argument can also be a list
-of lists of these 4 elements. It is also possible to install old versions
+"package_name", "repo_url", "branch_name" and "commit".
+This argument can also be a list of lists of these 4 elements. It is also possible to install old versions
of packages by specifying a version. For example, to install the latest
-version of {AER}
but an old version of {ggplot2}
, you could provide
-the set r_pkgs
to: r_pkgs = c("dplyr", "ggplot2@2.2.1")
. Note
+version of {AER}
but an old version of {ggplot2}
, you could
+write: r_pkgs = c("AER", "ggplot2@2.2.1")
. Note
however that doing this could result in dependency hell, because an older
version of a package might need older versions of its dependencies, but other
packages might need more recent version of the same dependencies. If instead you
diff --git a/search.json b/search.json
index cf59a303..b8b8d497 100644
--- a/search.json
+++ b/search.json
@@ -1 +1 @@
-[{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.