cli: get optional deps from our own flake

This ensures we actually test if all those binaries build
This commit is contained in:
Jörg Thalheim
2023-07-26 09:27:48 +02:00
parent ed474457b3
commit 09cc79867d
6 changed files with 46 additions and 34 deletions

View File

@@ -2,9 +2,9 @@ import os
def nix_shell(packages: list[str], cmd: list[str]) -> list[str]:
nixpkgs = os.environ.get("CLAN_NIXPKGS")
flake = os.environ.get("CLAN_FLAKE")
# in unittest we will have all binaries provided
if nixpkgs is None:
if flake is None:
return cmd
wrapped_packages = [f"path:{nixpkgs}#{p}" for p in packages]
wrapped_packages = [f"path:{flake}#{p}" for p in packages]
return ["nix", "shell"] + wrapped_packages + ["-c"] + cmd