Commit graph

9297 commits

Author SHA1 Message Date
eldritch horrors 82075c8ebd Merge pull request #10054 from syvb/channel-unpack-count
Say how many channels were unpacked in nix-channel

(cherry picked from commit 9ae665b9e1dc64c507ab6002fc5d7824208f3777)
Change-Id: Ie0950cf32123b550c5b83981a020e513f72a9b7c
2024-03-04 09:25:17 +01:00
eldritch horrors 523250d18b Merge pull request #10055 from GrahamDennis/gdennis/faster-flake-lock-parsing
Faster flake.lock parsing

(cherry picked from commit ff4fa4dbd307fb155155421a7ec0625383dcedeb)
Change-Id: I34325834770db66fa56f0d8d02d3d2322dea3c65
2024-03-04 09:25:17 +01:00
eldritch horrors 96a3683308 Ban building Nix with NDEBUG
When reviewing old PRs, I found that #9997 adds some code to ensure one
particular assert is always present. But, removing asserts isn't
something we do in our own release builds either in the flake here or in
nixpkgs, and is plainly a bad idea that increases support burden,
especially if other distros make bad choices of build flags in their Nix
packaging.

For context, the assert macro in the C standard is defined to do nothing
if NDEBUG is set.

There is no way in our build system to set -DNDEBUG without manually
adding it to CFLAGS, so this is simply a configuration we do not use.
Let's ban it at compile time.

I put this preprocessor directive in src/libutil.cc because it is not
obvious where else to put it, and it seems like the most logical file
since you are not getting a usable nix without it.

Upstream-PR: https://github.com/NixOS/nix/pull/10126
Original-Change-Id: I513cceaac1371decb3d96231e6ef9181c910c218
Change-Id: I531a51f6348a746e8e41d88203b08f614898356c
2024-03-04 09:24:58 +01:00
eldritch horrors c6064390e8 Merge pull request #9992 from edolstra/fix-warning
Fix "may be used uninitialized" warning

(cherry picked from commit c4ebb82da4eade975e874da600dc50e9dec610cb)
Change-Id: I0ce99bf102ad12902f7055c29a56e665b8320ca8
2024-03-04 08:59:58 +01:00
eldritch horrors bbf69a4898 Merge pull request #9974 from edolstra/less-chatty-post-build-hook
runPostBuildHook(): Be less chatty

(cherry picked from commit 28a988bdde7b20abff9000162015500c44a5812b)
Change-Id: Ibb49b71bf631d04d08970d719f091221b15c5036
2024-03-04 08:59:18 +01:00
eldritch horrors 647d762ab5 Merge pull request #9933 from pennae/debugger-fix
fix debugger crashing while printing envs

(cherry picked from commit 9b8b4860913afdb7f9cb1e1e81f9a9dd192cd1c1)
Change-Id: Ica6a17e4b3e3b8b8093719f442c28be7f13be09d
2024-03-04 08:57:44 +01:00
eldritch horrors 542a19104e Merge pull request #9918 from 9999years/debugger-locals-for-let-expressions
Expose locals from `let` expressions to the debugger

(cherry picked from commit acef4f17a2daab4ccdf656bdf229792db2f779e4)
Change-Id: Ib3623254f67ac762f4e7230d625e9f87dff38a84
2024-03-04 08:54:52 +01:00
eldritch horrors cd654451c9 Merge pull request #9924 from 9999years/rename-yellowtxt
Rename `yellowtxt` -> `magentatxt`

(cherry picked from commit fb78a99e04206e7b1df84a362bb87d3300b41855)
Change-Id: I9ade553d9f499e6713aeff3463c9a653a880a051
2024-03-04 08:53:10 +01:00
eldritch horrors 43cedec6c5 Merge pull request #9919 from 9999years/reduce-debugger-clutter
Reduce visual clutter in the debugger

(cherry picked from commit f388a6148dae0fc999f1a67d0b96d76788f9b97f)
Change-Id: I21bfe3e9f75816484b0f46dbe09e0ff40b22c6d9
2024-03-04 08:52:57 +01:00
eldritch horrors 9ef32cf3b8 Merge pull request #9930 from rvl/print-dev-env-unbound-variables
print-dev-env: Avoid using unbound shellHook variable
(cherry picked from commit 25385a408ef7281d966c8732608833e224b32586)
Change-Id: Id1aca13942adfa628f7bdcfc0b6fc03bb3bab9ea
2024-03-04 08:51:49 +01:00
eldritch horrors 625df32afc Merge pull request #9913 from 9999years/debugger-positions
Print positions in `--debugger`, instead of pointers

(cherry picked from commit 49cf090cb2f51d6935756a6cf94d568cab063f81)
Change-Id: Ic27917b2aab3657c28d599898377bf0c14753f8a
2024-03-04 08:51:02 +01:00
eldritch horrors 78422bdbab Merge pull request #9848 from obsidiansystems/default-system-features-static
Make `StoreConfig::getDefaultSystemFeatures` a static method

(cherry picked from commit 5a9513cdbae31ea5e6f6e7afa7b3c2e3a9a26474)
Change-Id: Ia9c0ae2b7de419bd60aea8bf905154b96c428276
2024-03-04 08:47:55 +01:00
eldritch horrors 2bb0a06346 Merge pull request #9841 from obsidiansystems/float-speed-factor
Convert `Machine::speedFactor` from a non-neg int to a non-neg float

(cherry picked from commit 69d0ae27e376e7c7c4f237716b0149223b8a805a)
Change-Id: I2afb5cf9e4fe1384985c58353946135c3d102b42
2024-03-04 08:40:38 +01:00
eldritch horrors 044c117a9f Merge pull request #9481 from iFreilicht/disallow-nix-search-without-search-terms
nix search: Disallow empty regex

(cherry picked from commit 1c260fa6d1f47d83954792771d0614db163cc3bc)
Change-Id: Iaaf3605c24a342fcb05d0b534a9f305533d3b5fa
2024-03-04 08:40:12 +01:00
eldritch horrors 20d7b93b0c Merge pull request #9838 from obsidiansystems/systemTypes-set
Make `Machine::systemTypes` a set not vector

(cherry picked from commit f1b030415376e81c5804647c055d71eaba4aa725)
Change-Id: I6d4f5c0bfc226e9bd66c58c360cd99e3fac9a129
2024-03-04 08:39:24 +01:00
eldritch horrors fad1a25e17 Merge pull request #9805 from yshui/prefetch-unpack
Add --unpack to nix store prefetch-file

(cherry picked from commit f51409cf98e9b18f27a6d0240a0aa0c3f37c2fd0)
Change-Id: I974b04f3efc8b210a9399a71d3704490cfc2c80c
2024-03-04 08:24:18 +01:00
eldritch horrors 298db5d1cd Merge pull request #9804 from edolstra/missing-nar-crash
Fix crash when NAR is missing from binary cache

(cherry picked from commit 3b20cca9625a1701a10a883735e7315185629563)
Change-Id: I50ff18f4a6de69c323473b4a8e3e098d1f365145
2024-03-04 08:16:28 +01:00
eldritch horrors 68f148ed45 Merge pull request #9798 from edolstra/remote-store-eof
Print a more helpful message if the daemon crashes

(cherry picked from commit 32706b14a7531c2c21b9f96da083a540a0031ec4)
Change-Id: Ief7c465bca7666e2b7e7c9d1dd0c01c5f9014146
2024-03-04 08:12:15 +01:00
eldritch horrors 5dd872363a Merge pull request #9797 from edolstra/fix-error-message
Store: :buildPaths(): Fix display of store paths
(cherry picked from commit b5ed36e6633cac844fe4388dcc0cc8055a18ef9e)
Change-Id: Ic6008491088dc6febd4a1e44dc2dbb96c47661f4
2024-03-04 08:11:46 +01:00
eldritch horrors 2c85fcce87 Merge pull request #9747 from awakesecurity/mz/fix-quadratic-splitString
Fix performance of builtins.substring for empty substrings

(cherry picked from commit b2deff1947c2fe57fdbf1a472eb9003eb407f8d3)
Change-Id: I4ddfc8d26a4781c9520fff9807849a073ee7bed8
2024-03-04 08:06:36 +01:00
eldritch horrors 64b077cdaa Merge pull request #9763 from L-as/avoid-unnecessary-copy
Avoid unnecessary copy of goal log

(cherry picked from commit 268c49264ae2657c602f84f9bff3eb31306253ea)
Change-Id: I5d9de9e43a7ddcb09d25bbc7367c9d83f58c7a75
2024-03-04 08:01:03 +01:00
eldritch horrors e310bbf913 Merge pull request #8043 from bobvanderlinden/pr-shell-env
nix: develop: use SHELL from rc script
(cherry picked from commit 0d55d660d5ea081630aa9606b047eb755cff1528)
Change-Id: I83be6c63b282d7f01a0defa78d9e787c77f1f02d
2024-03-04 07:59:32 +01:00
eldritch horrors 180984178d Merge pull request #9648 from cole-h/nix-shell-ordering
nix shell: reflect command line order in PATH order

(cherry picked from commit b91c935c2faf08ced2c763dcd2a831f26d84fa86)
Change-Id: If16c120bb74857c2817366e74e5b0877eb997260
2024-03-04 07:50:55 +01:00
eldritch horrors 5f2eaa1b35 Merge pull request #9662 from shlevy/flat-fixed-references-assert
Improve error message for fixed-outputs with references.

(cherry picked from commit ff6de4a9ee6c3862db9ee5f09ff9c3f43ae7a088)
Change-Id: I733c49760b9a3f1b76a6bece3b250b8579cd6cac
2024-03-04 07:50:02 +01:00
eldritch horrors aac8416eac Merge pull request #9670 from DavHau/log-lines
saner default for log-lines: change to 25

(cherry picked from commit dedbbbb451bb8f2bd0925e59a8b3d127157015f8)
Change-Id: I8847df4aeb6e5c2d2be0e04f2a0a1aa595cb3b2f
2024-03-04 07:48:57 +01:00
eldritch horrors 8f5d0d4c05 Merge pull request #9687 from edolstra/withFramedSink-ctrl-c-hang
withFramedSink(): Receive interrupts on the stderr thread

(cherry picked from commit 965cfe96886c988c3aa94bfc7fefdd37325f4536)
Change-Id: I8320a96957c01ec0e3450d1b3ae38a3baff78d49
2024-03-04 07:40:17 +01:00
eldritch horrors 137673de56 Merge pull request #9681 from edolstra/eval-optimisations
Optimize empty list constants

(cherry picked from commit 315aade89d00c692715e5953c36a1b7d6528b703)
Change-Id: I0f28ef8a27ccedc45acf44243eec9dc35b733300
2024-03-04 07:39:12 +01:00
eldritch horrors 6b279cd10e Merge pull request #9658 from pennae/env-diet
reduce the size of Env by one pointer

(cherry picked from commit 83f5622545a2fc31eb7e7d5105f64ed6dd3058b3)
Change-Id: I5636290526d0165cfc61aee1e7a5b94db4a26cef
2024-03-04 07:37:45 +01:00
eldritch horrors cd326a2aa4 Merge pull request #9673 from pennae/drv-parse-opts
optimize derivation parsing

(cherry picked from commit 3511430902941f0f26dc71313a54bb5096f57305)
Change-Id: I00f76dcd464a5811944613731501af504b6e8c29
2024-03-04 07:36:51 +01:00
eldritch horrors 96f1a404d0 Merge pull request #9617 from 9999years/stack-overflow-segfault
Fix segfault on infinite recursion in some cases

(cherry picked from commit bf1b294bd81ca76c5ec9fe3ecd52196bf52a8300)
Change-Id: Id137541426ec8536567835953fccf986a3aebf16
2024-03-04 07:35:20 +01:00
eldritch horrors e1b1e6f7ab Merge pull request #9666 from unblevable/dervation-typo
Fix "dervation" typo

(cherry picked from commit a21c762dab365049b77af95355ee4236d173e216)
Change-Id: Ib6c0521758eb23115cfa243b9f3a34bb6e249e5f
2024-03-04 07:33:32 +01:00
eldritch horrors dd180911d8 Merge pull request #9582 from pennae/misc-opts
a packet of small optimizations

(cherry picked from commit ee439734e924eb337a869ff2e48aff8b989198bc)
Change-Id: I125d870710750a32a0dece48f39a3e9132b0d023
2024-03-04 07:32:31 +01:00
eldritch horrors 076844e386 Merge pull request #9621 from blaggacao/fix/too-restrictive-branch-regex-master
fix: valid branch name
(cherry picked from commit d2016c6b59f4a5223a18c92c817d61c448ce39ab)
Change-Id: Ic346739b91bf1b10515c9ff3b3e180a64afe6343
2024-03-04 07:27:52 +01:00
eldritch horrors 67de43b1d7 Merge pull request #9645 from tweag/undeprecate-isNull
Undeprecate isNull

(cherry picked from commit 8e64cd59b0fe1a4e1d3ba8d359ea0f9af2936f94)
Change-Id: If36b85a3fc01ee700bcaf4d5d83a5884a4b5de92
2024-03-04 07:27:37 +01:00
eldritch horrors 6622abb463 Merge pull request #9641 from amarshall/darwin-sandbox-stderr
Allow access to /dev/stderr in Darwin sandbox

(cherry picked from commit c6d7013583c568590aff285fb7414d1675a745f4)
Change-Id: I5657f6f4ee9dad8c978bad0d71f5cac51584e4f2
2024-03-04 07:26:03 +01:00
eldritch horrors 2ddf453e0d Merge pull request #9619 from 9999years/remove-blank-lines-in-errors
Remove some blank lines from stack traces

(cherry picked from commit cea83544362bd6426e9bc0b7dd0d611c19b0e3fd)
Change-Id: Ic1af8b09e9994d3c69fd3b37ae47a4bb786a15a1
2024-03-04 07:23:44 +01:00
eldritch horrors 7614aa9797 Merge pull request #4093 from matthewbauer/eval-system
Add eval-system option

(cherry picked from commit 071dbbee33af9f27338c3e53e4ea067dbfa14010)
Change-Id: Ia81358c8cfb60241da07a4d0e84b9ee62a18a53f
2024-03-04 07:21:01 +01:00
eldritch horrors 64a269ef73 Merge pull request #9600 from SharzyL/fix_nix_copy
fix: nix copy ssh-ng:// not respecting --substitute-on-destination
(cherry picked from commit b1c633c6bb2e2dbc8a2891edf0d0c6f9d31d890b)
Change-Id: I77356d14a9011d6dc4cf64776995f7590d918874
2024-03-04 07:16:31 +01:00
eldritch horrors 13f78c557b Merge pull request #9589 from obsidiansystems/floating-content-addressing-derivations-eval-store
Fix building CA derivations with and eval store

(cherry picked from commit dfc0cee7024a082d90a4f68296f55a82dfd52126)
Change-Id: I28feb5a36d4fe75f0ed3e3e2db6eb56b67d0f371
2024-03-04 07:15:08 +01:00
eldritch horrors bc34274aae Merge pull request #9588 from obsidiansystems/queryDerivationOutputMap-evalStore
Give `Store::queryDerivationOutputMap` and `evalStore` argument

(cherry picked from commit 8cddda4f892cb42be43e9bd87aa0111572617e78)
Change-Id: I394e7e11c3f2e0cd3dbe0f48d757c14c09835e44
2024-03-04 07:13:33 +01:00
eldritch horrors fa03f23923 Merge pull request #9587 from amjoseph-nixpkgs/pr/wopBuildDerivation/explain
libstore/daemon.cc: note trust model difference in readDerivation()s

(cherry picked from commit 5c917c32048ef185ea0eec352c3505485aa3212c)
Change-Id: I9945bc84e9529b005eafdc5c08b5bf1553335340
2024-03-04 07:13:00 +01:00
eldritch horrors 2ba9788003 Merge pull request #9555 from 9999years/positions-in-errors
Pass positions when evaluating

(cherry picked from commit c8458bd731eb1c74159bebe459ea00165e056b65)
Change-Id: I1b4a5d58973be6264ffdb23b4492da200fdb71be
2024-03-04 07:11:25 +01:00
eldritch horrors d42cd24afe Merge pull request #9563 from obsidiansystems/tryResolve-evalStore
Give `Derivation::tryResolve` an `evalStore` argument

(cherry picked from commit 36ca6adc60511dc822870f2df43c0a578e481925)
Change-Id: If76b185a01ffa982e4c49cf333a9b5fbf9edebfe
2024-03-04 07:11:25 +01:00
eldritch horrors dd2926f7ea Merge pull request #9557 from bryanhonof/bryanhonof.fix-apple-double-shenanigans
Add option to libarchive so it behaves correctly

(cherry picked from commit c3827ff6348a4d5199eaddf8dbc2ca2e2ef46ec5)
Change-Id: Ib0f928851093f4c644bac071d1c8f8aeec803198
2024-03-04 07:11:25 +01:00
eldritch horrors 94bf5a8018 Merge pull request #9494 from sellout/nix-run-execv
Don’t use `execvp` when we know the path

(cherry picked from commit dfa219d03b2277e61dde1c1ddddddff7411ef112)
Change-Id: I2226340cebbe935e1f2fe10207daba69683c8cb3
2024-03-04 07:11:25 +01:00
eldritch horrors 4018fcb9b8 Merge pull request #9233 from bouk/bouk/apply-config-inner
config: add included files into parsedContents before applying
(cherry picked from commit 82359eba6b692691ef08a71196ef25a61bc4d3d3)
Change-Id: Idde3177010fec7b8bafe6088c3c23d5caf491845
2024-03-04 07:11:25 +01:00
eldritch horrors a2d5e803cf Merge pull request #9476 from alois31/restore-progress-bar
nix repl: Only hide the progress bar while waiting for user input

(cherry picked from commit 3bebaefcd0c5d650f7edcd39f397bb45c4382f41)
Change-Id: Ie7c0db46f7c2cf5f938e66bdd3c31f0b62bdb104
2024-03-04 07:11:25 +01:00
eldritch horrors 001be52794 Merge pull request #9430 from hercules-ci/remove-vlas
Fix stack overflow in `filter`

(cherry picked from commit cb7f25869daa2491eeac5fee49ad8f31b2218c15)
Change-Id: Ib90f97a9805bbb4d0e2741551d490f054fc0a675
2024-03-04 07:11:25 +01:00
eldritch horrors a089d8f5f6 Merge pull request #9465 from obsidiansystems/build-dir
Use `buildprefix` in a few more places

(cherry picked from commit b6a3fde6b7a416929553e6be36fc991680ddf9ef)
Change-Id: I2790663fa9f8242ac2db6582b7e421d2fdf42942
2024-03-04 07:11:25 +01:00
eldritch horrors c208e918e5 fix: nlohmann::adl_serializer for std::optional (#9147)
This allows templates such as `NLOHMANN_DEFINE_TYPE_*` templates and other generators with things like `std::vector<std::optional<T>>`.

Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
(cherry picked from commit 02bd821f2e71372d31bbe6700bd68086cc2ee70a)
Change-Id: I8b0ebcf2af4226610dadd565962f2d2327415a03
2024-03-04 07:11:25 +01:00
eldritch horrors b7c61d337b Merge pull request #9462 from trofi/eval.o-dependency
libexpr: add missing dependency on 'flake/call-flake.nix.gen.hh'
(cherry picked from commit f0180487a0e4c0091b46cb1469c44144f5400240)
Change-Id: I27211872ad75034ae3f04e18b2987f9968073d00
2024-03-04 07:11:25 +01:00
eldritch horrors cad1683048 Merge pull request #9398 from Qyriad/fixes/flake-not-found
flakes: bare minimum fix the error message for untracked flake.nix
(cherry picked from commit 7f626dba332f320fafb9f9c749986ea523d20f42)
Change-Id: I470ac56a670a8c11e4164c6b059184a02344d491
2024-03-04 06:03:33 +01:00
eldritch horrors cba87025f8 Merge pull request #9445 from NixOS/allow-input-in-git-commit
Allow user input in `git commit`

(cherry picked from commit 43fb39ca29a0b054a4c18623520c496d27c57192)
Change-Id: I13bd4c007234ee2133289c68ef8ab2eae4def78a
2024-03-04 06:01:09 +01:00
eldritch horrors 340a6cf977 Merge pull request #9257 from Artturin/nixenvjsondrvpath
`nix-env --query`: fix `--json` ignoring `--drv-path`

(cherry picked from commit 516e7ddc41f39ff939b5d5b5dc71e590f24890d4)
Change-Id: I84b5bccea9d0383e2e74544743b703942e7be547
2024-03-04 05:59:15 +01:00
eldritch horrors 01069d8c46 Merge pull request #9400 from hercules-ci/refactors-from-5e3986f59cb
Refactors from 5e3986f59c

(cherry picked from commit e540d48c4fb460e5e577d8b8b33e8eca9959c49b)
Change-Id: I5b21b770a0c20ec2ec9845d3a97a524f1b0135ee
2024-03-04 05:58:02 +01:00
eldritch horrors 439f88b7d7 Merge pull request #9399 from edolstra/revert-vlas
Revert use of boost::container::small_vector in the evaluator

(cherry picked from commit 6832d18ac734f4b855f97c07b158491dd01cefcd)
Change-Id: I7f10af0c8b8a8beb4b1e36424120995f4ed82738
2024-03-04 05:57:04 +01:00
eldritch horrors 3f3badffc9 Merge pull request #9395 from nbraud/buitlins
builtins.concatMap: Fix typo in error message

(cherry picked from commit 4292d997568eb30503e287f98e24821ff0bc2816)
Change-Id: Ia33d1b02e41f699ef0c8c2d6487c9f70b2cc8cf4
2024-03-04 05:56:04 +01:00
eldritch horrors 2df9c2c00f Merge pull request #9374 from hercules-ci/fix-nogc
Fix buildNoGc

(cherry picked from commit 7762335a9c4d56f7501825345728c3f94e88bc31)
Change-Id: I3ad53c9c1dd9180a2abc3528e9437c28ac95b303
2024-03-04 05:54:10 +01:00
eldritch horrors 5d77afe0a4 Merge pull request #6469 from gbpdt/fix/skipped_build_locking
Unlock output paths when a derivation is already built

(cherry picked from commit 7ba4e073e8622ca86b52e03d68476e80250ab62f)
Change-Id: I9de077679290d5141a610ac43d99d3a43acff87c
2024-03-04 05:53:17 +01:00
eldritch horrors 5e182235cb Merge pull request #7348 from thufschmitt/dont-use-vlas
Remove the usage of VLAs in the code

(cherry picked from commit ac4431e9d016e62fb5dc9ae36833bd0c6cdadeec)
Change-Id: Ifbf5fbfc2e27122362a2aaea4b62c7cf3ca46b1a
2024-03-04 05:51:23 +01:00
eldritch horrors 30f3298e9d Merge pull request #9364 from edolstra/fix-coverage
Fix a broken generated header file dependency

(cherry picked from commit 57de482e00221d781f916d49c315a8fa0816e956)
Change-Id: I0580274bf51132fbeb34e8c0a91a7017071d2bb3
2024-03-04 05:48:04 +01:00
eldritch horrors 1b135e6e7b Fix boost::bad_format_string exception in builtins.addErrorContext (#9291)
* Fix boost::bad_format_string exception in builtins.addErrorContext

The message passed to addTrace was incorrectly being used as a format
string and this this would cause an exception when the string contained
a '%', which can be hit in places where arbitrary file paths are
interpolated.

* add test

(cherry picked from commit 61d6fe059e959455e156c1d57bb91155d363e983)
Change-Id: Idd671127a9c1ccc8b94e58e727632fcc064f3cbe
2024-03-04 05:39:12 +01:00
eldritch horrors 6cb215f63b Merge pull request #9293 from ThinkChaos/ssh-misc-improvments
SSH small improvments

(cherry picked from commit dcc49744ed0c3b91f905b0f3304d3ca700f9f717)
Change-Id: Ie87910df3ab739d0ff983c085190da1d108e96e2
2024-03-04 05:38:09 +01:00
eldritch horrors b7e7949035 Merge pull request #9299 from tfc/config-improvements
Improvements in src/libutil/config.*

(cherry picked from commit dea63bb81078d7290410544285c6df1a8e002952)
Change-Id: I8090eb2ad393dd9964cf2d5254ec8c796b1bd367
2024-03-04 05:36:42 +01:00
eldritch horrors 6e0dd9f673 Merge pull request #9289 from edolstra/fix-warnings
Fix gcc warnings

(cherry picked from commit 66cb364f581486e0c426b35149ac13d19f7842bc)
Change-Id: I1474dbc18a4beaaf1bce16d4abbcc99806b79ff1
2024-03-04 05:27:35 +01:00
eldritch horrors 26e17eedef Merge pull request #9277 from keszybz/file-permissions
Remove stray executable permissions on source files

(cherry picked from commit a80fb9fa398cf39472be800b42020d2ff4a0df42)
Change-Id: I603b18ddda76041991101ef0597ec804c2b55dc0
2024-03-04 05:26:17 +01:00
eldritch horrors 6211e5e284 Merge pull request #9271 from keszybz/if-fix
fix: gcc complains about if which doesn't guard the indented statement
(cherry picked from commit 8d663462938a333a4e81cce1005437f141cd11fa)
Change-Id: Ifa2e65502de4000935549dde82ab1b5867e2f0ed
2024-03-04 05:26:02 +01:00
eldritch horrors 559a8c44c3 Merge pull request #6258 from obsidiansystems/gcc-bug-ergonomics
Remove bug-avoiding `StoreConfig *` casts for settings

(cherry picked from commit e3febfcd532adb23ca05ac465a2b907d6f1a3529)
Change-Id: Ifeae276582fdbc781a38581df9de3da67a7e7bf9
2024-03-04 05:24:33 +01:00
eldritch horrors 4206441a12 Merge pull request #9246 from trofi/clarify-builder-uid-exhaustion
local-derivation-goal.cc: slightly clarify waiting message

(cherry picked from commit 232e23667226a3cfff9de1828f819844c27e7539)
Change-Id: Idd271d6921caba203db9971f27e156e533664935
2024-03-04 05:19:38 +01:00
eldritch horrors 89e03988ec Merge pull request #9238 from tfc/small-improvements2
Small improvements 2

(cherry picked from commit 1dc6a65d361456d0e082065eb189d9b67d93aacd)
Change-Id: I8ed573c496068c4a92f53c1caafa49da59d75967
2024-03-04 05:18:05 +01:00
eldritch horrors 622b0e9428 Merge pull request #8965 from Artturin/bindfilesinchroot
Bindmount files instead of hardlinking or copying to chroot

(cherry picked from commit 622191c2b53882a1675fed5066ff8090b4f01827)
Change-Id: I278ec1baacdfa9044992b58fdec8f14d6d7d09ce
2024-03-04 05:17:31 +01:00
eldritch horrors 8abb20390e Merge pull request #9229 from tfc/small-improvements
Remove warnings, small improvements

(cherry picked from commit 5ac87a75dd65c19c50976559a6f7810c315cd9d5)
Change-Id: I88349b6e954398dde83c845f42d41a9dd89ba9e0
2024-03-04 05:16:42 +01:00
eldritch horrors ea10088703 Merge pull request #9216 from obsidiansystems/addDrvOutputDependencies-pre
Add `builtins.addDrvOutputDependencies`

(cherry picked from commit a58d7f143ec995a45745c2176bfebcc3e011db58)
Change-Id: Ia5a1790bf29dfaf29287cc35cdae6b6d650e7a83
2024-03-04 05:06:56 +01:00
eldritch horrors 032eff7f69 Merge pull request #8470 from ncfavier/shebang-single-quotes
nix-shell: support single quotes in shebangs, fix whitespace parsing
(cherry picked from commit 3b99c6291377cbd22607896af9dfafa857d2f2dc)
Change-Id: I2a431b21c3467eefa1ef95d5a36d672f45b6937a
2024-03-04 05:06:32 +01:00
eldritch horrors 7f590ea709 Merge pull request #6223 from obsidiansystems/worker-proto-with-version
Give `nix daemon` and `nix-store --serve` protocols separate serializers with version info

(cherry picked from commit 8b68bbb77745fda0d14939b6c23d31cc89da41ce)
Change-Id: Ia3d3b9fbaf9f0ae62ab225020b7d14790e793655
2024-03-04 04:59:31 +01:00
eldritch horrors 4d9dde15ef Merge pull request #9191 from tfc/libutil-implementation
libutil: Small improvements
(cherry picked from commit edc07588ecd5053da57c2ab6c2543abf49730ce3)
Change-Id: I01a481d872d859b372a4bade9bebd3dab2fb4efb
2024-03-04 04:47:18 +01:00
Robert Hensing ab40b2c5d0 Merge pull request #9157 from obsidiansystems/protocol-versions
Add protocol versions to `{Worker,Serve}Proto::*Conn`

(cherry picked from commit 4d17c59d8d059a5b39f1d1da2b58f2ec8da44861)
Change-Id: I497af39deb792e50c157a1305d8c9e722798740b
2024-03-04 04:43:35 +01:00
eldritch horrors c0fa61340c Merge pull request #9172 from tfc/bad-moves
Fix/remove some bad std::moves

(cherry picked from commit 8c049a9f044569ebda70231709f6f15d3073894a)
Change-Id: I720273378d2506a13883acee28abd096d099b0d4
2024-03-04 04:41:52 +01:00
eldritch horrors 75fb953205 Merge pull request #9170 from tfc/fix-broken-move
Fix broken move

(cherry picked from commit aa4f41d796630004e90790bffe2239420f77f696)
Change-Id: I39d3f9f4f27328500de005c9205d905c55d6f9ea
2024-03-04 04:40:51 +01:00
eldritch horrors d28a6618a8 Merge pull request #9167 from obsidiansystems/pre-overhaul-completions
Improve tests and docs prior to refactoring completions

(cherry picked from commit 5442d9b47298389918d1f38d20f768a80ffc2369)
Change-Id: Ief99ac2cd9c92981a9a522d15b9c3daf99182c9d
2024-03-04 04:38:33 +01:00
eldritch horrors e12e9f2452 Merge pull request #9137 from obsidiansystems/serve-protocol
Introduce separate Serve protocol serialisers

(cherry picked from commit d070d8b7460f412a657745698dba291c66792402)
Change-Id: Ibcc8639e8997bcd07f7a5318330a147bcadc411b
2024-03-04 04:37:05 +01:00
eldritch horrors aeb803de9a Merge pull request #8047 from lovesegfault/always-allow-substitutes
feat: add always-allow-substitutes

(cherry picked from commit da2b59a08878b3c6c7074595e3b6d26b6928b4c1)
Change-Id: I50481cd8fe643c673c610fec28bad84519a4d650
2024-03-04 04:37:03 +01:00
eldritch horrors 6897e238bd Merge pull request #9099 from obsidiansystems/common-proto
Factor out bits of the worker protocol to use elsewhere

(cherry picked from commit 4b1a97338f517f45e6169d3d8845c5caa5724e97)
Change-Id: If93afa0f8b1cf9b0e705b34fa71e6fd708752758
2024-03-04 04:36:58 +01:00
eldritch horrors 6feba52008 Merge pull request #8895 from hercules-ci/gc-before-stats
eval: Run a full GC before printing stats

(cherry picked from commit aeea49609be014b1928c95b7ec28dbedeb4f032a)
Change-Id: I47a23d3a7a47ea61d9a2b5727b638f879f3aaf1e
2024-03-04 04:36:47 +01:00
eldritch horrors 4517de00cb Merge pull request #8905 from hercules-ci/no-unknown-location
Don't print unknown locations unless requested for dev purposes

(cherry picked from commit 3dd4475826dff8052fef42d4600b61e6b91950ac)
Change-Id: I04a91277d1d9d09f5c1bf4a28fc99f0702b161e5
2024-03-04 04:36:38 +01:00
eldritch horrors ea0008deea Merge pull request #9094 from obsidiansystems/test-proto
Test the rest of the worker protocol serializers

(cherry picked from commit 2f1c16dfa2378fd8616bff1b9b7cd0b4d42af69b)
Change-Id: Idfd72d32b21d14a260e02f65531d287cef7464d2
2024-03-04 04:36:23 +01:00
eldritch horrors 8867479b27 Merge pull request #9056 from aakropotkin/patch-1
Respect `NOCOLOR`

(cherry picked from commit 4b78a66bc5066fab46b4c84a5b85c3839e9d8aab)
Change-Id: I005a13dea6cb33133f7bc59926cbaf5cf51c561a
2024-03-04 04:36:19 +01:00
eldritch horrors f17e7b1855 Merge pull request #8923 from obsidiansystems/test-proto
Unit test some worker protocol serializers

(cherry picked from commit c6faef61a6f31c71146aee5d88168e861df9a22a)
Change-Id: I99e36f5f17eb7642211a4e42a16b143424f164b4
2024-03-04 04:36:14 +01:00
eldritch horrors 79dd9efe38 Merge pull request #9041 from trofi/profiles-sign
src/libstore/profiles.cc: fix comparison of sign difference

(cherry picked from commit 1da1642527f73089947b7bd2de46147a44700ac8)
Change-Id: I8f23d32ad66b797ff58eb2bd15b2f7741f47cd99
2024-03-04 04:36:10 +01:00
John Ericson bc4aa3d5db Merge pull request #8887 from obsidiansystems/bsd-cross-ci
Support cross compiling to BSD and CI it

(cherry picked from commit 1f3fc08c5994ca69c84c9e745d59ec2bb2fd820a)
Change-Id: I415e92952afc661cfb5ef91a76c0637678a04a19
2024-03-04 04:36:04 +01:00
Eelco Dolstra 2442a40393 Merge pull request #9029 from inclyc/users/lyc/pass-value-2
libexpr: const rvalue reference -> value for nix::Expr nodes

(cherry picked from commit de99647b9c66219b2e7bc698a62377cc4f6148f6)
Change-Id: I96baf96b0a17e401548a926a7015f85e11d7c459
2024-03-04 04:35:59 +01:00
Théophane Hufschmitt 68ba44c518 Merge pull request #8931 from fricklerhandwerk/nix3-config-options
do not show configuration override flags for each command

(cherry picked from commit f89b84919c1a5c796512c50311821e7779b3678b)
Change-Id: Ib98b739bd6c9a1e94f94a78a47d84d72e435e7c0
2024-03-04 04:35:54 +01:00
github-actions[bot] afb55f36df
Fix bad_format_string error when builder stdout contains % (#10063)
(cherry picked from commit e2b6821ca0147f36bcb9404aab080f80746984c8)

Co-authored-by: roblabla <unfiltered@roblab.la>
2024-02-22 23:12:29 +01:00
Théophane Hufschmitt f36d4aefd3 Fix the build
bef68e53b9 (backport of
31ebc6028b3682969d86a7b39ae87131c41cc604) accidentally broke the build
because of a change in the constructor of `SourcePath` between 2.18 and
master. Fix that.
2024-02-15 09:50:12 +01:00
Eelco Dolstra bef68e53b9 Fix symlink handling
This restores the symlink handling behaviour prior to
94812cca98.

Fixes #9298.

(cherry picked from commit 31ebc6028b3682969d86a7b39ae87131c41cc604)
2024-01-21 20:53:30 +00:00
Shea Levy ba48ab4b95
Merge branch '2.18-maintenance' into ifd-buildStore-2.18 2024-01-11 07:21:16 -05:00
Shea Levy e7c2b35827
Build IFD in the build store when using eval-store.
Previously, IFDs would be built within the eval store, even though one
is typically using `--eval-store` precisely to *avoid* local builds.

Because the resulting Nix expression must be copied back to the eval
store in order to be imported, this requires the eval store to trust
the build store's signatures.

(cherry picked from commit c3942ef85ffbd83391410fbf012f1de366d2463c)
2024-01-11 06:34:27 -05:00
John Ericson f7f37035c8 Move tests to separate directories, and document
Today, with the tests inside a `tests` intermingled with the
corresponding library's source code, we have a few problems:

- We have to be careful that wildcards don't end up with tests being
  built as part of Nix proper, or test headers being installed as part
  of Nix proper.

- Tests in libraries but not executables is not right:

  - It means each executable runs the previous unit tests again, because
    it needs the libraries.

  - It doesn't work right on Windows, which doesn't want you to load a
    DLL just for the side global variable . It could be made to work
    with the dlopen equivalent, but that's gross!

This reorg solves these problems.

There is a remaining problem which is that sibbling headers (like
`hash.hh` the test header vs `hash.hh` the main `libnixutil` header) end
up shadowing each other. This PR doesn't solve that. That is left as
future work for a future PR.

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>

(cherry picked from commit 91b6833686a6a6d9eac7f3f66393ec89ef1d3b57)
(cherry picked from commit a61e42adb528b3d40ce43e07c79368d779a8b624)
2023-12-01 13:05:03 -05:00
John Ericson 30dcc19d1f Put functional tests in tests/functional
I think it is bad for these reasons when `tests/` contains a mix of
functional and integration tests

 - Concepts is harder to understand, the documentation makes a good
   unit vs functional vs integration distinction, but when the
   integration tests are just two subdirs within `tests/` this is not
   clear.

 - Source filtering in the `flake.nix` is more complex. We need to
   filter out some of the dirs from `tests/`, rather than simply pick
   the dirs we want and take all of them. This is a good sign the
   structure of what we are trying to do is not matching the structure
   of the files.

With this change we have a clean:
```shell-session
$ git show 'HEAD:tests'
tree HEAD:tests

functional/
installer/
nixos/
```

(cherry picked from commit 68c81c737571794f7246db53fb4774e94fcf4b7e)
2023-12-01 12:06:43 -05:00
John Ericson 89a66633b7 Add missing -lrapidcheck fixing build with shared lib
https://github.com/NixOS/nixpkgs/pull/269064 makes rapidcheck be build
as a shared lib, but that broke Nix because the `-lrapidcheck` was
missing. This fixes that (and doesn't break Nix what the library is a
static archive as today).

(cherry picked from commit 46131567da96ffac298b9ec54016b37114b0dfd5)
2023-11-22 04:48:11 +00:00