diff --git a/tests/modules/programs/autojump/default-settings.nix b/tests/modules/programs/autojump/default-settings.nix index 2cca7de8..e7d40bb3 100644 --- a/tests/modules/programs/autojump/default-settings.nix +++ b/tests/modules/programs/autojump/default-settings.nix @@ -8,6 +8,7 @@ with lib; test.stubs.autojump = { buildScript = "mkdir -p $out/bin; touch $out/bin/autojump"; + outPath = null; }; nmt.script = '' diff --git a/tests/modules/services/git-sync/basic.nix b/tests/modules/services/git-sync/basic.nix index d4115641..a82e9a4b 100644 --- a/tests/modules/services/git-sync/basic.nix +++ b/tests/modules/services/git-sync/basic.nix @@ -24,7 +24,7 @@ WantedBy=default.target [Service] - Environment=PATH=/nix/store/00000000000000000000000000000000-openssh/bin:/nix/store/00000000000000000000000000000000-git/bin + Environment=PATH=@openssh@/bin:/nix/store/00000000000000000000000000000000-git/bin Environment=GIT_SYNC_DIRECTORY=/a/path Environment=GIT_SYNC_COMMAND=@git-sync@/bin/git-sync Environment=GIT_SYNC_REPOSITORY=git+ssh://user@example.com:/~user/path/to/repo.git diff --git a/tests/stubs.nix b/tests/stubs.nix index dacafeb7..2d324c2c 100644 --- a/tests/stubs.nix +++ b/tests/stubs.nix @@ -41,8 +41,18 @@ let dummyPackage else pkgs.runCommandLocal name { pname = name; } buildScript; - in pkg // optionalAttrs (outPath != null) { inherit outPath; } - // optionalAttrs (version != null) { inherit version; }; + in pkg // optionalAttrs (outPath != null) { + inherit outPath; + + # Prevent getOutput from descending into outputs + outputSpecified = true; + + # Allow the original package to be used in derivation inputs + __spliced = { + buildHost = pkg; + hostTarget = pkg; + }; + } // optionalAttrs (version != null) { inherit version; }; in { options.test.stubs = mkOption {