Age | Commit message (Collapse) | Author |
|
Fix the parsing of the sourcehut refs file
|
|
nix: Add forgotten null check in AttrCursor::getListOfStrings()
|
|
Regression test for <https://github.com/NixOS/nix/issues/6488>
|
|
Change json example to be original
|
|
Closes: #3391
|
|
|
|
Since a26be9f3b89be2ee90c6358250b9889b37f95cf8, the same parser is used
to parse the result of sourcehut’s `HEAD` endpoint (coming from [git
dumb protocol]) and the output of `git ls-remote`. However, they are very
slightly different (the former doesn’t specify the current reference
since it’s implied to be `HEAD`).
Unify both, and make the parser a bit more robust and understandable (by
making it more typed and adding tests for it)
[git dumb protocol]: https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols#_the_dumb_protocol
|
|
Move json stuff out of util.cc
|
|
|
|
|
|
Use one of `get` or `getOr` instead which will either return a null-pointer (with a nicer error message) or a default value when the key is missing.
|
|
Allow selecting derivation outputs
|
|
|
|
E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
|
|
nix: Respect meta.outputsToInstall, and use all outputs by default
|
|
tests: Distinguish crashes from expected failures
|
|
|
|
This reverts commit 143b73f52dabb35cd56551c24caef95466bce488.
|
|
|
|
libfetchers/git: fix every occasion of a permission error
|
|
Resolve reference for remote git repositories (makes fetchGit work with non-'master' branch)
|
|
https://hydra.nixos.org/log/lns780srkka4dv7r69mn4zfy6fdij4yr-nix-2.9.0pre20220428_4bb111c.drv
|
|
I'm afraid I missed a few problematic `git(1)`-calls while implementing
PR #6440, sorry for that! Upon investigating what went wrong, I realized
that I only tested against the "cached"-case by accident because my
git-checkout with my system's flake was apparently cached during my
debugging.
I managed to trigger the original issue again by running:
$ git commit --allow-empty -m "tmp"
$ sudo nixos-rebuild switch --flake .# -L --builders ''
Since `repoDir` points to the checkout that's potentially owned by
another user, I decided to add `--git-dir` to each call affecting
`repoDir`.
Since the `tmpDir` for the temporary submodule-checkout is created by
Nix itself, it doesn't seem to be an issue.
Sorry for that, it should be fine now.
|
|
These utility functions can be shared between the git and github fetchers.
|
|
Update the documentation about how `ref` is resolved if it is not
specified.
Add a note about special handling of local workdirs with `git+file`.
|
|
The previous head caching implementation stored two paths in the local
cache; one for the cached git repo and another textfile containing the
resolved HEAD ref. This commit instead stores the resolved HEAD by
setting the HEAD ref in the local cache appropriately.
|
|
Extract the handling of a local dirty workdir to a helper function.
|
|
|
|
Resolves the HEAD reference from the remote repository instead
of assuming "master".
|
|
|
|
Fix libcxx build
|
|
Fixes #6458.
|
|
|
|
|
|
Fix passing $OUT_PATHS to the post-build hook
|
|
Fixes #6446.
|
|
feat: add integration with zsh's run-help
|
|
|
|
|
|
|
|
|
|
'nix profile install' will now install all outputs listed in the
package's meta.outputsToInstall attribute, or all outputs if that
attribute doesn't exist. This makes it behave consistently with
nix-env. Fixes #6385.
Furthermore, for consistency, all other 'nix' commands do this as
well. E.g. 'nix build' will build and symlink the outputs in
meta.outputsToInstall, defaulting to all outputs. Previously, it only
built/symlinked the first output. Note that this means that selecting
a specific output using attrpath selection (e.g. 'nix build
nixpkgs#libxml2.dev') no longer works. A subsequent PR will add a way
to specify the desired outputs explicitly.
|
|
EvalCache: Use Symbol in more places
|
|
libfetchers/git: hardcode `--git-dir`
|
|
|
|
|
|
Since Symbol is just an integer, passing it by const reference is
never advantageous.
|
|
|
|
after #6218 `Symbol` no longer confers a uniqueness invariant on the
string it wraps, it is now possible to create multiple symbols that
compare equal but whose string contents have different addresses. this
guarantee is now only provided by `SymbolIdx`, leaving `Symbol` only as
a string wrapper that knows about the intricacies of how symbols need to
be formatted for output.
this change renames `SymbolIdx` to `Symbol` to restore the previous
semantics of `Symbol` to that name. we also keep the wrapper type and
rename it to `SymbolStr` instead of returning plain strings from lookups
into the symbol table because symbols are formatted for output in many
places. theoretically we do not need `SymbolStr`, only a function that
formats a string for output as a symbol, but having to wrap every symbol
that appears in a message into eg `formatSymbol()` is error-prone and
inconvient.
|
|
|