aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2022-04-19Fix 'nix fmt' testEelco Dolstra
2022-04-19Require formatters to be packagesEelco Dolstra
Because of 9b41239d8fdcc3fe50febe718c15833ebc224354, a formatter can no longer be a package *or* an app. So let's require it to be a package for now.
2022-04-19Merge branch 'issue-6075' of https://github.com/kamadorueda/nixEelco Dolstra
2022-04-19Fix compilation, style fixesEelco Dolstra
2022-04-19Merge branch 'make-flake-show-more-lenient-on-apps' of ↵Eelco Dolstra
https://github.com/flox/nix
2022-04-14fix: ensure apps are apps and packages are packagesTom Bereknyei
2022-04-09Test fetchMercurial with path containing a `.` segmentDaniel Pauls
2022-04-07Test fetchgit with path containing a `.` segmentThéophane Hufschmitt
2022-04-06fetchClosure: Don't allow URL query parametersEelco Dolstra
Allowing this is a potential security hole, since it allows the user to specify parameters like 'local-nar-cache'.
2022-04-05Allow `welcomeText` when checking a flake templateThéophane Hufschmitt
Fix https://github.com/NixOS/nix/issues/6321
2022-04-01Fix handling of outputHash when outputHashAlgo is not specifiedEelco Dolstra
https://hydra.nixos.org/build/171351131
2022-03-31tests/impure-derivations.sh: Ensure that inputAddressed build failsEelco Dolstra
2022-03-31Provide default values for outputHashAlgo and outputHashModeEelco Dolstra
2022-03-31Fix testEelco Dolstra
2022-03-31tests/impure-derivations.sh: Restart daemonEelco Dolstra
2022-03-31Support fixed-output derivations depending on impure derivationsEelco Dolstra
2022-03-31Add support for impure derivationsEelco Dolstra
Impure derivations are derivations that can produce a different result every time they're built. Example: stdenv.mkDerivation { name = "impure"; __impure = true; # marks this derivation as impure outputHashAlgo = "sha256"; outputHashMode = "recursive"; buildCommand = "date > $out"; }; Some important characteristics: * This requires the 'impure-derivations' experimental feature. * Impure derivations are not "cached". Thus, running "nix-build" on the example above multiple times will cause a rebuild every time. * They are implemented similar to CA derivations, i.e. the output is moved to a content-addressed path in the store. The difference is that we don't register a realisation in the Nix database. * Pure derivations are not allowed to depend on impure derivations. In the future fixed-output derivations will be allowed to depend on impure derivations, thus forming an "impurity barrier" in the dependency graph. * When sandboxing is enabled, impure derivations can access the network in the same way as fixed-output derivations. In relaxed sandboxing mode, they can access the local filesystem.
2022-03-30Don’t create a file in the worktree in the fetchPath testThéophane Hufschmitt
2022-03-25Merge pull request #6311 from edolstra/return-wanted-pathsEelco Dolstra
Make buildPathsWithResults() only return info on wanted outputs
2022-03-24tests/build.sh: Test that 'nix build' only prints wanted outputsEelco Dolstra
2022-03-24Implement regression test for empty logs loaded via `nix log`Maximilian Bosch
2022-03-24Add experimental feature 'fetch-closure'Eelco Dolstra
2022-03-24Add a test for fetchClosure and 'nix store make-content-addressed'Eelco Dolstra
2022-03-22Don't hide repeated values while generating manifest.nixEelco Dolstra
Fixes #6243.
2022-03-19Fix sourcehut integration testGabriel Fontes
The new implementation relies on tab separting the hash and ref (this is how sourcehut does it). This fixes the integration test to use a tab instead of a space.
2022-03-17Merge pull request #6277 from thufschmitt/ca/nix-build-dry-runEelco Dolstra
Fix `nix build --dry-run` with CA derivations
2022-03-17Merge pull request #6270 from Artturin/stdinevalThéophane Hufschmitt
nix: allow using --file - to read from stdin
2022-03-17Fix `nix build --dry-run` with CA derivationsThéophane Hufschmitt
Don’t try and assume that we know the output paths when we’ve just built with `--dry-run`. Instead make `--dry-run` follow a different code path that won’t assume the knowledge of the output paths at all. Fix #6275
2022-03-17Merge pull request #6242 from ncfavier/print-output-namesThéophane Hufschmitt
nix-env: always print output names in JSON and XML
2022-03-16Add some tests for `nix-env -q --json`Théophane Hufschmitt
2022-03-16add tests for nix eval and nix-instantiateArtturin
2022-03-16Fix the date in the comment of fetchPath’s testThéophane Hufschmitt
Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
2022-03-15Fix the tests on 32bits machinesregnat
year 2222 is too much for a 32 bit timestamp. So replace it by something smaller
2022-03-15Implement simple test for `path`-fetcher setting a correct `lastModifiedDate`Maximilian Bosch
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2022-03-11nix-fmt: add commandKevin Amado
2022-03-11Merge remote-tracking branch 'origin/eval-suggestions'Eelco Dolstra
2022-03-11Merge pull request #5758 from mschwaig/fix-git-workspace-dirty-detectionThéophane Hufschmitt
git fetcher: fix detection of dirty git workspaces
2022-03-08Also display some suggestions for invalid formal argumentsregnat
```console $ nix eval --expr '({ foo ? 1 }: foo) { fob = 2; }' error: anonymous function at (string):1:2 called with unexpected argument 'fob' at «string»:1:1: 1| ({ foo ? 1 }: foo) { fob = 2; } | ^ Did you mean foo? ``` Not that because Nix will first check for _missing_ arguments before checking for extra arguments, `({ foo }: foo) { fob = 1; }` will complain about the missing `foo` argument (rather than extra `fob`) and so won’t display a suggestion.
2022-03-08Add some suggestions to the evaluatorregnat
Make the evaluator show some suggestions when trying to access an invalid field from an attrset. ```console $ nix eval --expr '{ foo = 1; }.foa' error: attribute 'foa' missing at «string»:1:1: 1| { foo = 1; }.foa | ^ Did you mean foo? ```
2022-03-07Merge branch 'cli-suggestions' of https://github.com/thufschmitt/nixEelco Dolstra
2022-03-07Add some end-to-end tests for the suggestionsregnat
2022-03-07Merge pull request #6029 from Ma27/nix-log-ssh-ngThéophane Hufschmitt
ssh-ng: also store build logs to make them accessible by `nix log`
2022-03-07Explain why the log tests are disabled for CA derivationsThéophane Hufschmitt
2022-03-04tests: grep for string in nix log for remote-buildsMaximilian Bosch
2022-03-02nix profile test: Restart daemonEelco Dolstra
Fixes nix-daemon: src/libstore/sqlite.cc:97: nix::SQLiteStmt::Use::Use(nix::SQLiteStmt&): Assertion `stmt.stmt' failed. which happens because the daemon doesn't properly handle the case where ca-derivations isn't enabled at daemon startup.
2022-03-02Remove obsolete todoEelco Dolstra
2022-03-02Silence kill outputEelco Dolstra
2022-03-02tests/common.sh.in: Add enableFeatures helperEelco Dolstra
2022-03-02nix profile: Add a test for non-flake packagesEelco Dolstra
2022-03-02nix profile: Support CA derivationsEelco Dolstra