Eelco Dolstra
c902a299a8
Merge pull request #12164 from NixOS/mergify/bp/2.25-maintenance/pr-12157
...
parsePathFlakeRefWithFragment(): Handle 'path?query' without a fragment (backport #12157 )
2025-01-10 18:11:30 +01:00
Eelco Dolstra
faecb6e306
parsePathFlakeRefWithFragment(): Handle 'path?query' without a fragment
...
Commands like `nix flake metadata '.?submodules=1'` ignored the query
part of the URL, while `nix build '.?submodules=1#foo'` did work
correctly because of the presence of the fragment part.
(cherry picked from commit 28caa35a97
)
2025-01-10 13:37:23 +01:00
Philipp Otterbein
4bf020de50
toJSON: re-throw serialization exception
...
(cherry picked from commit 4a2310a3a0
)
2025-01-10 09:42:14 +00:00
Robert Hensing
336fdaa119
test: Avoid regressing accidental use of weakly_canonical instead of makeParentCanonical
...
I'd messed up a rebase in my previous iteration, causing `weakly_canonical` to reappear,
but not trigger a test failure.
These two functions behave similarly when the argument is a path that points to a broken
symlink. `weakly_canonical` would not resolve it because the target doesn't exist, and
`makeParentCanonical` would not resolve it, because it never resolves the final path
element.
This new test case now also tests a valid symlink, "differentiating" the two.
(cherry picked from commit 4c74d679b6
)
2025-01-07 06:03:58 +00:00
Robert Hensing
3fbcd8d7ba
fix: Resolve CLI parent symlinks before adding to store
...
Fixes https://github.com/NixOS/nix/issues/11941
(cherry picked from commit ddbbf53767
)
2025-01-07 06:03:57 +00:00
Robert Hensing
255379daf1
fix: Handle symlinks and FIFOs in nix hash
where possible
...
Fixes https://github.com/NixOS/nix/issues/11756
Fixes https://github.com/NixOS/nix/issues/11681
(cherry picked from commit 36563c69a4
)
2025-01-07 06:03:56 +00:00
Robert Hensing
9f2df5899c
tests: Make unusual logging test conditional on fixed daemon version
...
(cherry picked from commit c783cd22ac
)
2024-12-10 00:16:09 +01:00
Robert Hensing
a867747c05
test: Move unusual-logging to run only in logging test case
...
(cherry picked from commit 1421420e86
)
2024-12-09 21:40:37 +00:00
Robert Hensing
b1058ee0d2
tests/functional/dependencies.nix: Check that we tolerate syntax and type errors
...
(cherry picked from commit 1485937b89
)
2024-12-09 21:40:27 +00:00
Linus Heckemann
7c98167eab
libutil: handle json builder log messages with unexpected format
...
Before this change, expressions like:
with import <nixpkgs> {};
runCommand "foo" {} ''
echo '@nix {}' >&$NIX_LOG_FD
''
would result in Lix crashing, because accessing nonexistent fields of
a JSON object throws an exception.
Rather than handling each field individually, we just catch JSON
exceptions wholesale. Since these log messages are an unusual
circumstance, log a warning when this happens.
Fixes #544 .
Change-Id: Idc2d8acf6e37046b3ec212f42e29269163dca893
(cherry picked from commit e55cd3beea710db727fd966f265a1b715b7285f3)
(cherry picked from commit ee03fd478e
)
2024-12-09 21:40:23 +00:00
Robert Hensing
c797848b88
tests/functional/dependencies.nix: Refactor, replace arcane let
...
(cherry picked from commit e82ff51726
)
2024-12-09 21:40:19 +00:00
Eelco Dolstra
97f0c68389
nix hash convert: Don't fail on uppercase base-16 hashes
...
(cherry picked from commit 33b645cedf
)
2024-12-05 22:30:32 +00:00
Eelco Dolstra
26741bcfda
nix hash convert: Support SRI hashes that lack trailing '=' characters
...
Fixes #11996 .
(cherry picked from commit 52f1cd0595
)
2024-12-05 22:30:32 +00:00
Eelco Dolstra
c381199e97
Merge pull request #11964 from NixOS/mergify/bp/2.25-maintenance/pr-11901
...
tests/functional/flakes/develop.sh: Don't hang (backport #11901 )
2024-11-26 13:35:14 +01:00
Eelco Dolstra
1dbe60e073
tests/functional/flakes/develop.sh: Don't hang
...
The bash shell started by `nix develop` waited forever for stdin
input.
Fixes #11827 .
(cherry picked from commit 428af8c66f
)
2024-11-26 11:19:33 +00:00
Robert Hensing
3bc3e55736
Fix issue 11892
...
It seems that I copied the expression for baseDir thoughtlessly and
did not come back to it.
- `baseDir` was only used in the `fromArgs` branch.
- `fromArgs` is true when `packages` is true.
(cherry picked from commit c4b95dbdd1
)
2024-11-26 11:19:29 +00:00
Jörg Thalheim
aeffdeffc8
Merge pull request #11826 from DeterminateSystems/revert-11804
...
Revert "Merge pull request #11804 from obsidiansystems/remove-old-make"
2024-11-08 12:04:55 +01:00
Eelco Dolstra
47bffe20e4
Revert "Merge pull request #10980 from kjeremy/flake-show-description"
...
This reverts commit 1c5ad159d6
, reversing
changes made to 67de193277
.
This reverts commit ce4e4a158e
, reversing
changes made to 43e82c9446
.
2024-11-07 18:12:04 +01:00
Eelco Dolstra
67d231c046
Revert "Merge pull request #11804 from obsidiansystems/remove-old-make"
...
This reverts commit 619eeb658a
, reversing
changes made to 1af94bf471
.
2024-11-07 13:46:37 +01:00
John Ericson
f7591bc6ed
Make config.nix
shims
...
As requested in https://github.com/NixOS/nix/pull/11792#discussion_r1827034428
2024-11-06 16:09:18 -05:00
John Ericson
e70c9bb06a
Remove old build system
2024-11-06 16:09:18 -05:00
Robert Hensing
c6c8d2af65
refact: Remove unused arguments
2024-11-06 19:45:19 +01:00
Robert Hensing
3112e59734
ProgressBar::ask: Accept EOF as a no
...
This may occur when stderr is a tty but stdin is empty.
E.g.
$ nix build </dev/null
error: unexpected EOF reading a line
These stdio handles are how some non-interactive sandboxes behave,
including the Nix build sandbox and Hercules CI Effects.
2024-11-06 19:45:19 +01:00
Brian McKenna
a9c417dbab
msys2: use ls.exe instead of coreutils.exe for coreutils directory
2024-11-06 00:18:59 +11:00
John Ericson
142f55457b
Test against tests using Meson-built Nix
2024-11-04 12:17:44 -05:00
John Ericson
f018a0b0c8
Make functional tests on NixOS use Meson not Make
...
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-11-04 10:39:09 -05:00
Bryan Honof
affd2dbc6c
test(functional): add tests for new environment operation flags
2024-11-04 14:41:33 +01:00
Bryan Honof
0b790b4849
feat: add flag set-env-var
to MixEnvironment
2024-11-04 14:02:29 +01:00
John Ericson
30f4f21887
Merge pull request #11794 from nix-windows/windows-functional/nul-character
...
Rename nul.nar because nul is a special name in Windows
2024-11-03 20:45:35 -05:00
John Ericson
9d2ed0a7d3
No longer copy functional tests to the build dir
...
This should make `_NIX_TEST_ACCEPT=1` work again, fixing #11369 .
Progress on #2503
2024-11-03 16:42:38 -05:00
Brian McKenna
190d0d661e
Rename nul.nar because nul is a special name in Windows
...
For example, we can't even clone the repository on Windows!
error: invalid path 'tests/functional/nul.nar'
fatal: unable to checkout working tree
2024-11-03 17:02:47 +11:00
Tim Van Baak
39fe52a126
Replace shebang with shellcheck directive
2024-10-31 06:46:58 -07:00
Tim Van Baak
a530939fe4
Add check for one nix-build-* directory
2024-10-31 06:46:33 -07:00
Tim Van Baak
a75b082a28
Expand shellcheck coverage in functional tests
...
Ref NixOS/nix#10795
2024-10-30 08:27:06 -07:00
Robert Hensing
3db75b0060
Merge pull request #11729 from emhamm/nix-tests-help-only-if-docu
...
nix/tests: run test help.sh only if nix is built with documentation
2024-10-23 19:41:44 +02:00
Marian Hammer
85b0cd320a
nix/tests: run test help.sh only if nix is built with documentation
...
tests/functional/help.sh calls nix-* commands with option --help
if nix is built without documentation the option --help throws an error
because the man page it wants to display is missing
2024-10-22 14:15:56 +02:00
Jörg Thalheim
2105574702
fix env-vars beeing written to /tmp
...
This overall seems like insecure tmp file handling to me. Because other
users could replace files in /tmp with a symlink and make the nix-shell
override other files.
fixes https://github.com/NixOS/nix/issues/11470
2024-10-22 08:21:18 +00:00
Eelco Dolstra
facc502bc8
Merge pull request #11695 from DeterminateSystems/override-lastModified
...
path fetcher: Allow the lastModified attribute to be overriden again
2024-10-16 18:03:29 +02:00
Eelco Dolstra
de1289229f
Merge pull request #11669 from obsidiansystems/doc-source-rename
...
Make the subproject dir `src` again
2024-10-16 17:30:40 +02:00
Eelco Dolstra
781ff7672e
Add test
2024-10-16 17:18:07 +02:00
Robert Hensing
806a91f7bf
Merge pull request #11688 from roberth/meson-tidy
...
Clean up the `package.nix` files
2024-10-14 17:40:46 +02:00
John Ericson
eb7d7780b1
Rename doc/manual{src -> source}
...
This is needed to avoid this
https://github.com/mesonbuild/meson/issues/13774 when we go back to
making our subproject directory `src`.
2024-10-14 11:21:24 -04:00
Eelco Dolstra
a7b9877da9
Add a test
2024-10-14 14:10:36 +02:00
Robert Hensing
15e3e1543b
packaging: Add mkMeson{Library,Executable}
...
and:
- move pkg-config out of mkMesonDerivation, for components that don't
produce any executable code
2024-10-13 23:17:54 +02:00
Eelco Dolstra
4202d4fc81
Merge pull request #11664 from DeterminateSystems/show-sandbox-setup-error
...
Propagate errors from early sandbox initialization to the parent
2024-10-10 17:01:37 +02:00
Eelco Dolstra
0be70469dc
Propagate errors from early sandbox initialization to the parent
...
This should help with issues like
https://github.com/DeterminateSystems/nix-installer/issues/1227 , which
currently just print "unable to start build process".
2024-10-09 20:53:43 +02:00
John Ericson
0db8ff820b
More comment rewording as requested
...
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2024-10-09 11:07:15 -04:00
John Ericson
57a478572d
Rename baseNativeBuildInputs
...
as requested
Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2024-10-09 11:07:12 -04:00
Robert Hensing
26c3fc11ea
Merge pull request #11609 from yannham/fix/nar-test-zfs
...
Fix NAR tests on Linux+ZFS+normalize
2024-10-07 16:16:15 +02:00
Robert Hensing
011fa9e085
tests/functional/nars.sh: Fail test if touch fails, comment
...
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
2024-10-07 14:54:35 +02:00