Commit graph

13676 commits

Author SHA1 Message Date
Eelco Dolstra 6b69652385 Merge remote-tracking branch 'origin/master' into coerce-string 2023-01-02 20:53:39 +01:00
Théophane Hufschmitt 8cac451fce Fix why-depends for CA derivations (again)
This has the same goal as b13fd4c58e81b2b2b0d72caa5ce80de861622610,but
achieves it in a different way in order to not break
`nix why-depends --derivation`.
2023-01-02 17:42:22 +01:00
Théophane Hufschmitt 6a90ef072c Increase the test coverage of why-depends
- Test with `--derivation`
- Actually test with ca-derivations (was suuposedly done, but not
  activated because of a missing line in `local.mk`)
2023-01-02 16:09:03 +01:00
Théophane Hufschmitt 105d74eb81 Revert "Fix why-depends for CA derivations"
This reverts commit b13fd4c58e.
2023-01-02 15:44:04 +01:00
Théophane Hufschmitt 9af16c5f74
Merge pull request #5941 from hercules-ci/optimize-intersectAttrs
Optimize intersectAttrs performance
2023-01-02 15:22:38 +01:00
Théophane Hufschmitt 9c05b80db0
Merge pull request #7426 from tianyuanhao/master
Avoid poly_user_note_set twice
2023-01-02 15:15:47 +01:00
Théophane Hufschmitt 34a31b33f1
Merge pull request #7278 from fricklerhandwerk/antiquotation
antiquotation -> string interpolation
2023-01-02 15:03:45 +01:00
Théophane Hufschmitt a654ae8269
Merge pull request #7066 from fricklerhandwerk/architecture-overview
manual: architecture overview
2023-01-02 14:42:01 +01:00
Valentin Gagarin e0c4a95611 antiquotation -> string interpolation
as proposed by @mkaito[1] and @tazjin[2] and discussed with @edolstra
and Nix maintainers

[1]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270076332
[2]: https://github.com/NixOS/nix.dev/pull/267#issuecomment-1270201979

Co-authored-by: John Ericson <git@JohnEricson.me>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-01-02 14:38:57 +01:00
Eelco Dolstra 80a0f77e49
Merge pull request #7470 from obsidiansystems/simplify-tests-slightly
Make `./mk/run-test.sh` work by itself; add `mk/debug-test.sh`
2023-01-02 14:14:30 +01:00
Théophane Hufschmitt fb8fc6fda6
Merge pull request #7478 from hercules-ci/make-sure-initNix-called
libstore: Make sure that initNix has been called
2023-01-02 14:12:49 +01:00
Théophane Hufschmitt 226591494a
Merge pull request #7536 from fricklerhandwerk/doc-fixup
remove redundant re-definition of store derivations
2023-01-02 14:10:33 +01:00
Valentin Gagarin 9cdf8ededb remove redundant re-definition of store derivations 2023-01-02 13:37:59 +01:00
Théophane Hufschmitt cfd6c7fc9b
Merge pull request #7485 from fricklerhandwerk/doc-store-derivation
define "store derivation"
2023-01-02 13:26:41 +01:00
Théophane Hufschmitt e7f2f70750
Merge pull request #7507 from trofi/use-nix-settings-in-tests
tests: switch to non-deprecated nix.settings.* module parameters
2023-01-02 11:49:12 +01:00
Théophane Hufschmitt b3285c7722
Merge pull request #7351 from NaN-git/fix-mkString
cleanup eval.hh/eval.cc
2023-01-02 11:41:52 +01:00
Théophane Hufschmitt e8a3e58171
Merge pull request #7521 from ncfavier/migration-deadlock
Release shared lock before acquiring exclusive lock
2023-01-02 11:08:43 +01:00
Théophane Hufschmitt dd115c0319
Merge pull request #7531 from steshaw/fix-error-message
Fix typo in error message
2023-01-02 07:57:46 +01:00
Théophane Hufschmitt 720c17f89d
Merge pull request #7476 from trofi/allow-external-CXXFLAGS
configure.ac: don't clobber CFLAGS=/CXXFLAGS= and allow users to pass…
2023-01-02 07:37:02 +01:00
Steven Shaw 84b0893725
Fix error message 2023-01-01 12:37:43 +10:00
Eelco Dolstra 8c52f8ea9d
Merge pull request #7524 from ncfavier/sandbox-paths-closure
doc: sandbox-paths computes closures
2022-12-29 19:45:51 +01:00
Eelco Dolstra 8227fe819e
Merge pull request #7504 from edolstra/nix-develop-personality
nix develop: Set personality
2022-12-29 19:42:45 +01:00
Naïm Favier d5d2f50ebb
doc: sandbox-paths computes closures 2022-12-28 17:09:20 +01:00
Naïm Favier 81c3f99b36
Release shared lock before acquiring exclusive lock
In principle, this should avoid deadlocks where two instances of Nix are
holding a shared lock on big-lock and are both waiting to get an
exclusive lock.

However, it seems like `flock(2)` is supposed to do this automatically,
so it's not clear whether this is actually where the problem comes from.
2022-12-27 15:58:14 +01:00
dependabot[bot] f5db3a74c4
Bump zeebe-io/backport-action from 0.0.9 to 1.0.1
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 0.0.9 to 1.0.1.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](https://github.com/zeebe-io/backport-action/compare/v0.0.9...v1.0.1)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 22:00:45 +00:00
Robert Hensing 336908cf4c Optimize intersectAttrs performance
Always traverse the shortest set.
2022-12-24 14:51:05 +01:00
Robert Hensing aba6eb348e libstore: Make sure that initNix has been called
Prevent bugs like https://github.com/cachix/cachix/pull/477
2022-12-24 14:39:30 +01:00
Philipp Otterbein 8af839f48c remove undefined function 2022-12-24 12:19:53 +01:00
Philipp Otterbein a6e9d9cb2f remove function makeImmutableStringWithLen 2022-12-24 12:09:06 +01:00
Sergei Trofimovich bcc0990272 tests: switch to non-deprecated nix.settings.* module parameters
Without the change checks issue the fllowing warning:

    $ nix flake check
    trace: warning: The option `nix.useSandbox' defined in `makeTest parameters' has been renamed to `nix.settings.sandbox'.
    trace: warning: The option `nix.useSandbox' defined in `makeTest parameters' has been renamed to `nix.settings.sandbox'.
    trace: warning: The option `nix.maxJobs' defined in `makeTest parameters' has been renamed to `nix.settings.max-jobs'.
    ...
2022-12-24 09:15:15 +00:00
Eelco Dolstra 3dbf9b5af5
Merge pull request #7367 from lheckemann/nixpkgs-22.11
Bump nixpkgs to 22.11
2022-12-23 23:20:48 +01:00
John Ericson efbd1d15c6
Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-23 08:59:36 -08:00
Eelco Dolstra c164d304f3 nix develop: Set personality
This makes 'nix develop' set the Linux personality in the same way
that the actual build does, allowing a command like 'nix develop
nix#devShells.i686-linux.default' on x86_64-linux to work correctly.
2022-12-23 16:33:55 +01:00
Eelco Dolstra 14f7dae3e4
Merge pull request #7503 from edolstra/fix-dirOf
Fix CanonPath::dirOf() returning a string_view of a temporary
2022-12-23 16:17:48 +01:00
Eelco Dolstra 64c60f7241 Fix CanonPath::dirOf() returning a string_view of a temporary
https://hydra.nixos.org/build/202837872
2022-12-23 15:32:54 +01:00
Akhil a3a0e414c2
Deletes build users and group 2022-12-23 14:06:51 +05:30
rski d034ed1891 src/libstore: Print the reason opening the DB failed
Without this, the error is lost, and it makes for a hard to debug
situation. Also remove some of the busyness inside the sqlite_open_v2
args.

The errcode returned is not the extended one. The only way to make open
return an extended code, would be to add SQLITE_OPEN_EXRESCODE to the
flags. In the future it might be worth making this change,
which would also simplify the existing SQLiteError code.
2022-12-23 02:55:51 +02:00
Eelco Dolstra c9eee5a84d
Merge pull request #7493 from mupdt/primops-storeDir-test-non-standard-path
primops `storeDir` test uses `settings.nixStore`
2022-12-22 16:18:48 +01:00
Eelco Dolstra b1223e1b62
Merge pull request #7489 from mupdt/nar-info-disk-cache-race-condition
[PDT] TDE-3114: prevent a race-condition when creating the S3 cache
2022-12-21 13:09:54 +01:00
mupdt a33e45b60b primops storeDir test uses settings.nixStore 2022-12-21 07:01:57 -05:00
Valentin Gagarin 7797661a70 link "store derivation" to glossary definition 2022-12-21 11:42:50 +01:00
Valentin Gagarin 3a66d82e1d update description of "store derivation" in installables section
a store derivation is not a store path itself, it has a store path.
2022-12-21 11:42:22 +01:00
Valentin Gagarin 62f4f883a7 define "store derivation" 2022-12-21 11:42:22 +01:00
mupdt bc8ab21c5a [PDT] TDE-3114: prevent a race-condition when creating the S3 cache 2022-12-21 04:50:40 -05:00
John Ericson 0251d44cc2 Make ./mk/run-test.sh work by itself; add mk/debug-test.sh
First, logic is consolidated in the shell script instead of being spread
between them and makefiles. That makes understanding what is going on a
little easier.

This would not be super interesting by itself, but it gives us a way to
debug tests more easily. *That* in turn I hope is much more compelling.
See the updated manual for details.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-12-21 02:28:33 -05:00
Robert Hensing 1437582ccd
doc/book.toml: Improve config (#7300)
* doc/book.toml: Improve config

 - `title` value will be added to the HTML <title> - here</title>

 - `git-repository-url` adds a link to the GitHub repo in the top right corner

 - `edit-url-template` adds an edit link, inviting contributions

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2022-12-20 16:29:32 +01:00
Eelco Dolstra 3fa246d3bc
Merge pull request #7483 from fricklerhandwerk/glossary-fixups
make relative links explicit
2022-12-20 15:13:20 +01:00
Eelco Dolstra 5c97b5a398 InstallableFlake::toDerivedPaths(): Support paths and store paths
This makes 'nix build' work on paths (which will be copied to the
store) and store paths (returned as is). E.g. the following flake
output attributes can be built using 'nix build .#foo':

  foo = ./src;
  foo = self.outPath;
  foo = builtins.fetchTarball { ... };
  foo = (builtins.fetchTree { .. }).outPath;
  foo = builtins.fetchTree { .. } + "/README.md";
  foo = builtins.storePath /nix/store/...;

Note that this is potentially risky, e.g.

  foo = /.;

will cause Nix to try to copy the entire file system to the store.

What doesn't work yet:

  foo = self;
  foo = builtins.fetchTree { .. };

because we don't handle attrsets with an outPath attribute in it yet,
and

  foo = builtins.storePath /nix/store/.../README.md;

since result symlinks have to point to a store path currently (rather
than a file inside a store path).

Fixes #7417.
2022-12-20 15:11:44 +01:00
Eelco Dolstra bda879170f EvalState::copyPathToStore(): Return a StorePath 2022-12-20 14:58:39 +01:00
Valentin Gagarin 7e31a991db make relative links explicit 2022-12-20 14:28:43 +01:00