Eelco Dolstra
0b4c4d7434
Don't use GC_STRNDUP
...
It calls strlen() on the input (rather than simply copying at most
`size` bytes), which can fail if the input is not zero-terminated and
is inefficient in any case.
Fixes #7347 .
2022-11-25 22:30:56 +01:00
Théophane Hufschmitt
bc9692a6b7
Merge pull request #7337 from Radvendii/why-depends-ca
...
Fix why-depends for CA derivations
2022-11-23 20:16:14 +01:00
Taeer Bar-Yam
bd8571a5c3
add explanation and test
2022-11-23 12:06:47 -05:00
Taeer Bar-Yam
b13fd4c58e
Fix why-depends for CA derivations
...
why-depends assumed that we knew the output path of the second argument.
For CA derivations, we might not know until it's built. One way to solve
this would be to build the second installable to get the output path.
In this case we don't need to, though. If the first installable (A)
depends on the second (B), then getting the store path of A will
necessitate having the store path B. The contrapositive is, if the store
path of B is not known (i.e. it's a CA derivation which hasn't been
built), then A does not depend on B.
2022-11-23 11:39:50 -05:00
Eelco Dolstra
05d0892443
Merge pull request #7328 from edolstra/nix-build-stats
...
nix build --json: Include build statistics
2022-11-22 14:41:15 +01:00
Eelco Dolstra
96a9511a9c
Merge pull request #7333 from fricklerhandwerk/language-overview
...
fix error in language overview
2022-11-22 11:18:53 +01:00
Valentin Gagarin
52f0c80917
fix error in language overview
...
it is not possible to antiquote numbers.
2022-11-22 10:36:21 +01:00
Eelco Dolstra
02c02ee7c3
Merge pull request #6456 from amjoseph-nixpkgs/seccomp-mips
...
local-derivation-goal.cc: enable seccomp filters for mips{32,64}
2022-11-21 23:03:00 +01:00
Eelco Dolstra
f0baa5c128
nix build --json: Include build statistics
...
Example:
# nix build -L --extra-experimental-features cgroups --impure --expr 'with import <nixpkgs> {}; runCommand "foo" {} "dd if=/dev/urandom bs=1M count=1024 | md5sum; mkdir $out"' --json
[
{
"cpuSystem": 1.911431,
"cpuUser": 1.214249,
"drvPath": "/nix/store/xzdqz67xba18hljhycp0hwfigzrs2z69-foo.drv",
"outputs": {
"out": "/nix/store/rh9mc9l2gkpq8kn2sgzndr6ll7ffjh6l-foo"
},
"startTime": 1669024076,
"stopTime": 1669024079
}
]
2022-11-21 12:06:01 +01:00
Eelco Dolstra
e7a5b76844
Rename derivedPathsWithHintsToJSON -> builtPathsToJSON
2022-11-21 11:56:20 +01:00
Théophane Hufschmitt
62960f3291
Merge pull request #7134 from yorickvP/disable-dbg-on-complete
...
Temporarily disable the debugger during completion evaluation
2022-11-16 11:28:40 +01:00
Théophane Hufschmitt
60dea270d0
Swallow the error in a more idiomatic way
2022-11-16 10:34:32 +01:00
Théophane Hufschmitt
4bf70b74a7
Merge pull request #7294 from tobim/support-aws-sdk-1.10
...
libstore: link to aws-crt-cpp
2022-11-15 16:51:09 +01:00
Théophane Hufschmitt
3ade5f5d60
Merge pull request #7283 from hercules-ci/issue-6572
...
Fix #6572 `requires non-existent output`
2022-11-15 16:24:24 +01:00
Théophane Hufschmitt
daf1423a4a
Merge pull request #7260 from ncfavier/readFile-scan-references
...
Restrict `readFile` context to references that appear in the string
2022-11-15 16:22:28 +01:00
Robert Hensing
c279ddb18c
tests: Reproduce #6572
2022-11-14 18:03:29 +01:00
Robert Hensing
7e162c69fe
derivation-goal: Fix requires non-existing output
error
...
It occurred when a output of the dependency was already available,
so it didn't need rebuilding and didn't get added to the
inputDrvOutputs.
This process-related info wasn't suitable for the purpose of finding
the actual input paths for the builder. It is better to do this in
absolute terms by querying the store.
2022-11-14 17:52:55 +01:00
Théophane Hufschmitt
cb39e9a99e
Test that the result of readFile
gets ref-scanned
2022-11-14 16:13:26 +01:00
Eelco Dolstra
0efc314d4d
Merge pull request #7295 from Et7f3/pkg-config-lowdown
...
build: use pkg-config for lowdown
2022-11-14 16:12:09 +01:00
Théophane Hufschmitt
6bf8736517
Add release-notes for the context-restriction in readFile
2022-11-14 15:03:53 +01:00
Théophane Hufschmitt
8b4352d79b
Merge remote-tracking branch 'nixos/master' into readFile-scan-references
2022-11-14 15:00:05 +01:00
Et7f3
efadeee8fd
build: use pkg-config for lowdown
2022-11-12 23:04:58 +01:00
Tobias Mayer
07f2cb1e8f
libstore: link to aws-crt-cpp
...
This change is needed to support aws-sdk-cpp 1.10 and newer.
I opted not to make this dependent on the sdk version because
the crt dependency has been in the interface of the older
sdk as well, and it was only coincidence that libstore didn't
make use of any privately defined symbols directly.
2022-11-12 14:34:23 +01:00
Théophane Hufschmitt
302ddee749
Merge pull request #7279 from fricklerhandwerk/uninstall
...
add removing users to uninstall instructions
2022-11-11 14:39:07 +01:00
Valentin Gagarin
2af036e5a3
remove stray comma
2022-11-11 14:01:13 +01:00
Valentin Gagarin
bb279257b3
Merge pull request #7229 from Mic92/ci
...
Auto-assign reviewers by file
2022-11-11 13:39:46 +01:00
Naïm Favier
e7ed9ae0c7
Restrict readFile
context to references that appear in the string
...
When calling `builtins.readFile` on a store path, the references of that
path are currently added to the resulting string's context.
This change makes those references the *possible* context of the string,
but filters them to keep only the references whose hash actually appears
in the string, similarly to what is done for determining the runtime
references of a path.
2022-11-11 13:04:34 +01:00
Théophane Hufschmitt
9550b1d519
Merge pull request #7258 from ncfavier/fix-eval-error-fmt
...
Fix printing of eval errors with two format placeholders
2022-11-10 18:41:16 +01:00
Théophane Hufschmitt
f225f43076
Merge pull request #7006 from fricklerhandwerk/redirects
...
manual: generalize anchor redirects
2022-11-09 11:23:26 +01:00
Valentin Gagarin
d8781c4fc5
add removing users to uninstall instructions
2022-11-09 01:11:47 +01:00
Valentin Gagarin
ffca3e34cb
Merge pull request #6906 from fricklerhandwerk/language-overview
...
add syntax overview from NixOS manual
2022-11-09 00:52:53 +01:00
Valentin Gagarin
daedaa197d
fix typos in comments
2022-11-09 00:49:34 +01:00
Théophane Hufschmitt
37358d0bcf
Merge pull request #7257 from Artturin/ca-referencesremove
...
tests/impure-derivations.sh: remove unknown experimental feature 'ca-…
2022-11-08 09:37:38 +01:00
Eelco Dolstra
b378876894
Merge pull request #7264 from patricksjackson/remote-brackets
...
build-remote: Add brackets to error message
2022-11-07 16:59:29 +01:00
Eelco Dolstra
995f5f2e41
Merge pull request #7267 from fricklerhandwerk/build-task
...
manual: build action -> build task
2022-11-07 16:58:47 +01:00
Eelco Dolstra
4d2244c757
Merge pull request #7252 from yorickvP/fix-7175
...
tarfile: set directory mode to at least 0500, don't extract fflags and perms
2022-11-07 16:56:41 +01:00
Valentin Gagarin
f7ab93b068
manual: build action -> build task
...
after discussing this with multiple people, I'm convinced that "build
task" is more precise: a derivation is not an action, but inert until it
is built. also it's easier to pronounce.
proposal: use "build task" for the generic concept "description of how
to derive new files from the contents of existing files". then it will
be easier to distinguish what we mean by "derivation" (a specific data
structure and Nix language value type) and "store derivation" (a
serialisation of a derivation into a file in the Nix store).
2022-11-06 13:28:18 +01:00
Patrick Jackson
907f52c337
build-remote: Add brackets to error message
2022-11-04 10:49:44 -07:00
Naïm Favier
dad859ba0f
Fix printing of eval errors with two format placeholders
2022-11-04 12:41:38 +01:00
Artturin
8e7bbc3c35
tests/impure-derivations.sh: remove unknown experimental feature 'ca-references'
...
ca-references was stabilized in d589a6aa8a
2022-11-03 21:53:11 +02:00
Eelco Dolstra
499e99d099
Merge pull request #7218 from Gabriella439/headless
...
Add `--yes` option for Nix installation script
2022-11-03 18:12:43 +01:00
Yorick
16f1720fd2
SourceExprCommand: swallow EvalError, add tests for this
...
Completing things that would error would print an ugly error in
the middle of your command line. Avoid printing this error.
2022-11-03 10:11:28 +01:00
Eelco Dolstra
dd1970c233
Merge pull request #7246 from NixOS/dependabot/github_actions/cachix/cachix-action-12
...
Bump cachix/cachix-action from 11 to 12
2022-11-02 15:35:23 +01:00
Yorick
444af85552
Temporarily disable the debugger during completion evaluation
...
readline is not re-entrant, so entering the debugger from the
completioncallback results in an eventual segfault.
The workaround is to temporarily disable the debugger when searching
for possible completions.
2022-11-02 13:02:24 +01:00
Yorick
34ea0e2e7b
tarfile: set directory mode to at least 0500, don't extract fflags
...
We don't need SGID, or any ACL's. We also want to keep every dir +rx.
2022-11-01 16:01:38 +01:00
dependabot[bot]
06a6a7959e
Bump cachix/cachix-action from 11 to 12
...
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action ) from 11 to 12.
- [Release notes](https://github.com/cachix/cachix-action/releases )
- [Commits](https://github.com/cachix/cachix-action/compare/v11...v12 )
---
updated-dependencies:
- dependency-name: cachix/cachix-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 22:08:02 +00:00
Eelco Dolstra
0edba4cc1e
Merge pull request #7231 from jfroche/fix/savedArgv-access
...
Move savedArgv into libmain
2022-10-31 16:35:08 +01:00
Théophane Hufschmitt
90ed041677
Merge pull request #7039 from Mic92/libfetchers-variant
...
libfetchers: avoid api.github.com ratelimit if no github token is set
2022-10-31 11:48:51 +01:00
Jörg Thalheim
e00761af73
Also test github flakes when access tokens are provided
2022-10-30 07:10:58 +01:00
Sandro Jäckel
9f1dd0df5b
Update test after api.github.com ratelimit avoidance
2022-10-29 21:51:29 +02:00