diff --git a/nixpkgs_review/nix.py b/nixpkgs_review/nix.py index f4cca19..002f6f0 100644 --- a/nixpkgs_review/nix.py +++ b/nixpkgs_review/nix.py @@ -56,7 +56,7 @@ def nix_shell( run: str | None = None, sandbox: bool = False, ) -> None: - nix_shell = f"{shutil.which(build_graph)}-shell" + nix_shell = shutil.which(build_graph + "-shell") if not nix_shell: raise RuntimeError(f"{build_graph} not found in PATH") diff --git a/nixpkgs_review/utils.py b/nixpkgs_review/utils.py index 3245f4c..42acd9a 100644 --- a/nixpkgs_review/utils.py +++ b/nixpkgs_review/utils.py @@ -67,8 +67,8 @@ def current_system() -> str: def nix_nom_tool() -> str: - "Return `nom` if found in $PATH" - if shutil.which("nom"): + "Return `nom` and `nom-shell` if found in $PATH" + if shutil.which("nom") and shutil.which("nom-shell"): return "nom" return "nix"