1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-24 11:19:35 +01:00
Commit graph

10842 commits

Author SHA1 Message Date
Eelco Dolstra
ef1193a273
Merge pull request #5606 from NixOS/backport-5585-to-2.4-maintenance
[Backport 2.4-maintenance] doc: De-emphasize nix-env without -A
2021-11-23 15:35:23 +01:00
Eelco Dolstra
47787a17b2
Merge pull request #5635 from NixOS/backport-5634-to-2.4-maintenance
[Backport 2.4-maintenance] Add missing Nix::Store import to fix nix-serve StoreDir.
2021-11-23 15:34:59 +01:00
Ben Radford
9008602f03 Add missing Nix::Store import to fix nix-serve StoreDir.
(cherry picked from commit 861404a87b)
2021-11-23 14:29:52 +00:00
Eelco Dolstra
16de2b464f
Merge pull request #5629 from matthewbauer/2.4-fix-oahd-path
Backport to 2.4: fix oahd path
2021-11-23 10:46:33 +01:00
Matthew Bauer
ceabe106c8 Set new rosetta 2 path in sandbox
see:

https://github.com/NixOS/nix/pull/5388

and

https://github.com/NixOS/nix/pull/5251
(cherry picked from commit 08b1ac3e38)
2021-11-22 14:44:32 -06:00
yvt
a9d122dcd8 Add another path where a Rosetta 2 configuration file is possibly located
(cherry picked from commit a9d9e55551)
2021-11-22 14:44:20 -06:00
Jan Tojnar
49f63b9d60 doc: De-emphasize nix-env without -A
The manual uses `nix-env -i` without `-A` prominently, teaching a bad practice to newcomers.

(cherry picked from commit ca4d8ce9e2)
2021-11-19 10:47:45 +00:00
Eelco Dolstra
8d12084707 Bump version 2021-11-05 13:22:23 +01:00
Eelco Dolstra
9fade47584
Merge pull request #5490 from doronbehar/SQLiteWAL-vfs-backport2.4
libstore: Use unix-dotfile vfs if useSQLiteWAL is false
2021-11-05 13:21:55 +01:00
Doron Behar
734f46fb46 libstore: Use unix-dotfile vfs if useSQLiteWAL is false
(cherry picked from commit 14fcf17277)
2021-11-05 13:20:34 +01:00
Doron Behar
c1b8271ed1 libstore: Use unix-dotfile vfs if useSQLiteWAL is false 2021-11-04 08:15:18 +02:00
Eelco Dolstra
dd5bdbd8d0
Merge pull request #5470 from andersk/2.4-echo-e
[2.4] installer: Do not use echo -e in #!/bin/sh script
2021-11-03 11:16:08 +01:00
Anders Kaseorg
4fc29974a4 installer: Do not use echo -e in #!/bin/sh script
ShellCheck correctly warns:

In scripts/install-nix-from-closure.sh line 218:
                echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn"
                     ^-- SC3037: In POSIX sh, echo flags are undefined.

In scripts/install-nix-from-closure.sh line 229:
                echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn"
                     ^-- SC3037: In POSIX sh, echo flags are undefined.

Indeed, this actually breaks on Ubuntu where /bin/sh is dash.

Fixes #5458.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
(cherry picked from commit 447350fe0e)
2021-11-02 17:25:31 -07:00
Domen Kožar
1f0edcedc0 install-nix-actionv@v14.1
(cherry picked from commit b8532c9ff1)
2021-11-02 17:25:31 -07:00
regnat
45a2ef5a6d Disable the eval-store test when using the daemon
Using the daemon will break most of the assumptions of this test, so
it’s as simple to just disable it

(cherry picked from commit 0b55c8767d)
2021-11-02 17:25:08 -07:00
Eelco Dolstra
93d0a99f8b
Fix 2.4 migration examples
(cherry picked from commit 6a93e186f4)
2021-11-02 11:54:03 +01:00
Eelco Dolstra
9d5c985aed Set 2.4 release date
(cherry picked from commit bc4b7521f4)
2021-11-01 20:22:46 +01:00
Alexey Novikov
b84c4c0770 Fix error detection in 'base64Decode()'
Fixed a bug in initialization of 'base64DecodeChars' variable.
Currently decoder do not fail on invalid Base64 strings.
Added test-case to verify the fix.

Also have made 'base64DecodeChars' to be computed at compile time.
And added a test case to encode/decode string with non-printable charactes.

(cherry picked from commit 64a3b045c1)
2021-11-01 15:26:42 +01:00
Eelco Dolstra
64484c4da3 Remove redundant 'warning:'
(cherry picked from commit 5a160171d0)
2021-11-01 15:25:37 +01:00
Eelco Dolstra
506339f5a9 Set version to 2.4 2021-11-01 15:23:33 +01:00
Eelco Dolstra
ff695dd150 nix repl: Don't write to std::cout directly
Writing to std::cout doesn't play nice with ProgressBar.

(cherry picked from commit f6cdae5181)
2021-10-27 17:40:28 +02:00
Eelco Dolstra
0cf2815007 nix repl: Don't build in a child process
Fixes #5356. This is a bit risky due to interrupts, but we have to
deal with those anyway (#5353).

(cherry picked from commit 9ebe02a81e)
2021-10-27 17:40:23 +02:00
Maximilian Bosch
8867e65128 nix repl: properly deal with interruptions
When I stop a download with Ctrl-C in a `nix repl` of a flake, the REPL
refuses to do any other downloads:

    nix-repl> builtins.getFlake "nix-serve"
    [0.0 MiB DL] downloading 'https://api.github.com/repos/edolstra/nix-serve/tarball/e9828a9e01a14297d15ca41 error: download of 'https://api.github.com/repos/edolstra/nix-serve/tarball/e9828a9e01a14297d15ca416e5a9415d4972b0f0' was interrupted
    [0.0 MiB DL]
    nix-repl> builtins.getFlake "nix-serve"
    error: interrupted by the user
    [0.0 MiB DL]

To fix this issue, two changes were necessary:

* Reset the global `_isInterrupted` variable: only because a single
  operation was aborted, it should still be possible to continue the
  session.
* Recreate a `fileTransfer`-instance if the current one was shut down by
  an abort.

(cherry picked from commit 0872659002)
2021-10-27 17:39:35 +02:00
kvtb
20624d9a3b fix build with gcc11
(cherry picked from commit eae29b0385)
2021-10-27 17:36:34 +02:00
regnat
577470728c Fix the isDaemonNewer check
- Don’t hardcode the “newer” version
- Remove an ill-placed `return`

(cherry picked from commit 3a2fc9ce1d)
2021-10-27 17:36:26 +02:00
regnat
cf266f34ac Fix the min bound for the structured-attrs test
The min bound written corresponds to the date of the commit that
introduced the change, but it only got merged on master some weeks
later. Since the version is essentially the commit date, that means that
there’s a whole range of commits on master (including the current
`nixUnstable`) that have a higher version but don’t contain the required
change.

(cherry picked from commit b598e5c47c)
2021-10-27 17:36:13 +02:00
Eelco Dolstra
3fdeae0f0a daemon: Accept 'repeat' setting from untrusted users
Fixes #5352.

(cherry picked from commit 6e684d1b87)
2021-10-27 17:34:42 +02:00
Eelco Dolstra
1131d73050 build-remote: Implicitly add the 'builtin' system type to all machines
This makes 'nix-env -i --max-jobs 0' work with remote builders.

(cherry picked from commit 1254e8753c)
2021-10-27 17:34:34 +02:00
Eelco Dolstra
a669798b0b If max-jobs == 0, do preferLocalBuild on remote builders
(cherry picked from commit f2280749b1)
2021-10-27 17:34:26 +02:00
Eelco Dolstra
7a02b3e247 2.4 release notes: Add some migration notes
(cherry picked from commit 9c6ac9eb0e)
2021-10-27 17:34:12 +02:00
Travis A. Everett
f31ba044e7
darwin-install: fix incorrect fn name
(cherry picked from commit 8a3b8d0b33)
2021-10-13 11:12:31 +02:00
Sergei Trofimovich
311ea23e2f
mk/libraries.mk: fix trace-ld and trace-ar expansions
Noticed this minor logging deficiency when debugged --disable-shared
build:

  LD
  AR
  LD
  CXX    src/libstore/local-store.o

After the change build is logged as expected:

  LD     src/libmain/libnixmain.a
  LD     src/libfetchers/libnixfetchers.a
  AR     src/libmain/libnixmain.a
  CXX    src/libstore/local-store.o

(cherry picked from commit f147f42f46)
2021-10-11 12:59:00 +02:00
regnat
ccdd12bbfa
(partially) Revert "Don't copy in rethrow"
This reverts some parts of commit
8430a8f086 which was trying to rethrow
some exceptions while we weren’t in the context of a `catch` block,
causing some weird “terminate called without an active exception”
errors.

Fix #5368

(cherry picked from commit 7466048d39)
2021-10-11 12:54:35 +02:00
Sergei Trofimovich
70331bb91d libstore-tests: add libutil dependency (fix static link failure)
In https://github.com/NixOS/nix/pull/5350 we noticed link failures
pkgsStatic.nixUnstable. Adding explicit dependency on libutil fixes
libstore-tests linking.

(cherry picked from commit d7d6fe44d6)
2021-10-08 09:39:01 +02:00
Tom Bereknyei
663f0a1a21 Revert "mk: prefert inplace library paths to system ones"
This reverts commit 4993174be5.

buildStatic.x86_64-linux and buildStatic.aarch64-linux were broken, see https://hydra.nixos.org/build/151755012

(cherry picked from commit b976b34a5b)
2021-10-07 19:52:59 +02:00
Eelco Dolstra
b58c51f8d6 Set version 2021-10-07 17:46:00 +02:00
Eelco Dolstra
5a0c8c6712
Merge pull request #5348 from edolstra/chroot-addpath
Support chroot stores in builtins.{path,filterSource}
2021-10-07 14:53:47 +02:00
Eelco Dolstra
d39692e6b3 Make builtins.{path,filterSource} work with chroot stores 2021-10-07 14:22:39 +02:00
Eelco Dolstra
7b5fc4a984
Merge pull request #5347 from edolstra/allow-context
Make addPath() work on paths with a context
2021-10-07 14:21:42 +02:00
Eelco Dolstra
c4dcf3cf25 Add a trace to all errors in addPath() 2021-10-07 13:47:15 +02:00
Eelco Dolstra
4806f2f6b0 Allow builtins.{path,filterSource} on paths with a context
We now build the context (so this has the side-effect of making
builtins.{path,filterSource} work on derivations outputs, if IFD is
enabled) and then check that the path has no references (which is what
we really care about).
2021-10-07 13:43:17 +02:00
Eelco Dolstra
66c4b20d8b Typo 2021-10-07 13:34:04 +02:00
Eelco Dolstra
7c50568788 Remove unnecessary call to queryMissing()
Worker::run() already does this.
2021-10-07 13:15:01 +02:00
Eelco Dolstra
302c3a052a
Merge pull request #5346 from edolstra/allow-path
Allow access to path copied to the store
2021-10-07 12:53:21 +02:00
Eelco Dolstra
972405edf5 Allow access to path copied to the store
Fixes https://github.com/NixOS/nix/pull/5163#issuecomment-931733912.
2021-10-07 12:15:22 +02:00
Eelco Dolstra
cfaad7168e Refactoring: Add allowPath() method 2021-10-07 12:11:00 +02:00
Eelco Dolstra
c9ee634f75
Merge pull request #5341 from andir/libexpr-formals
libexpr: remove matchAttrs boolean from ExprLambda
2021-10-07 11:58:56 +02:00
Eelco Dolstra
53e4794289
Merge pull request #5286 from ilkecan/add-a-warning-to-filterSource
Warn about the usage of filterSource with Nix store paths
2021-10-06 21:02:39 +02:00
Eelco Dolstra
dcb3bc614c Add a test for builtins.path in a flake 2021-10-06 20:53:29 +02:00
Eelco Dolstra
faeab0d5d5 Make Mercurial optional for the flakes tests 2021-10-06 18:29:20 +02:00