Age | Commit message (Collapse) | Author |
|
|
|
This also adds a '--profile' option to 'nix build' (replacing 'nix-env
--set').
|
|
|
|
|
|
|
|
(cherry picked from commit 2c692a3b144523bca68dd6de618124ba6c9bb332)
|
|
Using std::filesystem means also having to link with -lstdc++fs on
some platforms and it's hard to discover for what platforms this is
needed. As all the functionality is already implemented as utilities,
use those instead.
|
|
Due to fetchGit not checking if rev is an ancestor of ref (there is even
a FIXME comment about it in the code), the cache repo might not have the
ref even though it has the rev. This doesn't matter when submodule =
false, but the submodule = true code blows up because it tries to fetch
the (missing) ref from the cache repo.
Fix this in the simplest way possible: fetch all refs from the local
cache repo when submodules = true.
TODO: Add tests.
|
|
|
|
Major bugfix for the submodules = true code path.
TODO: Add tests.
|
|
|
|
The .link file is used as a lock, so I think we should put the
"submodule" attribute in there since turning on submodules creates a new
.link file path.
|
|
Before this change it would be false for all evaluations but the first.
Now it follows the input argument (as it should).
|
|
|
|
submodules
|
|
Some platforms seem to still require linking with stdc++fs to enable
STL std::filesystem support.
|
|
|
|
|
|
|
|
This fixes fetching repositories with no submodules and also cleans up
.git files in checkouts.
|
|
|
|
|
|
There are some downsides to this features:
- Submodules are not cached (unlike the root repo),
- Full checkouts are created in a temporary directory.
|
|
|
|
|
|
|
|
|
|
|
|
installer: Fix terminal colors.
|
|
The install-multi-user script uses blue, green, and red colors, as
well as bold and underline, to add helpful formatting that helps
structure its rather voluminous output.
Unfortunately, the terminal escape sequences it uses are not quite
well-formed. The relevant information is all there, just obscured
by some extra noise, a leading parameter `38`. Empirically, the
result is:
* On macOS, in both Terminal.app and iTerm2, the spurious `38` is
ignored, the rest of the escape sequence is applied, and the colors
show up as intended.
* On Linux, in at least gnome-terminal and xterm, the spurious `38`
and the next parameter after it are ignored, and what's left is
applied. So in the sequence `38;4;32`, the 4 (underline) is
ignored but the 32 (green) takes effect; in a more typical sequence
like `38;34`, the 34 (blue) is ignored and nothing happens.
These codes are all unchanged since this script's origins as a
Darwin-only script -- so the fact that they work fine in common macOS
terminals goes some way to explain how the bug arose.
Happily, we can make the colors work as intended by just deleting the
extra `38;`. Tested in all four terminals mentioned above; the new
codes work correctly on all of them, and on the two macOS terminals
they work exactly the same as before.
---
In a bit more technical detail -- perhaps more than anyone, me
included, ever wanted to know, but now that I've gone and learned it
I'll write it down anyway :) -- here's what's happening in these codes:
An ECMA-48 "control sequence" begins with `\033[` aka "CSI", contains
any number of parameters as semicolon-separated decimal numbers (plus
sometimes other wrinkles), and ends with a byte from 0x40..0x7e. In
our case, with `m` aka "SGR", "Select Graphic Rendition".
An SGR control sequence `\033[...m` sets colors, fonts, text styles,
etc. In particular a parameter `31` means red, `32` green, `34` blue,
`4` underline, and `0` means reset to normal. Those are all we use.
There is also a `38`. This is used for setting colors too... but it
needs arguments. `38;5;nn` is color nn from a 256-color palette, and
`38;2;rr;gg;bb` has the given RGB values.
There is no meaning defined for `38;1` or `38;34` etc. On seeing a
parameter `38` followed by an unrecognized argument for it, apparently
some implementations (as seen on macOS) discard only the `38` and
others (as seen on Linux) discard the argument too before resuming.
|
|
|
|
|
|
|
|
|
|
|
|
https://hydra.nixos.org/build/110879699
(cherry picked from commit 5bbe793abf18414878a069399d1759673d693fb6)
|
|
(cherry picked from commit e721f99817bb7154d8098c902e25f84521a90b7f)
|
|
(cherry picked from commit 442e665d6d3fcbdee7dece2f62a597142f8784b1)
|
|
Extracted from 678301072f05b650dc15c5edb4c25f08f0d6cace.
|
|
(cherry picked from commit 1bf9eb21b75f0d93d9c1633ea2e6fdf840047e79)
|
|
(cherry picked from commit b82f75464d1e5ae9a00d8004e5dd7b1ca05059e4)
|
|
https://hydra.nixos.org/build/110757285
(cherry picked from commit b430a81a1fbf6c792ba49e3aefe46256263430e5)
|
|
E.g.
$ nix edit .#nixosConfigurations.bla
now works.
(cherry picked from commit d2032edb2f86e955a8a7724a27c0c3225f386500)
|
|
(cherry picked from commit 0b013a54dc570395bed887369f8dd622b8ce337b)
|
|
(cherry picked from commit 6b0ca8e803710342af70e257935724c5ad84ca04)
|
|
(cherry picked from commit 7dcf5b011a0942ecf953f2b607c4c8d0e9e652c7)
|
|
(cherry picked from commit 6529490cc10018d5191e50c482ac1180b96b1a3c)
|
|
(cherry picked from commit c02da997570ac0d9b595d787bea8cb5a4e3cc1f5)
|
|
doc: Files in the store have modes 444/555, not 644/755
|
|
This line has been this way since it was written, in 9e08f5efe
in 2006.
I think it was just a small mistake then; Eelco's thesis earlier
that year says the permission on each file is set to 0444 or 0555
in a derivation's output as part of the build process. In any
case I'm pretty sure that's the behavior now.
|