aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-06Merge pull request #6483 from NixOS/fix-sourcehut-ref-parsingEelco Dolstra
Fix the parsing of the sourcehut refs file
2022-05-05Merge pull request #6489 from alexshpilkin/fix-6488Eelco Dolstra
nix: Add forgotten null check in AttrCursor::getListOfStrings()
2022-05-05Make sure that `nix build` works in `--impure` modeThéophane Hufschmitt
Regression test for <https://github.com/NixOS/nix/issues/6488>
2022-05-05Merge pull request #6492 from thkoch2001/patch-2Eelco Dolstra
Change json example to be original
2022-05-05Change json example to be originalthkoch2001
Closes: #3391
2022-05-04Add forgotten null checkAlexander Shpilkin
2022-05-04Fix the parsing of the sourcehut refs fileThéophane Hufschmitt
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
2022-05-04Merge pull request #6482 from edolstra/json-utilsEelco Dolstra
Move json stuff out of util.cc
2022-05-04Fix compiler warningEelco Dolstra
2022-05-04Move json stuff out of util.ccEelco Dolstra
2022-05-04Get rid of most `.at` calls (#6393)Alain Zscheile
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.
2022-05-03Merge pull request #6449 from edolstra/outputs-specEelco Dolstra
Allow selecting derivation outputs
2022-05-03nix profile: Support overriding outputsEelco Dolstra
2022-05-03Allow selecting derivation outputs using 'installable!outputs'Eelco Dolstra
E.g. 'nixpkgs#glibc^dev,static' or 'nixpkgs#glibc^*'.
2022-05-03Merge pull request #6426 from edolstra/respect-outputs-to-installEelco Dolstra
nix: Respect meta.outputsToInstall, and use all outputs by default
2022-05-03Merge pull request #6465 from layus/fix-test-crashesThéophane Hufschmitt
tests: Distinguish crashes from expected failures
2022-05-02tests/lang: Distinguish crashes from expected failuresGuillaume Maudoux
2022-05-02Revert "tests: Distinguish crashes from expected failures"Guillaume Maudoux
This reverts commit 143b73f52dabb35cd56551c24caef95466bce488.
2022-05-02Style fixesEelco Dolstra
2022-05-02Merge pull request #6470 from Ma27/git-followupEelco Dolstra
libfetchers/git: fix every occasion of a permission error
2022-05-02Merge pull request #4638 from orbekk/read_headEelco Dolstra
Resolve reference for remote git repositories (makes fetchGit work with non-'master' branch)
2022-05-02tests: Don't create tests/resultEelco Dolstra
https://hydra.nixos.org/log/lns780srkka4dv7r69mn4zfy6fdij4yr-nix-2.9.0pre20220428_4bb111c.drv
2022-04-30libfetchers/git: fix every occasion of a permission errorMaximilian Bosch
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.
2022-04-29Extract git reference parsing to a shared libraryKjetil Orbekk
These utility functions can be shared between the git and github fetchers.
2022-04-29Update `nix flake` documentation of `ref` handlingKjetil Orbekk
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`.
2022-04-29Store cached head in cached git repoKjetil Orbekk
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.
2022-04-29Refactor fetching of dirty workdirKjetil Orbekk
Extract the handling of a local dirty workdir to a helper function.
2022-04-29Test fetchGit with non-'master' remote repoKjetil Orbekk
2022-04-29Resolve reference for remote repositoryKjetil Orbekk
Resolves the HEAD reference from the remote repository instead of assuming "master".
2022-04-29tests: Distinguish crashes from expected failuresGuillaume Maudoux
2022-04-28Merge pull request #6461 from edolstra/libcxxEelco Dolstra
Fix libcxx build
2022-04-28Fix libcxx buildEelco Dolstra
Fixes #6458.
2022-04-28Add libcxxStdenv devshellEelco Dolstra
2022-04-28Shut up clang warningEelco Dolstra
2022-04-28Merge pull request #6459 from edolstra/fix-out-pathsEelco Dolstra
Fix passing $OUT_PATHS to the post-build hook
2022-04-28Fix passing $OUT_PATHS to the post-build hookEelco Dolstra
Fixes #6446.
2022-04-26Merge pull request #6444 from midchildan/feat/zsh-runhelpEelco Dolstra
feat: add integration with zsh's run-help
2022-04-27refactor: don't hardcode nix subcommands in run-help-nixmidchildan
2022-04-26Bump eval cache schema versionEelco Dolstra
2022-04-26Remove obsolete FIXMEEelco Dolstra
2022-04-26Add a test for outputsToInstallEelco Dolstra
2022-04-26nix: Respect meta.outputsToInstall, and use all outputs by defaultEelco Dolstra
'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.
2022-04-26Merge pull request #6447 from edolstra/eval-cache-symbolsEelco Dolstra
EvalCache: Use Symbol in more places
2022-04-26Merge pull request #6440 from Ma27/fix-nix-with-latest-gitThéophane Hufschmitt
libfetchers/git: hardcode `--git-dir`
2022-04-26EvalCache AttrKey: Use Symbol instead of std::stringEelco Dolstra
2022-04-26EvalCache: Revert to using symbols in getAttr()Eelco Dolstra
2022-04-26Don't pass Symbol by referenceEelco Dolstra
Since Symbol is just an integer, passing it by const reference is never advantageous.
2022-04-26Merge branch 'symbolidx-symbol' of https://github.com/pennae/nixEelco Dolstra
2022-04-25rename SymbolIdx -> Symbol, Symbol -> SymbolStrpennae
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.
2022-04-25fix: typo make-content-addressable -> make-content-addressedmidchildan