Commit graph

14021 commits

Author SHA1 Message Date
Yorick van Pelt
2c0866fc3f
fetchTree: convert fs path to url via ParsedURL::to_string 2023-02-27 15:30:04 +01:00
Yorick van Pelt
0844856c84
url: make percentEncode stricter, expose and unit test it 2023-02-27 15:30:00 +01:00
Eelco Dolstra
dd93c12c6a Revert "getDefaultNixPath: actually respect {restrict,pure}-eval"
This reverts commit 1cba5984a6.
2023-02-27 15:11:36 +01:00
Eelco Dolstra
e928c72cf9 Revert "Document default nix-path value"
This reverts commit dba9173a1d.
2023-02-27 14:16:49 +01:00
Valentin Gagarin
1b49e6fea9
use the term reference correctly 2023-02-27 13:04:54 +01:00
Valentin Gagarin
b0c23999d2
add link to definition 2023-02-27 12:56:22 +01:00
Valentin Gagarin
ec317949f9
remove "references" as distinct term 2023-02-27 12:55:14 +01:00
Théophane Hufschmitt
995bfeef3b
Merge pull request #7796 from hercules-ci/fix-7263
Ensure that `self.outPath == ./.`
2023-02-27 10:26:02 +01:00
Robert Hensing
e76619a402 rl-next: Describe fixed flake outPath semantics
The reference documentation already implies the correct semantics.
2023-02-26 14:41:23 +01:00
Anatol Pomozov
d731235f6b
Example uses gitlab.com thus clarify the comment 2023-02-24 07:17:47 -08:00
Valentin Gagarin
164a5e2629 incorporate feedback from maintainers 2023-02-24 15:05:31 +01:00
Robert Hensing
c6051cac6f doc: Add test dependencies to prerequisites 2023-02-24 09:59:25 +01:00
Robert Hensing
8648ebc2cc Add ./configure --disable-tests option
Building without tests is useful for bootstrapping with a smaller footprint
or running the tests in a separate derivation. Otherwise, we do compile and
run them.

This isn't fine grained as to allow picking `check` but not `installcheck`
or vice versa, but it's good enough for now.

I've tried to use Nixpkgs' `checkInputs`, but those inputs weren't discovered
properly by the configure script. We can emulate its behavior very well though.
2023-02-24 09:50:21 +01:00
Valentin Gagarin
a556143dc1 add objectives and tasks for Nix team
so far there were no even remotely measurable objectives, only a general
purpose statement.

this change is intended to focus the team's work on what I (and many
others I talked to) perceive to be the main pain point in the
development process.

Co-authored-by: solene.rapenne@tweag.io
2023-02-24 09:50:06 +01:00
Eelco Dolstra
92611e6e4c
Merge pull request #7412 from edolstra/release-process
Document the release process
2023-02-24 09:13:46 +01:00
Robert Hensing
b5bbf14b87
Merge pull request #5753 from obsidiansystems/init-twice-works
Clean up daemon handling in the tests
2023-02-23 18:13:14 +01:00
John Ericson
87da941348 Clean up daemon handling
Split `common.sh` into the vars and functions definitions vs starting
the daemon (and possibly other initialization logic). This way,
`init.sh` can just `source` the former. Trying to start the daemon
before `nix.conf` is written will fail because `nix daemon` requires
`--experimental-features 'nix-command'`.

`killDaemon` is idempotent, so it's safe to call when no daemon is
running.

`startDaemon` and `killDaemon` use the PID (which is now exported to
subshells) to decide whether there is work to be done, rather than
`NIX_REMOTE`, which might conceivably be set differently even if a
daemon is running.

`startDaemon` and `killDaemon` can save/restore the old `NIX_REMOTE` as
`NIX_REMOTE_OLD`.

`init.sh` kills daemon before deleting everything (including the daemon
socket).
2023-02-23 11:31:44 -05:00
John Ericson
5dbbf23332 Make init.sh safe to run twice
`init.sh` is tested on its own. We used to do that. I deleted it in
4720853129 but I am not sure why. Better
to just restore it; at one point working on this every other test
passed, so seems good to check whether `init.sh` can be run twice.

We don't *need* to run `init.sh` twice, but I want to try to make our
tests as robust as possible so that manual debugging (where tests for
better or worse might be run ways that we didn't expect) is less
fragile.
2023-02-23 11:31:44 -05:00
Théophane Hufschmitt
4a921ba43b
Merge pull request #7764 from yorickvP/build-remote-warning
build-remote: don't warn when all local build slots are taken
2023-02-22 17:43:20 +01:00
Eelco Dolstra
6589081f67
Merge pull request #7884 from edolstra/fix-static
Fix the static build
2023-02-22 14:44:12 +01:00
Eelco Dolstra
a2f5ab9072
Merge pull request #7881 from NixOS/thufschmitt-codeowners-shrink
Remove my CODEOWNER-ship to libstore
2023-02-22 14:13:21 +01:00
Eelco Dolstra
c30907829c Fix the static build
It doesn't produce a "debug" output, so the build failed without an
error message in Hydra (https://hydra.nixos.org/build/210121811).
2023-02-22 14:10:07 +01:00
Théophane Hufschmitt
e69584dc42
Remove my CODEOWNER-ship to libstore
There's only 24 hours in the day, so let's keep things down to a manageable state
2023-02-22 09:10:24 +01:00
Robert Hensing
5d834c40d0 flakes: Differentiate self.outPath and self.sourceInfo.outPath
It would be incorrect to say that the `sourceInfo` has an `outPath`
that isn't the root. `sourceInfo` is about the root, whereas only
the flake may not be about the root. Thanks Eelco for pointing that
out.
2023-02-22 03:31:24 +01:00
Robert Hensing
904a107d16 flakes: Ensure that self.outPath == ./.
Users expect `self` to refer to the directory where the `flake.nix`
file resides.
2023-02-22 03:30:47 +01:00
Eelco Dolstra
8ed29656fd
Merge pull request #7875 from obsidiansystems/try-fix-aarch64-static
Fix `isStatic` arguments to `commonDeps`
2023-02-21 16:54:26 +01:00
John Ericson
16111aa32e Fix isStatic arguments to commonDeps
Some dependencies supposed to be skipped in the cross build, along with
not using the gold linker. But in https://github.com/NixOS/nix/pull/6538
this was accidentally not preserved.

Also since https://github.com/NixOS/nix/pull/6538 we saw some new
aarch64-linux static build failures. This is a first attempt to try to
fix those failures. If this is not sufficient, there are other things we
can try next.
2023-02-21 10:21:51 -05:00
Théophane Hufschmitt
8418d22ac1
Merge pull request #7874 from obsidiansystems/fix-no-gc-build
Fix the build without GC
2023-02-21 16:14:51 +01:00
Théophane Hufschmitt
c7885ab6f2
Merge pull request #7755 from obsidiansystems/mix-read-only-mode
Make `--read-only` a separate mixin
2023-02-21 16:13:48 +01:00
John Ericson
5b0175e81d Fix the build without GC
I had given it an improper trailing comma in
1bd03ad100.
2023-02-21 09:38:46 -05: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
John Ericson
0258ac9c2a Make --read-only a separate mixin
It is independent of SourceExprCommand, which is about parsing
installables, except for the fact that parsing installables is one of
the many things influenced by read-only mode.
2023-02-20 10:39:18 -05: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
aameen-tulip
b31d4b689c
Document hasAllInfo
If this documentation is inaccurate in any way please do not hesitate to suggest corrections.

My understanding of this function is strictly from reading the source code and some limited experience implementing fetchers.
2023-02-16 18:47:45 -06:00
Robert Hensing
a88ae62bc0
Merge pull request #7811 from Et7f3/fix_memory_leaks
Reduce memory leaks
2023-02-16 21:21:54 +01:00