clan-core/pkgs/clan-cli/clan_cli/nix.py
Jörg Thalheim 409e5d459c
All checks were successful
build / test (push) Successful in 14s
zerotier: move nix_shell to external package
2023-07-26 08:04:46 +02:00

11 lines
299 B
Python

import os
CLAN_NIXPKGS = os.environ.get("CLAN_NIXPKGS")
def nix_shell(packages: list[str], cmd: list[str]) -> list[str]:
# in unittest we will have all binaries provided
if CLAN_NIXPKGS is None:
return cmd
return ["nix", "shell", "-f", CLAN_NIXPKGS] + packages + ["-c"] + cmd