-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nix installable packages #508
base: nix-packages
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.