Conversation
|
@HexF I get dependency problems when trying to inject some packages into the environment. For example this happens when installing python requests and adding its |
|
Creating a ready environment using |
|
|
What if {pkgs, piston, ...}:
let
basePkg = pkgs.python3;
in piston.mkRuntime libraries:
let
pkg = basePkg.withPackages libraries;
in
{
language = "python3";
version = pkg.version;
aliases = [
"py3"
"py"
"python"
];
run = ''
${pkg}/bin/python3 "$@"
'';
packages = pkg.pkgs;
tests = [
(piston.mkTest {
files = {
"test.py" = ''
print("OK")
'';
};
})
];
} |
9f2bbcd to
8e230be
Compare
|
Flakes don't seem to support command-line arguments so how will we do the ad-hoc package installations? |
| in piston.mkRuntime { | ||
| { pkgs, piston, ... }: | ||
| let basePkg = pkgs.python3; | ||
| in piston.mkRuntime (libraries: |
There was a problem hiding this comment.
Could we possibly make this piston.mkRuntimePackages or similar, just so if packages aren't required we can use the old format?
|
|
There seems to be this: https://nixos.org/manual/nix/stable/language/builtins.html#builtins-getFlake if we export the runtimes as a function that takes the packages as an argument. But it seems to copy the entire working directory into the nix store every time and it is slow. |
|
Maybe we can copy |
|
The reason |
|
Finally got back around to looking at this... wow its been a while. What I'm thinking currently is just exporting the |
No description provided.