diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5d2ec066..4415ba4e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,6 +98,21 @@ jobs: run: './ci/check-tests.sh' env: NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz" + coverage-darwin: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Nix + uses: cachix/install-nix-action@v12 + - name: Prefetch shell.nix + run: "nix-shell --run true" + - name: Coverage + run: "./ci/check-tests.sh" + env: + NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz" docs: runs-on: ubuntu-latest steps: diff --git a/nix/eval-machine-info.nix b/nix/eval-machine-info.nix index aa4103395..98c281a3f 100644 --- a/nix/eval-machine-info.nix +++ b/nix/eval-machine-info.nix @@ -44,11 +44,12 @@ let else import (pkgs.path + "/nixos/lib/eval-config.nix"); pkgs = if flakeUri != null - then - if network ? nixpkgs - then (builtins.head network.nixpkgs).legacyPackages.${system} - else throw "NixOps network must have a 'nixpkgs' attribute" - else (builtins.head (network.network)).nixpkgs or (import { inherit system; }); + then + if network ? nixpkgs + then (builtins.head network.nixpkgs).legacyPackages.${system} + else throw "NixOps network must have a 'nixpkgs' attribute" + else if network ? nixpkgs then (builtins.head (network.nixpkgs)) + else (import { inherit system; }); inherit (pkgs) lib; diff --git a/nixops/backends/__init__.py b/nixops/backends/__init__.py index c716cded2..ac4a9c86f 100644 --- a/nixops/backends/__init__.py +++ b/nixops/backends/__init__.py @@ -592,7 +592,7 @@ def download_file(self, source: str, target: str, recursive: bool = False): ) return self._logged_exec(cmdline) - def get_console_output(self): + def get_console_output(self) -> str: return "(not available for this machine type)\n"