Eelco Dolstra
21f0a98790
Remove unnecessary -lgit2
2023-02-21 16:03:04 +01:00
Eelco Dolstra
273df095b6
Remove unused file
2023-02-21 15:51:45 +01:00
Eelco Dolstra
c8f7ca2c7b
Fix addErrorContext
2023-02-21 15:41:57 +01:00
Eelco Dolstra
5d1e5a09d1
Merge remote-tracking branch 'origin/master' into lazy-trees
2023-02-21 13:32:59 +01:00
Théophane Hufschmitt
532c70f531
Merge pull request #7856 from yorickvP/fix-nsswitch
...
Wait with making /etc unwritable until after build env setup
2023-02-21 09:39:10 +01:00
tomberek
5510daf132
Merge pull request #7872 from obsidiansystems/test-derivation-to-json
...
`Derivation::toJSON`: fix bug!
2023-02-20 18:12:09 -05:00
John Ericson
208c8d326d
Derivation::toJSON
: fix bug!
...
When I moved this code from the binary to libnixstore #7863 , I forgot to
display the environment variables!
2023-02-20 17:38:57 -05:00
Robert Hensing
c7bd3a874f
Merge pull request #7863 from obsidiansystems/test-derivation-to-json
...
Move Derivation JSON printing logic to lib and test it
2023-02-20 23:21:50 +01:00
Robert Hensing
df6829e0d7
Merge pull request #7867 from NixOS/hacking-cross
...
doc/hacking.md: Corrections and additions for cross
2023-02-20 22:25:55 +01:00
tomberek
924ef6761b
Merge pull request #7748 from obsidiansystems/split-other-installables
...
Keep splitting libcmd headers & files
2023-02-20 10:29:16 -05:00
John Ericson
1bd03ad100
Split out CmdRepl
and editorFor
...
The REPL itself and the `nix repl` CLI are conceptually different
things, and thus deserve to be in different files.
2023-02-20 09:45:29 -05:00
John Ericson
57a2e46ee0
Slight cleanup of InstallablesCommand::load
2023-02-20 09:09:11 -05:00
John Ericson
fa4733fce5
Split out InstallableFlake
and InstallableAttrPath
2023-02-20 09:09:11 -05:00
Robert Hensing
de714833f1
Merge pull request #6538 from zimbatm/simplify-flake
...
simplify flake
2023-02-20 12:33:22 +01:00
Robert Hensing
807ef8f734
doc/hacking.md: Corrections and additions for cross
2023-02-20 12:20:08 +01:00
John Ericson
d7a4f08d42
Nix's own flake: Dedup and memoize more
...
- `nixpkgsFor` does all of native, static, cross, and the different stdenvs.
- The main Nix derivation is no longer duplicated for static.
- DRY nixpkgs.lib and lib.genAttrs calls.
2023-02-20 11:35:51 +01:00
Théophane Hufschmitt
9a3f66d9d9
Merge pull request #7433 from yorickvP/improv-onboarding
...
Improve hacking.md and add clangd+bear to devshell
2023-02-20 10:50:08 +01:00
Valentin Gagarin
dda83a59c1
Merge pull request #7158 from sternenseemann/foldl-strict-accumulation-value
2023-02-19 23:54:14 +01:00
John Ericson
7998686c00
Test toJSON
of DerivationOutput
and Derivation
2023-02-19 11:12:12 -05:00
John Ericson
cd583362ec
Move Derivation
toJSON logic to libnixstore
2023-02-19 10:06:40 -05:00
Yorick van Pelt
bbba49b3e4
Wait with making /etc unwritable until after build env setup
...
This fixes /etc/nsswitch.conf
2023-02-17 16:34:45 +01:00
Eelco Dolstra
ece20d53dc
GitInputAccessor: Support symlinks
2023-02-17 16:33:10 +01:00
Eelco Dolstra
f4009fdd9b
Don't use std::span just yet
...
On aarch64-linux we're forced to use gcc 9, which doesn't support
std::span yet.
2023-02-17 16:02:47 +01:00
Eelco Dolstra
26ff9c1b37
Revert "Shut up a gcc warning"
...
This reverts commit 37b4a9ec66
. This
doesn't handle the case where there is no slash.
2023-02-17 15:34:52 +01:00
Eelco Dolstra
02d5c54555
Fix clang build
2023-02-17 15:20:06 +01:00
Eelco Dolstra
12f141391c
Merge remote-tracking branch 'origin/master' into lazy-trees
2023-02-17 12:02:52 +01:00
Robert Hensing
a88ae62bc0
Merge pull request #7811 from Et7f3/fix_memory_leaks
...
Reduce memory leaks
2023-02-16 21:21:54 +01:00
Et7f3
cec23f5dda
ExprOpHasAttr,ExprSelect,stripIndentation,binds,formals: delete losts objects
...
We are looking for *$ because it indicate that it was constructed with a new but
not release. De-referencing shallow copy so deleting as whole might create
dangling pointer that's why we move it so we delete a empty containers + the
nice perf boost.
2023-02-16 19:53:55 +01:00
Eelco Dolstra
601849b95a
Merge pull request #7835 from edolstra/fix-static-build
...
Fix static build
2023-02-15 09:44:40 +01:00
Eelco Dolstra
35049389cd
Fix static build
...
For static builds, we need to propagate all the static library
dependencies to the link of the program. E.g. if libstore-tests-exe
depends on libnixstore-tests, and libnixstore-tests depends on
libstore, then libstore-tests-exe needs to link against libstore.
https://hydra.nixos.org/build/209007480
2023-02-14 15:54:19 +01:00
Eelco Dolstra
707ba52f2d
Merge pull request #7830 from yorickvP/fix-writable-etc
...
Don't allow writing to /etc
2023-02-14 14:41:59 +01:00
Yorick van Pelt
49fd72a903
Make /etc writability conditional on uid-range feature
2023-02-14 13:55:41 +01:00
Yorick van Pelt
ad1f61c39b
container test: make /etc writable
2023-02-14 12:26:40 +01:00
Yorick van Pelt
db41f74af3
Don't allow writing to /etc
2023-02-14 12:03:34 +01:00
tomberek
df9a71f6ea
Merge pull request #4589 from obsidiansystems/better-build-ca-json
...
Test `nix build --json` return output paths in floating CA case
2023-02-13 09:07:57 -05:00
tomberek
601faa00d7
Merge pull request #7744 from obsidiansystems/split-installable-store-path
...
Factor out `InstallableStorePath` to its own file, dedup
2023-02-13 08:57:19 -05:00
Eelco Dolstra
c205d10c66
Merge pull request #7616 from hercules-ci/fix-3898
...
Fix foreign key error inserting into NARs #3898
2023-02-13 13:02:19 +01:00
Eelco Dolstra
2037f8a3ee
Merge pull request #7804 from PJungkamp/fix-completions
...
Infer short completion descriptions for commandline flags
2023-02-13 11:26:38 +01:00
Yorick van Pelt
f2e427942d
Improve hacking.md
...
- Refer to current version in readme
- Split into flakes and non-flakes section
- Change order to move nix-build to the end, since people often start
with it in the beginning.
- Use proper "Note" syntax
- Add notes about editor integration
- Move information about target platforms and stdenvs into separate
sections
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-authored-by: Alexander Bantyev <alexander.bantyev@tweag.io>
Co-authored-by: Théophane Hufschmitt <theophane.hufschmitt@tweag.io>
2023-02-13 12:00:00 +04:00
Et7f3
fa89d317b7
ExprString: Avoid copy of string
2023-02-12 05:49:45 +01:00
Et7f3
3d16f2a281
parser: use implicit rule
2023-02-12 05:49:45 +01:00
John Ericson
55016b6fcd
Test nix build --json
return output paths in floating CA case
...
Adding a test to ensure there is no regression.
The tests that are split out of `tests/build.sh` are ones that don't yet
work with CA derivation. I have not yet evaluated whether they should or
not.
This behavior, reported missing in issue #4661 , already got fixed in
PR #4818 , but didn't get a test case then.
2023-02-10 18:04:13 -05:00
Philipp Jungkamp
30edd7af53
Completions::add use libutil trim()
2023-02-10 22:17:09 +01:00
Eelco Dolstra
c184566046
Merge pull request #7797 from hercules-ci/tests-set-ps4
...
tests: Add command source locations to test log
2023-02-10 20:55:57 +01:00
Eelco Dolstra
b3d29e80e0
Merge pull request #7805 from edolstra/c++2a
...
Fix building with GCC 9
2023-02-10 20:41:29 +01:00
Eelco Dolstra
67451d8ed7
Merge pull request #7802 from edolstra/fix-7783
...
Fix PID namespace support check
2023-02-10 20:41:13 +01:00
Eelco Dolstra
5978ceb271
Fix building with GCC 9
...
Nixpkgs on aarch64-linux is currently stuck on GCC 9
(https://github.com/NixOS/nixpkgs/issues/208412 ) and using gcc11Stdenv
doesn't work either.
So use c++2a instead of c++20 for now. Unfortunately this means we
can't use some C++20 features for now (like std::span).
2023-02-10 18:38:57 +01:00
Théophane Hufschmitt
9ebbe35817
Merge pull request #5588 from tweag/balsoft/xdg
...
Follow XDG Base Directory standard
2023-02-10 18:05:50 +01:00
Philipp Jungkamp
a537095e1f
Infer short completion descriptions for commandline flags
...
Descriptions for commandline flags may not include newlines and should
be rather short for display in a shell. Truncate the description string
of a flag on '\n' or '.' to and add an ellipsis if needed.
2023-02-10 18:03:19 +01:00
Eelco Dolstra
a21405a4e8
Add regression test
2023-02-10 17:51:44 +01:00