| 17 May 2025 |
Bruno Rodrigues | dear all, anyone has experience with julia.withPackages? I’m not sure I understand if shell that use julia.withPackages would be reproducible? | 08:08:52 |
Bruno Rodrigues | so for example | 08:10:02 |
Bruno Rodrigues | let
pkgs = import (fetchTarball "https://github.com/rstats-on-nix/nixpkgs/archive/2025-03-10.tar.gz") {};
rpkgs = builtins.attrValues {
inherit (pkgs.rPackages)
dplyr
janitor
reticulate;
};
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive)
scheme-small
amsmath;
});
jlconf = pkgs.julia_110.withPackages [
"RDatasets"
"TidierData"
];
system_packages = builtins.attrValues {
inherit (pkgs)
R
glibcLocales
nix;
};
shell = pkgs.mkShell {
LOCALE_ARCHIVE = if pkgs.system == "x86_64-linux" then "${pkgs.glibcLocales}/lib/locale/locale-archive" else "";
LANG = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
buildInputs = [ rpkgs tex jlconf system_packages ];
};
in
{
inherit pkgs shell;
}
| 08:10:12 |
Bruno Rodrigues | nixpkgs are pinned, so R and Python packages are pinned | 08:10:55 |
Bruno Rodrigues | but with julia.withPackages, the julia packages come from outside nixpkgs | 08:11:26 |
Bruno Rodrigues | so building this expression in, say, 6 months, could result in another shell, if in the meantime the julia packages get updated, no? | 08:12:01 |
SomeoneSerge (matrix works sometimes) | julia.withPackages pins a revision of whatsthename registry, which it fetches and ingests back into the nix interpreter using IFD | 16:34:32 |
SomeoneSerge (matrix works sometimes) | So it's hermetic-ish in the usual sense | 16:36:09 |
SomeoneSerge (matrix works sometimes) | @brodriguesco:matrix.org: | 16:36:53 |
Bruno Rodrigues | yes, now I see that it imports ./registry.nix which pins the julia packages defined on another repo | 17:53:42 |