Yannik Sander
954e9101ba
Add host attribute of github/gitlab flakerefs to URL serialization
...
`GitArchiveInputScheme::toUrl` currently drops the `host` attribute,
creating invalid urls when locking `github:` or `gitlab:` urls pointing to alterative instances and serializing the input back to a url.
```
❯ cat flake.nix
{
inputs.gnome-2048 = {
url = "gitlab:GNOME/gnome-2048?host=gitlab.gnome.org";
flake = false;
};
outputs = inputs: {};
}
f1xb57354q79t_jpw5_h79cw0000gq/T/tmp.MOBbzbpT35
❯ nix flake metadata
warning: creating lock file '/private/var/folders/fb/f1xb57354q79t_jpw5_h79cw0000gq/T/tmp.MOBbzbpT35/flake.lock':
• Added input 'gnome-2048':
'gitlab:GNOME/gnome-2048/70e0e430ca4bf590990433a3abdce6b631d50e6e?narHash=sha256-bya45ug2mDSU4SMn0fSBlZCuPl9y15B12ubKeb2A58s%3D' (2025-02-21)
Resolved URL: path:/private/var/folders/fb/f1xb57354q79t_jpw5_h79cw0000gq/T/tmp.MOBbzbpT35
Locked URL: path:/private/var/folders/fb/f1xb57354q79t_jpw5_h79cw0000gq/T/tmp.MOBbzbpT35?lastModified=1740744684&narHash=sha256-nxUL/JiTYbZX2c1XiN/TC6aA1hf%2B1YXsUvhL7ASY2uE%3D
Path: /nix/store/f4xczpwhdxs8gal1rika1c5bvhyd472l-source
Last modified: 2025-02-28 13:11:24
Inputs:
└───gnome-2048: gitlab:GNOME/gnome-2048/70e0e430ca4bf590990433a3abdce6b631d50e6e?narHash=sha256-bya45ug2mDSU4SMn0fSBlZCuPl9y15B12ubKeb2A58s%3D (2025-02-21 23:18:46)
```
Note the gnome-2048 input url missing the original host query.
The Url after this commit:
```
[...]
Inputs:
└───gnome-2048: gitlab:GNOME/gnome-2048/70e0e430ca4bf590990433a3abdce6b631d50e6e?host=gitlab.gnome.org&narHash=sha256-bya45ug2mDSU4SMn0fSBlZCuPl9y15B12ubKeb2A58s%3D (2025-02-21 23:18:46)
```
2025-02-28 13:14:16 +01:00
John Ericson
f636ced7d2
Revert "Revert "Revert "Adapt scheduler to work with dynamic derivations"""
...
The bug reappeared after all, and the fix introduced a different bug. We
want to release 2.27 imminently so there is no time to do a proper fix,
which appears to require a larger reworking. Hopefully we will have it
for 2.28, however.
This reverts commit c98525235f .
2025-02-27 13:42:57 -05:00
Eelco Dolstra
1293388039
Merge pull request #12544 from xokdvium/debugger-use-after-free
...
libexpr: Fix use-after-free of StaticEnv::up
2025-02-27 16:55:49 +01:00
John Ericson
2aa6e0f084
Expand manual on derivation outputs
...
Note, this includes some text adapted from from Eelco's dissertation
2025-02-27 02:13:36 -05:00
Eelco Dolstra
ec8f78b0be
Fix mingw build
...
https://hydra.nixos.org/build/291153007
2025-02-26 19:54:47 +01:00
Eelco Dolstra
81834e7f00
Merge pull request #12566 from NaN-git/fix-curl-callback
...
libstore: fix curl callback function signature
2025-02-25 20:15:06 +01:00
Eelco Dolstra
671d1b0123
Merge pull request #12501 from DeterminateSystems/stop-progress-bar
...
Remove {start,stop}ProgressBar()
2025-02-25 20:07:29 +01:00
Philipp Otterbein
b074345d35
libstore: fix curl callback function signature
2025-02-25 19:42:59 +01:00
Robert Hensing
1222438ae7
Merge remote-tracking branch 'upstream/master' into tomberek.access-token-prefixing
2025-02-25 15:40:34 +01:00
Robert Hensing
c07172220c
refact: Rename url -> hostAndPath
...
https://github.com/NixOS/nix/pull/12465/files#r1955286197
> Perhaps that is a misnomer.
2025-02-25 15:21:09 +01:00
Eelco Dolstra
94347f4622
nix -> determinate-nix
2025-02-24 23:28:09 +01:00
Eelco Dolstra
6749d26dbb
Merge remote-tracking branch 'origin/2.26-maintenance' into detsys-main
2025-02-24 22:41:22 +01:00
Eelco Dolstra
91508de315
nix flake archive: Recurse into relative path inputs
...
We can't ignore them entirely, since we do want to archive their
transitive inputs.
Fixes #12438 .
(cherry picked from commit 14c9755462 )
2025-02-24 21:30:45 +00:00
mergify[bot]
605b2371f9
windows: fix compilation after recent changes (backport #12495 ) ( #12561 )
...
* windows: fix compilation after recent changes
Specifically last few week's merges involving legacy SSH options and
dynamic derivations.
(cherry picked from commit e0617d2545 )
# Conflicts:
# src/libstore/build/derivation-creation-and-realisation-goal.hh
* Remove unneeded
* Remove unneeded
---------
Co-authored-by: Brian McKenna <brian@brianmckenna.org>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-02-24 21:30:35 +00:00
Eelco Dolstra
14c9755462
nix flake archive: Recurse into relative path inputs
...
We can't ignore them entirely, since we do want to archive their
transitive inputs.
Fixes #12438 .
2025-02-24 22:10:02 +01:00
Eelco Dolstra
d670380bd9
nix flake archive: Skip relative path inputs
...
Fixes #12438 .
(cherry picked from commit b4dfeafed5 )
2025-02-24 14:49:11 +00:00
Eelco Dolstra
b4dfeafed5
nix flake archive: Skip relative path inputs
...
Fixes #12438 .
2025-02-24 15:30:30 +01:00
Eelco Dolstra
f3ea14c8dc
Merge pull request #12542 from tomberek/tomberek.ssl-default
...
doc: ssl-cert-file leaks into OSX builds
2025-02-24 14:51:34 +01:00
mergify[bot]
6d3ee99463
Merge pull request #12545 from NixOS/mergify/bp/2.26-maintenance/pr-12543
...
Fix perl store bindings (backport #12543 )
2025-02-22 18:34:00 +00:00
Ivan Trubach
c69d5af105
libstore: fix expected bytes in progress bar
...
(cherry picked from commit eb73bfcf73 )
2025-02-21 19:12:02 +00:00
Eelco Dolstra
d904921eec
Merge pull request #12510 from tie/fix-progress-parallel
...
libstore: fix expected bytes in progress bar
2025-02-21 20:11:18 +01:00
Eelco Dolstra
247ec94041
Remove unnecessary ./.version-determinate symlink
2025-02-21 19:20:23 +01:00
Fabian Möller
cd1935468d
Fix perl store bindings
...
When #9863 converted the `Nix::Store` free functions into member functions, the
implicit `this` argument was not accounted for when iterating over the variable
number of arguments in some functions.
(cherry picked from commit 5cf9e18167 )
2025-02-21 14:47:37 +00:00
Sergei Zimmerman
af2ddfdb3b
libexpr: Fix use-after-free of StaticEnv::up
...
It's not very clear what the ownership model is here, but one thing
is certain: `.up` can't be destroyed before the StaticEnv that refers
to it is.
Changing a non-owning pointer to taking shared ownership of the parent
`StaticEnv` prevents the `.up` from being freed.
I'm not a huge fan of the inverted ownership, where child `StaticEnv`
takes a refcount of the parent, but this seems like the least intrusive
way to fix the use-after-free.
This shouldn't cause any shared_ptr cycles to appear (hopefully).
2025-02-21 14:36:39 +00:00
Fabian Möller
5cf9e18167
Fix perl store bindings
...
When #9863 converted the `Nix::Store` free functions into member functions, the
implicit `this` argument was not accounted for when iterating over the variable
number of arguments in some functions.
2025-02-21 11:49:00 +01:00
Thomas Bereknyei
bbf6ff29e6
doc: ssl-cert-file leaks into OSX builds
2025-02-20 17:57:10 -05:00
Sergei Zimmerman
d95b7fea8e
libfetchers-tests: Add back git-utils.cc
...
Seems like this got dropped at some point during meson migration, so
put it back in the build system.
Drop all tests for `parseGitUrl`, since that function doesn't exist
and migrating doesn't look sensible because git-lfs stuff seems to use
`ParsedURL`.
2025-02-20 20:19:16 +00:00
Sandro Jäckel
65583ca79b
Only try to chmod /nix/var/nix/profiles/per-user when necessary
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
(cherry picked from commit dcbf4dcc09 )
2025-02-20 16:11:27 +00:00
Robert Hensing
76f4119605
Merge pull request #12391 from SuperSandro2000/per-user-stat-chmod
...
Only try to chmod /nix/var/nix/profiles/per-user when necessary
2025-02-20 17:10:24 +01:00
John Ericson
de22f58dfc
Introduce EvalStore::storePath
...
This abstracts over a common case. Good for brevity, and enabling
further experiments.
2025-02-19 21:24:26 -05:00
Eelco Dolstra
ec7dc56f4e
Remove unused variable
2025-02-20 01:09:18 +01:00
Eelco Dolstra
8dc2b2715b
In pure eval mode, restrict rootFS to just the Nix store
...
Note that in pure mode, we don't need to use the union FS even when
using a chroot store, since the user shouldn't have access to the
physical /nix/store.
2025-02-19 23:13:11 +01:00
Eelco Dolstra
4206d95996
Remove sourcePathToStorePath()
...
It's no longer needed now that all store paths inside the evaluator
are logical rather than real paths.
2025-02-19 21:31:25 +01:00
MaxHearnden
cd149b56c7
Set FD_CLOEXEC on sockets created by curl
...
Curl creates sockets without setting FD_CLOEXEC/SOCK_CLOEXEC, this can
cause connections to remain open forever when using commands like `nix
shell`
This change sets the FD_CLOEXEC flag using a CURLOPT_SOCKOPTFUNCTION
callback.
(cherry picked from commit 12d2527276 )
2025-02-19 19:47:45 +00:00
Eelco Dolstra
584ddd1b4d
UnionSourceAccessor: Don't filter out underlying files of the wrong type
...
https://github.com/NixOS/nix/pull/12512#discussion_r1961567140
2025-02-19 13:34:42 +01:00
Eelco Dolstra
99e78c37f7
Use UnionSourceAccessor to mount the chroot store on top of the real store directory
2025-02-19 12:54:09 +01:00
Eelco Dolstra
5b7c240ebd
Add a UnionSourceAccessor
2025-02-19 12:54:09 +01:00
Eelco Dolstra
c3d8799f9f
MountedSourceAccessor: Remove redundant pathExists() method
2025-02-19 12:47:28 +01:00
Eelco Dolstra
774b924398
Add a storeFS accessor for paths resulting from IFD
...
Hopefully fixes #11503 .
2025-02-19 12:47:28 +01:00
Eelco Dolstra
e5e0ce2334
Remove redundant call to canonPath()
...
The CanonPath constructor already does that.
2025-02-19 12:47:28 +01:00
Eelco Dolstra
d7f2c1b7f4
Remove mounted-source-accessor.hh
2025-02-19 10:44:46 +01:00
Eelco Dolstra
0da81343d7
Move MountedSourceAccessor to libutil
2025-02-19 10:44:42 +01:00
Robert Hensing
b175e5bb6d
Write just ./.version on all components
...
This way it's easier to get right. See previous commit.
(cherry picked from commit 3556f6bf4c )
2025-02-19 01:04:04 +01:00
Robert Hensing
21998464b7
Restore detailed Nix CLI version
...
... as intended.
Requirements:
- don't build fresh libraries for each git commit
- have git commit in the CLI
Bug:
- echo ${version} went into the wrong file => use the fact that it's
a symlink, not just for reading but also for writing.
(cherry picked from commit bba4e6b061 )
2025-02-19 01:04:02 +01:00
Ivan Trubach
eb73bfcf73
libstore: fix expected bytes in progress bar
2025-02-18 22:09:05 +03:00
Eelco Dolstra
4055239936
Tagging release 2.26.2
...
-----BEGIN PGP SIGNATURE-----
iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmetA5oTHGVkb2xzdHJh
QGdtYWlsLmNvbQAKCRCBcLRybXGY3g2pB/9JAFyjmaXuccbMTO/6x9qwsWuuXNLk
OQWzfbdUekvsihZZSFZg1r7KqqXHCi64f0nxLPsJ/0oeDWZktJ5KnbV630nuUlDj
ulLCpKdvhWFa8dVx9LiziGwQw4KLx8PjOfwThtQ4DqCWxWEmu6lKkijag9cE+ai4
3mw9YtUjBRxlXyhYLzWz3whLbv37c/m+R8iGS8xm8W260pmei6D0beOIPdfXYBQF
PzPlPORyI08A06uqyA3z7bTxzmSMnzvu0QInCPCKSHzFUnTZPHUYuYStFl28NrZS
fXKK59L0G7QEfdTRAmqQkdHdtPj2RlYFiMN0kQiNLflvKfGGWdi/kvdx
=rRix
-----END PGP SIGNATURE-----
Merge tag '2.26.2' into sync-2.26.2
Tagging release 2.26.2
2025-02-18 19:57:51 +01:00
John Ericson
da5109835b
Merge pull request #12498 from NixOS/fix-cli-fine-version
...
Restore detailed Nix CLI version
2025-02-18 11:34:07 -05:00
Sergei Zimmerman
a004c84e85
Don't override default man search paths
...
By appending a colon to MANPATH NIX_MAN_DIR gets prepended to the
final MANPATH before default search paths.
This makes man still consider default search paths, but prefers
NIX_MAN_DIR (if it exists).
It still makes sense to point NIX_MAN_DIR to a correct location
by moving man pages build from nix-manual.man to nix-cli.man, but
this should fix most common use-cases where nix is installed globally.
(cherry picked from commit 95f16a3275 )
2025-02-18 16:32:42 +00:00
John Ericson
dfb5b2c7cb
Merge pull request #12497 from xokdvium/fix/dont-override-default-man-search-paths
...
Don't override default man search paths
2025-02-18 11:31:01 -05:00
Eelco Dolstra
cca4e8c8c7
Merge pull request #12504 from NaN-git/fix-repl
...
repl: suppress progress bar in printValue()
2025-02-18 17:10:56 +01:00