Commit graph

10829 commits

Author SHA1 Message Date
Eelco Dolstra d581129ef9
Merge pull request #5130 from alyssais/sys_name
configure.ac: remove another uname check
2021-08-13 12:53:37 +02:00
Alyssa Ross cff8fd69b6
configure.ac: remove another uname check
uname checks are not cross-safe.

The normalization for Cygwin doesn't need any equivalent for host_os
because nothing actually checked whether sys_name was cygwin any more.
2021-08-13 08:19:43 +00:00
Eelco Dolstra 43856b0d6d
Merge pull request #5124 from edolstra/lock-file-diff
Improve flake lock file diffs
2021-08-11 23:07:14 +02:00
Eelco Dolstra 3af1c28ebb flake.lock: Update
Flake lock file changes:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f77036342e2b690c61c97202bf48f2ce13acc022' (2021-06-28)
  → 'github:NixOS/nixpkgs/f6551e1efa261568c82b76c3a582b2c2ceb1f53f' (2021-08-11)
2021-08-11 19:36:34 +02:00
Eelco Dolstra 6b8069b823 In flake lock file diffs, show the last-modified date of inputs if available
This is a bit more informative than just the hash.

Also, format the diffs a bit nicer.
2021-08-11 19:35:28 +02:00
Eelco Dolstra 467a6fcdc2
Merge pull request #5123 from Pamplemousse/clean
15f4d4f follow up
2021-08-11 12:15:51 +02:00
Pamplemousse 0da416f820 15f4d4f follow up
* libstore: `bz2` should not be linked
  * libutil: `zlib.h` should not be included

Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-10 16:04:53 -07:00
Domen Kožar a6ba313a0a
Merge pull request #5115 from r-burns/darwin-host-os
Fix host OS detection for darwin-specific linker flag
2021-08-10 11:01:57 +02:00
Ryan Burns d86d43c34c Fix host OS detection for darwin-specific linker flag 2021-08-10 00:01:39 -07:00
Eelco Dolstra 8943e3176d
Merge pull request #5111 from Pamplemousse/clean
Minor maintenance cleaning
2021-08-09 20:05:03 +02:00
Pamplemousse 2de7a1fe67 libexpr: Squash similar conditions
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-09 10:10:11 -07:00
Sebastian Ullrich a0f97b1f54 Expand docstring of Store::querySubstitutablePathInfos 2021-08-09 15:58:50 +02:00
Anatole Lucet 67035ee23d Remove curl deps in install script 2021-08-09 15:33:39 +02:00
Eelco Dolstra 27444d40cf
Merge pull request #5101 from fzakaria/faridzakaria/fix-nix-shell
nix-shell --pure: Let it work for any derivation
2021-08-09 14:52:11 +02:00
Eelco Dolstra 4c5ce2a345
Merge pull request #5104 from andir/refscan-race
Fix potential race-condition in reference scanning code
2021-08-09 14:49:24 +02:00
Eelco Dolstra 873df3ab03
Merge pull request #5106 from andir/libstore-waiter-set
libstore: use set instead of list for waiter list
2021-08-09 14:46:49 +02:00
Eelco Dolstra 6c50dc1faf
Merge pull request #5102 from serokell/balsoft/whitelist-flake-registry
Whitelist nixConfig.flake-registry
2021-08-09 14:45:12 +02:00
Andreas Rammhold a9cb1ca32c libstore: use set instead of list for waiter list
This replaces the O(n) search complexity in our insert code with a
lookup of O(log n). It also makes removing waitees easier as we can use
the extract method provided by the set class.
2021-08-08 14:05:38 +02:00
Sebastian Ullrich 12f50b6510 Short-circuit querying substituters on success 2021-08-08 13:24:13 +02:00
Andreas Rammhold b2d3976163 Fix potential race-condition in reference scanning code
Previously the code ensures that the isBase32 array would only be
initialised once in a single-threaded context. If two threads happen to
call the function before the initialisation was completed both of them
would have completed the initialization step. This allowed for a
race-condition where one thread might be done with the initialization
but the other thread sets all the fields to false again. For a brief
moment the base32 detection would then produce false-negatives.
2021-08-07 19:10:25 +02:00
Alexander Bantyev 54c580b71f
Whitelist nixConfig.flake-registry
flake-registry should be safe to set to an aribtrary value, since it
is identical to just setting `inputs`.
2021-08-07 14:42:59 +03:00
Farid Zakaria fbf42c55ac nix-shell --pure: Let it work for any derivation
`nix-shell --pure` when applied to a non stdenv derivation doesn't seem
to clear the PATH. It expects the stdenv/setup file to do so.

This adds an explicit `unset PATH` by nix-build.cc (nix-shell) itself so
that it's not reliant on stdenv/setup anymore.

This does not break impure nix-shell since the PATH is persisted as the
variable `p` prior in the bash rcfile

fixes #5092
2021-08-06 15:30:49 -07:00
Madeline Haraj d56ddbb999 Fix disabled case in local store test 2021-08-06 12:36:03 -04:00
Eelco Dolstra e277c0c479
Merge pull request #5075 from andir/libutil-base64-init
libutil: initialize the base64 decode array only once
2021-08-06 17:41:11 +02:00
Taeer Bar-Yam a6bfda7d95 path antiquotations: rename confusing test 2021-08-06 07:38:52 -04:00
Taeer Bar-Yam 624162c729 add path antiqutations test 2021-08-06 07:06:52 -04:00
Taeer Bar-Yam 8f9429dcab add antiquotations to paths 2021-08-06 06:46:05 -04:00
Madeline Haraj cb1ffb7789 Use the store path as the context of the result of fetchTree, not the real path 2021-08-05 22:08:39 -04:00
Eelco Dolstra d64f9671fc
Merge pull request #5094 from Pamplemousse/simpler_doc
doc/manual: don't need to copy `highlight.js` manually
2021-08-05 15:13:07 +02:00
Pamplemousse de39cfb9f3 doc/manual: don't need to copy highlight.js manually
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-04 19:47:05 -07:00
Eelco Dolstra 47e96bb533
Merge pull request #5082 from manveru/fix-git-init-race
fix git init race condition
2021-08-02 16:13:53 +02:00
Michael Fellinger 5c99ec374c
fix git init race condition 2021-08-02 13:47:59 +02:00
Eelco Dolstra 94ec9e4703
Merge pull request #5077 from ldesgoui/nix-shell-args
nix-shell -p: pass `--arg`s as nixpkgs parameters
2021-08-01 21:57:14 +02:00
ldesgoui 6eeb6f9c84 nix-shell -p: pass --arg values as nixpkgs params 2021-07-31 17:25:10 +02:00
Andreas Rammhold b9c9c25766
libutil: initialize the base64 decode array only once
Previously, despite having a boolean that tracked initialization, the
decode characters have been "calculated" every single time a base64
string was being decoded.

With this change we only initialize the decode array once in a
thread-safe manner.
2021-07-30 21:07:32 +02:00
Pamplemousse d64cb33e90 Remove unused struct in libstore
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-30 10:34:28 -07:00
Eelco Dolstra 2b67cb7b8c
Merge pull request #5072 from NixOS/ca/queryRealisation-perl
Expose a perl method to query a derivation
2021-07-30 16:14:03 +02:00
regnat c15e121e32 Expose a perl method to query a derivation
Just doing a very stupid thing taking as argument a serialised drv
output and returning a serialised realisation.

This is needed for `nix-serve` to handle ca derivations
2021-07-30 11:55:14 +02:00
regnat d9ba3385a9 Don’t send the experimental-features to the daemon
The experimental features are, well, experimental, and shouldn’t be
carelessly and transparently enabled.
Besides, some (`ca-derivations` at least) need to be enabled at startup
in order to work properly.
So it’s better to just require that daemon be started with the right
`experimental-features` option.

Fix #5017
2021-07-30 10:34:50 +02:00
Viktor Kronvall 7cdaae6b9c Support SCP-like URLs in builtins.fetchGit attrs
This extends https://github.com/NixOS/nix/pull/4978 with
supporting the SCP-like urls in expressions like

```nix
builtins.fetchGit {
  url = "git@github.com:NixOS/nix.git";
  ref = "master";
}
```
2021-07-30 08:17:46 +09:00
Eelco Dolstra 48e35585a6
upload-release.pl: Fix deprecated 'nix' calls 2021-07-28 22:58:25 +02:00
Eelco Dolstra c5ade241f0 Merge remote-tracking branch 'origin/test-daemon-everywhere' 2021-07-28 21:57:50 +02:00
Eelco Dolstra 7816ef6c51
Merge pull request #5042 from alyssais/pthread
Enable pthreads for new libraries
2021-07-28 12:31:01 +02:00
Eelco Dolstra 64a07d3d18
Merge pull request #5057 from edolstra/nix-develop-chroot
nix develop: Support chroot stores
2021-07-28 12:30:38 +02:00
Pamplemousse 686ee74f09 Remove unecessary stuff in .gitignore
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-27 16:53:45 -07:00
regnat c2c0dba792 Remove the right socket before starting the daemon
For some reason, an old socket occasionally stays here on OSX, causing
the subsequent tests to fail
2021-07-27 17:06:11 +02:00
regnat addacfce4a Allow running all the tests with the daemon
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-27 17:06:11 +02:00
Eelco Dolstra 706777a4a8
Merge pull request #5055 from NixOS/fix-manpages-install
Fix the generation of nix3 manpages
2021-07-27 14:53:16 +02:00
regnat 441be5d59a Remove dead code in doc’s local.mk 2021-07-27 14:37:55 +02:00
Eelco Dolstra ed5ad59dc1 nix develop: Support chroot stores
Fixes #5024.
2021-07-27 14:24:03 +02:00