1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00
nix/tests/functional
Ivan Trubach 68090d7ff1 Fix empty outputsToInstall for InstallableAttrPath
Fixes assertion failure if outputsToInstall is empty by defaulting to the "out"
output. That is, behavior between the following commands should be consistent:

	$ nix build --no-link --json .#nothing-to-install-no-out
	error: derivation '/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-nothing-to-install-no-out.drv' does not have wanted outputs 'out'

	$ nix build --no-link --file default.nix --json nothing-to-install-no-out
	error: derivation '/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-nothing-to-install-no-out.drv' does not have wanted outputs 'out'

Real-world example of this issue:

	$ nix build --json .#.legacyPackages.aarch64-linux.texlive.pkgs.iwona
	error: derivation '/nix/store/dj0h6b0pnlnan5nidnhqa0bmzq4rv6sx-iwona-0.995b.drv' does not have wanted outputs 'out'

	$ git rev-parse HEAD
	eee33247cf6941daea8398c976bd2dda7962b125
	$ nix build --json --file . texlive.pkgs.iwona
	nix: src/libstore/outputs-spec.hh:46: nix::OutputsSpec::Names::Names(std::set<std::__cxx11::basic_string<char> >&&): Assertion `!empty()' failed.
	Aborted (core dumped)
2024-06-02 14:26:18 +03:00
..
ca Fix building CA derivations with and eval store 2023-12-11 12:17:36 -05:00
common Shellcheck some test scripts 2024-05-28 12:32:22 -04:00
config Add functional tests for include directive in nix config file 2024-04-02 18:10:36 -07:00
dyn-drv Print value on type error 2024-01-22 08:56:02 -08:00
flakes add regression test for nix edit 2024-05-31 12:58:47 +02:00
git-hashing Fix git-hashing/simple.sh 2024-03-23 22:08:52 -04:00
lang Require drvPath attribute to end with .drv 2024-05-22 12:50:24 -04:00
local-overlay-store tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
nested-sandboxing
plugins Allow for ergnomically putting Unix-only files in subdirs by creating INLCUDE_$(pkg) vars 2024-03-27 12:01:59 -04:00
test-libstoreconsumer Allow for ergnomically putting Unix-only files in subdirs by creating INLCUDE_$(pkg) vars 2024-03-27 12:01:59 -04:00
add.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
bash-profile.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
big-derivation-attr.nix
binary-cache-build-remote.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
binary-cache.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
brotli.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-delete.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-dry.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-hook-ca-fixed.nix
build-hook-ca-floating.nix
build-hook.nix
build-remote-content-addressed-fixed.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-remote-content-addressed-floating.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-remote-input-addressed.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-remote-trustless-after.sh Shellcheck some test scripts 2024-05-28 12:32:22 -04:00
build-remote-trustless-should-fail-0.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-remote-trustless-should-pass-0.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-remote-trustless-should-pass-1.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-remote-trustless-should-pass-2.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-remote-trustless-should-pass-3.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-remote-trustless.sh Shellcheck some test scripts 2024-05-28 12:32:22 -04:00
build-remote-with-mounted-ssh-ng.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
build-remote.sh Shellcheck some test scripts 2024-05-28 12:32:22 -04:00
build.sh Fix empty outputsToInstall for InstallableAttrPath 2024-06-02 14:26:18 +03:00
ca-shell.nix
case-hack.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
case.nar
check-refs.nix
check-refs.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
check-reqs.nix
check-reqs.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
check.nix
check.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
chroot-store.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
common.sh Shellcheck some test scripts 2024-05-28 12:32:22 -04:00
completions.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
compression-levels.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
compute-levels.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
config.nix.in
config.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
db-migration.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
debugger.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
dependencies.builder0.sh
dependencies.nix
dependencies.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
derivation-json.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
dummy
dump-db.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
eval-store.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
eval.nix
eval.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
experimental-features.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
export-graph.nix
export-graph.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
export.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
extra-sandbox-profile.nix libstore: check additionalSandboxProfile 2024-05-06 17:37:08 +02:00
extra-sandbox-profile.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
failing.nix
fetchClosure.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fetchGit.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fetchGitRefs.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fetchGitSubmodules.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fetchGitVerification.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fetchMercurial.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fetchPath.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fetchTree-file.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fetchurl.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
filter-source.nix
filter-source.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fixed.builder1.sh
fixed.builder2.sh
fixed.nix Make outputHashAlgo accept "nar", stay in sync 2024-04-09 16:17:23 -04:00
fixed.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fmt.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
fmt.simple.sh
fod-failing.nix nix3-build: show all FOD errors with --keep-going 2024-05-17 18:48:52 +02:00
function-trace.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
gc-auto.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
gc-concurrent.builder.sh
gc-concurrent.nix
gc-concurrent.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
gc-concurrent2.builder.sh
gc-non-blocking.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
gc-runtime.nix
gc-runtime.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
gc.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
hash-check.nix
hash-convert.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
hash-path.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
help.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
hermetic.nix Activate hermetic.nix variation only for new layered store tests 2024-02-29 10:06:53 -05:00
ifd.nix remote-store test: Break out IFD expression into a separate file 2023-12-23 17:15:09 -05:00
import-derivation.nix
import-derivation.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
impure-derivations.nix
impure-derivations.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
impure-env.nix Allow CLI to pass environment variables to FOD builder (#8830) 2023-10-11 11:58:42 +00:00
impure-env.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
impure-eval.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
install-darwin.sh
lang-test-infra.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
lang.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
legacy-ssh-store.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
linux-sandbox-cert-test.nix
linux-sandbox.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
local.mk add regression test for nix edit 2024-05-31 12:58:47 +02:00
logging.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
misc.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
multiple-outputs.nix Fix empty outputsToInstall for InstallableAttrPath 2024-06-02 14:26:18 +03:00
multiple-outputs.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nar-access.nix
nar-access.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nested-sandboxing.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nix-build-examples.nix
nix-build.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nix-channel.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nix-collect-garbage-d.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nix-copy-ssh-common.sh Test nix copy --substitute-on-destination 2023-12-13 15:22:19 -05:00
nix-copy-ssh-ng.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nix-copy-ssh.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nix-daemon-untrusting.sh Arbitrarily bring back some nix-daemon calls 2024-01-13 11:27:04 -08:00
nix-profile.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nix-shell.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
nix_path.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
optimise-store.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
output-normalization.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
parallel.builder.sh
parallel.nix
parallel.sh
pass-as-file.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
path-from-hash-part.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
path-info.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
path.nix
placeholders.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
plugins.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
post-hook.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
pure-eval.nix
pure-eval.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
push-to-store-old.sh
push-to-store.sh
read-only-store.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
readfile-context.nix
readfile-context.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
recursive.nix
recursive.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
referrers.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
remote-store.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
repair.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
repl.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
restricted.nix
restricted.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
search.nix
search.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
secure-drv-outputs.nix
secure-drv-outputs.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
selfref-gc.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
shell-hello.nix nix shell: Test that store paths cannot link outside of the store 2024-04-11 11:06:35 +02:00
shell.nix Do not rely on $stdenv/setup to set output variables 2024-04-10 19:50:19 +03:00
shell.sh nix env shell: Move from nix shell, add shorthand alias 2024-05-30 19:41:58 +02:00
shell.shebang.nix
shell.shebang.rb
shell.shebang.sh
signing.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
simple-failing.nix
simple.builder.sh
simple.nix add regression test for nix edit 2024-05-31 12:58:47 +02:00
simple.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
ssh-relay.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
store-info.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
structured-attrs-shell.nix
structured-attrs.nix
structured-attrs.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
substitute-with-invalid-ca.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
suggestions.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
supplementary-groups.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
symlink-derivation.nix Fix the access of symlinks to host files in the sandbox 2024-04-12 15:57:53 +02:00
tarball.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
test-infra.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
test-libstoreconsumer.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
timeout.nix
timeout.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
toString-path.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
undefined-variable.nix
user-envs-migration.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
user-envs-test-case.sh tests: simplify initialisation and wiring 2024-05-13 15:19:49 +02:00
user-envs.builder.sh
user-envs.nix
user-envs.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
why-depends.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00
zstd.sh Ensure all functional scripts are (a) executable (b) have shebang 2024-05-28 12:46:24 -04:00