!fXpAvneDgyJuYMZSwO:nixos.org

Nix Data Science

311 Members
61 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
11 Jul 2023
@brodriguesco:matrix.orgBruno Rodriguesyes, because I want to build something that R users could use with as little friction as possible10:12:48
@brodriguesco:matrix.orgBruno Rodriguesand R users are really used to do everything from the R session, not so much from a cli tool 10:13:04
@brodriguesco:matrix.orgBruno Rodriguessomething 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
@brodriguesco:matrix.orgBruno Rodriguesthen that default.nix file could be used for reproducibility purposes10:14:18
@peddie:matrix.orgpeddiegot it22:13:55
12 Jul 2023
@futaki:matrix.org@futaki:matrix.org left the room.08:46:24
@brodriguesco:matrix.orgBruno 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
@brodriguesco:matrix.orgBruno 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
@brodriguesco:matrix.orgBruno 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
@brodriguesco:matrix.orgBruno 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
@brodriguesco:matrix.orgBruno 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

Show newer messages


Back to Room ListRoom Version: 6