| 11 Jul 2023 |
Bruno Rodrigues | yes, because I want to build something that R users could use with as little friction as possible | 10:12:48 |
Bruno Rodrigues | and R users are really used to do everything from the R session, not so much from a cli tool | 10:13:04 |
Bruno Rodrigues | something that would mimic renv in a sense, but with nix instead (and nix would even go further, as it would even provide a separate R installation and potentielly RStudio as well) | 10:13:48 |
Bruno Rodrigues | then that default.nix file could be used for reproducibility purposes | 10:14:18 |
peddie | got it | 22:13:55 |
| 12 Jul 2023 |
| @futaki:matrix.org left the room. | 08:46:24 |
Bruno Rodrigues | So I've started playing with Nix. I am trying to build an environment with R and some packages installed (inside Docker, just to avoid interfering with my system). Here is the default.nix that I'm using:
with import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/e11142026e2cef35ea52c9205703823df225c947.tar.gz") {};
{
myProject = stdenv.mkDerivation {
name = "myProject";
version = "1";
src = if lib.inNixShell then null else nix;
buildInputs = with rPackages; [
R
ggplot2
knitr
];
};
}
| 12:19:26 |
Bruno Rodrigues | I can drop into a nix shell using CMD nix-shell /home/renv/default.nix in the Dockerfile and then running a container | 12:20:01 |
Bruno Rodrigues | but when I try to build the environment first, and then drop into bash that doesn't work. So when I do
| 12:20:39 |
Bruno Rodrigues | * but when I try to build the environment first, and then drop into bash that doesn't work. So when I do
| 12:20:48 |
Bruno Rodrigues | * but when I try to build the environment first, and then drop into bash that doesn't work. So when I do
RUN nix-build /home/renv/default.nix
CMD ["bash"]
I get following error message
builder for '/nix/store/1csmqrnlgbyzm5kkjw2s9q348qpx3rqy-myProject.drv' failed to produce output path for output 'out' at '/nix/store/icf4fsmlcalyc2v5wiwn88x6f7xab46y-myProject'
| 12:21:37 |