prefix nixpkgs# explicitly in nix_shell
This makes the function usage less confusing (you can now tell from the call side what are flags and what is passed to nix-shell) and allows to use different flakes to download packages.
This commit is contained in:
@@ -88,16 +88,15 @@ def nix_shell(packages: list[str], cmd: list[str]) -> list[str]:
|
||||
# in our tests we just make sure we have all the packages
|
||||
if os.environ.get("IN_NIX_SANDBOX"):
|
||||
return cmd
|
||||
wrapped_packages = [f"nixpkgs#{p}" for p in packages]
|
||||
return (
|
||||
nix_command(
|
||||
return [
|
||||
*nix_command(
|
||||
[
|
||||
"shell",
|
||||
"--inputs-from",
|
||||
f"{nixpkgs_flake()!s}",
|
||||
]
|
||||
)
|
||||
+ wrapped_packages
|
||||
+ ["-c"]
|
||||
+ cmd
|
||||
)
|
||||
),
|
||||
*packages,
|
||||
"-c",
|
||||
*cmd,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user