diff --git a/docs/contributing.adoc b/docs/contributing.adoc index 0b4409936..82a07a9a8 100644 --- a/docs/contributing.adoc +++ b/docs/contributing.adoc @@ -256,3 +256,8 @@ and run an individual test, for example `alacritty-empty-settings`, through [source,console] $ nix-shell --pure tests -A run.alacritty-empty-settings + +However, those invocations will impurely source the system’s nixpkgs, and may cause failures. To run against the nixpkgs from the flake.lock, use instead e.g. + +[source,console] +$ nix develop --ignore-environment .#tests.all diff --git a/flake.nix b/flake.nix index 2a1af863a..512111702 100644 --- a/flake.nix +++ b/flake.nix @@ -88,7 +88,9 @@ let pkgs = nixpkgs.legacyPackages.${system}; docs = import ./docs { inherit pkgs; }; + tests = import ./tests { inherit pkgs; }; in { + devShells.tests = tests.run; packages = rec { home-manager = pkgs.callPackage ./home-manager { }; docs-html = docs.manual.html; diff --git a/tests/modules/programs/zplug/modules.nix b/tests/modules/programs/zplug/modules.nix index 7c4abbc42..9f4d4332a 100644 --- a/tests/modules/programs/zplug/modules.nix +++ b/tests/modules/programs/zplug/modules.nix @@ -8,7 +8,7 @@ with lib; enable = true; zplug = { enable = true; - zplugHome = ~/.customZplugHome; + zplugHome = pkgs.emptyDirectory; plugins = [ { name = "plugins/git";