aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2021-09-07Merge pull request #4922 from nrdxp/default-submodulesShea Levy
libfetchers/git: fetch submodules by default
2021-09-02parseInstallables(): Parse store paths as store pathsEelco Dolstra
If the store path contains a flake, this means that a command like "nix path-info /path" will show info about /path, not about the default output of the flake in /path. If you want the latter, you can explicitly ask for it by doing "nix path-info path:/path". Fixes #4568.
2021-09-02Failing test case for flake in storeStéphan Kochen
2021-09-01Merge pull request #5066 from Radvendii/masterEelco Dolstra
add antiquotations to paths
2021-08-31tests/fetchurl.sh: Be verbose to help debug darwin eof bug #2794Robert Hensing
2021-08-17Add tests for flake follow pathsAlex Zero
2021-08-06path antiquotations: rename confusing testTaeer Bar-Yam
2021-08-06add path antiqutations testTaeer Bar-Yam
2021-07-31nix-shell -p: pass --arg values as nixpkgs paramsldesgoui
2021-07-27Remove the right socket before starting the daemonregnat
For some reason, an old socket occasionally stays here on OSX, causing the subsequent tests to fail
2021-07-27Allow running all the tests with the daemonregnat
When `NIX_DAEMON_PACKAGE` is set, make all the tests use the Nix daemon. That way we can test every piece of Nix functionality both with and without the daemon. Tests for which using the daemon isn’t possible or doesn’t make sens can selectively be disabled with `needLocalStore`
2021-07-27Add --eval-store testEelco Dolstra
2021-07-21Merge branch 'balsoft/no-registries' of https://github.com/serokell/nixEelco Dolstra
2021-07-20Properly lock the builds of CA derivationsregnat
Make sure that we can’t build the same derivation twice at the same time. Fix https://github.com/NixOS/nix/issues/5029
2021-07-16Add use-registries config option (and deprecate --no-registries flag)Alexander Bantyev
Some people want to avoid using registries at all on their system; Instead of having to add --no-registries to every command, this commit allows to set use-registries = false in the config. --no-registries is still allowed everywhere it was allowed previously, but is now deprecated. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2021-07-16Forward the whole Nix config to the repl subprocessesregnat
Fill `NIX_CONFIG` with the value of the current Nix configuration before calling the nix subprocesses in the repl That way the whole configuration (including the possible `experimental-features`, a possibly `--store` option or whatever) will be made available. This is required for example to make `nix repl` work with a custom `--store`
2021-07-12Merge branch 'master' into structured-attrs-shellMaximilian Bosch
Conflicts: src/nix/develop.cc src/nix/get-env.sh tests/shell.nix
2021-07-09nix print-dev-env: Add --json flagEelco Dolstra
2021-07-09nix develop: Add a test for bash functionsEelco Dolstra
2021-07-09Add test for #4992Eelco Dolstra
2021-07-09nix develop: Add a test for arraysEelco Dolstra
2021-07-08Merge pull request #4988 from NixOS/fetchgit-name-attributeEelco Dolstra
Add a name attribute to the fetchers
2021-07-08Forbid the `name` attribute for fetchTreeregnat
We need to support it for the “old” fetch* functions for backwards compatibility, but we don’t need it for fetchTree (as it’s a new function). Given that changing the `name` messes-up the content hashing, we can just forbid passing a custom `name` argument to it
2021-07-07Add tests/dummyEelco Dolstra
2021-07-07tests/check.sh: Fix a raceEelco Dolstra
Fixes this random failure: error: hash mismatch in fixed-output derivation '/tmp/nix-shell.EUgAVU/nix-test/tests/check/store/sfps3l3c5n7dabpx34kigxnfhmrwk2h6-dummy.drv': specified: sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= got: sha256-0qhPS4tlCTfsj3PNi+LHSt1akRumTfJ0WO2CKdqASiY= which happens because multiple tests were writing to ./dummy.
2021-07-07Merge branch 'balsoft/registry' of https://github.com/serokell/nixEelco Dolstra
2021-07-06allow fetchMercurial to take a `name` argumentregnat
2021-07-06allow fetchTarball to take a `name` argumentregnat
2021-07-06Allow `fetchGit` to take a `name` argumentregnat
Fix #3388
2021-07-05Fix devShell handling of env values including @ and %Michael Fellinger
2021-07-02Add tests for --registry and second arg for nix registry pinAlexander Bantyev
2021-06-28Merge pull request #4937 from NixOS/ca/make-the-tests-usefulEelco Dolstra
Make the CA tests actually test something
2021-06-25tests: Get rid of some result symlinksEelco Dolstra
Fixes error: cannot create symlink '/home/eelco/Dev/nix/tests/result'; already exists
2021-06-24Make CA derivations compatible with recursive Nixregnat
Add an access-control list to the realisations in recursive-nix (similar to the already existing one for store paths), so that we can build content-addressed derivations in the restricted store. Fix #4353
2021-06-24Make the post-build-hook also run for unresolved CA derivationsregnat
Fix #4837
2021-06-23Fix the CA gc testregnat
Broken by https://github.com/NixOS/nix/issues/4936
2021-06-23Make the CA tests actuall test CA derivationsregnat
Fix a mistake in config.nix that was preventing `NIX_TESTS_CA_BY_DEFAULT` from having any meaningful effect
2021-06-23Merge pull request #4839 from NixOS/ca/gracefully-handle-duplicate-realisationsEelco Dolstra
Gracefully handle duplicate realisations
2021-06-23Merge pull request #4908 from NixOS/ca/fix-nix-developEelco Dolstra
Make `nix develop` work with CA derivations
2021-06-23Merge pull request #4842 from NixOS/ca/fix-nix-shellEelco Dolstra
Make `nix-shell` support content-addressed derivations
2021-06-23Add a test for the “two glibc” issueregnat
2021-06-23Merge pull request #4838 from NixOS/ca/recursively-substitute-realisationsEelco Dolstra
Recursively substitute the realisations
2021-06-23Merge pull request #4906 from NixOS/collect-garbage-caEelco Dolstra
Make `computeFSClosure` ca-aware
2021-06-23Merge pull request #4905 from NixOS/ca-derivations-machine-featureEelco Dolstra
Add a ca-derivations required machine feature
2021-06-22Prefix env vars for attrs.* files with NIX_Maximilian Bosch
2021-06-22Add testcase for `nix develop` with `__structuredAttrs`Maximilian Bosch
2021-06-22Set environment variables for .attrs.json & .attrs.shMaximilian Bosch
This way no derivation has to expect that these files are in the `cwd` during the build. This is problematic for `nix-shell` where these files would have to be inserted into the nix-shell's `cwd` which can become problematic with e.g. recursive `nix-shell`. To remain backwards-compatible, the location inside the build sandbox will be kept, however using these files directly should be deprecated from now on.
2021-06-22Source complete env in `nix-shell` with `__structuredAttrs = true;`Maximilian Bosch
This is needed to push the adoption of structured attrs[1] forward. It's now checked if a `__json` exists in the environment-map of the derivation to be openend in a `nix-shell`. Derivations with structured attributes enabled also make use of a file named `.attrs.json` containing every environment variable represented as JSON which is useful for e.g. `exportReferencesGraph`[2]. To provide an environment similar to the build sandbox, `nix-shell` now adds a `.attrs.json` to `cwd` (which is mostly equal to the one in the build sandbox) and removes it using an exit hook when closing the shell. To avoid leaking internals of the build-process to the `nix-shell`, the entire logic to generate JSON and shell code for structured attrs was moved into the `ParsedDerivation` class. [1] https://nixos.mayflower.consulting/blog/2020/01/20/structured-attrs/ [2] https://nixos.org/manual/nix/unstable/expressions/advanced-attributes.html#advanced-attributes
2021-06-21Remove a possible existing store path when building CA derivationsregnat
In case a previous interrupted build left a garbage path laying around, remove it before trying to move the path to its final location. Fix #4858
2021-06-17libfetchers/git: fetch submodules by defaultTimothy DeHerrera