Commit graph

17188 commits

Author SHA1 Message Date
John Ericson
d25e54d56a
Merge pull request #10733 from alyssais/nix-store-delete
Improve nix-store --delete failure message
2024-05-17 18:41:23 -04:00
John Ericson
bcfc722f81
Merge pull request #10735 from Mic92/more-warnings
Add more compiler warnings
2024-05-17 18:40:36 -04:00
Qyriad
05bc889b89 add and fix -Wignored-qualifiers
Change-Id: I4bffa766ae04dd80355f9b8c10e59700e4b406da
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2024-05-17 19:29:50 +02:00
Qyriad
52a16b7e59 add and fix -Wdeprecated-copy
*so* many warnings, from only two definitions

Change-Id: If2561cd500c05a1e33cce984faf9f3e42a8a95ac
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2024-05-17 19:25:35 +02:00
Alyssa Ross
979a019014
Improve nix-store --delete failure message
On several occasions I've found myself confused when trying to delete
a store path, because I am told it's still alive, but
nix-store --query --roots doesn't show anything.  Let's save future
users this confusion by mentioning that a path might be alive due to
having referrers, not just roots.
2024-05-17 18:20:22 +02:00
Eelco Dolstra
c9e7239e22
Merge pull request #10729 from fidgetingbits/fix-testing-typo
fix typo in testing documentation
2024-05-17 12:51:05 +02:00
fidgetingbits
c66796d460
fix typo in testing documentation 2024-05-17 08:38:57 +08:00
Eelco Dolstra
ba2911b03b
Merge pull request #10723 from prednaz/embedding_the_nix_evaluator_example
fix "Embedding the Nix Evaluator" c api example
2024-05-16 10:14:21 +02:00
Eelco Dolstra
02d393d619
Merge pull request #10725 from prednaz/c_api_docs_improvements
small c api documentation fixes
2024-05-16 10:11:19 +02:00
Philipp Zander
f63292462c document nix_external_print's printer parameter to be an out parameter 2024-05-16 02:55:38 +02:00
Philipp Zander
359043ed0d add missing c api parameter names to documentation 2024-05-16 02:55:38 +02:00
Philipp Zander
449404531d fix "Embedding the Nix Evaluator" c api example 2024-05-16 00:39:39 +02:00
Robert Hensing
303268bb71
Merge pull request #10479 from obsidiansystems/ca-fso-docs
Document file system object content addressing
2024-05-15 22:52:53 +02:00
John Ericson
043135a848 Document file system object content addressing
In addition:

- Take the opportunity to add a bunch more missing hyperlinks, too.

- Remove some glossary entries that are now subsumed by dedicated pages.
  We used to not be able to do this without breaking link fragments, but
  now we can, so pick up where we left off.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2024-05-15 16:28:48 -04:00
Eelco Dolstra
3026613893
Merge pull request #10675 from edolstra/zip-symlinks
Handle zip files containing symlinks
2024-05-15 22:07:22 +02:00
Daniel Ramírez
50bbe22a51
reword nix-env documentation (#10718)
* reword `nix-env` documentation

- added links
- added an overview of package sources
- clarified parsing and matching of package names

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-05-15 19:42:14 +00:00
John Ericson
bbe780b137
Merge pull request #10712 from fricklerhandwerk/reword-nix-store-import-docs
reword documentation on `nix-store --import`
2024-05-15 13:17:36 -04:00
Eelco Dolstra
45c83cd430
Merge pull request #10716 from fricklerhandwerk/documentation-labels
labeler: capture all docs files
2024-05-15 15:13:40 +02:00
Valentin Gagarin
6907eaad4f reword documentation on nix-store --import
- add links to definitions of terms
- one sentence per line
- be more specific about which store is used for the import
- clearly distinguish store paths and store objects
- make a recommendation to use `nix-copy-closure` for efficient SSH transfers
2024-05-15 01:59:07 +02:00
Valentin Gagarin
0c2c260180 labeler: capture all docs files 2024-05-15 01:40:25 +02:00
Valentin Gagarin
49bd408c10
remove link to relocated manual page (#10703)
fix old anchor redirects to point to the correct location
2024-05-14 21:18:40 +00:00
Eli Flanagan
05ad4e8806
doc: convention improvements for copying closure (#10702)
* doc: convention improvements for copying closure

   use -P, which only considers executables but not shell builtins

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-05-14 20:38:54 +00:00
Valentin Gagarin
2f0031aedc
Revert "manual: fold sidebar sections" (#10698)
The original change arguably reduced ergonomics of navigation, since menu items weren't ctrl+f searchable any more.
2024-05-14 19:23:29 +00:00
Eelco Dolstra
52200474e1
Merge pull request #10697 from edolstra/fix-test-root-removal
tests/functional/common/init.sh: Make $TEST_ROOT writable before removing it
2024-05-14 16:47:21 +02:00
Eelco Dolstra
1da18e85ba tests/functional/common/init.sh: Make $TEST_ROOT writable before removing it
$TEST_ROOT typically contains read-only files/directories (e.g. the
Nix store). So we have to make it writable first.
2024-05-14 16:23:08 +02:00
Eelco Dolstra
d352c52111
Merge pull request #10696 from edolstra/remove-verbose
tests/nixos/containers/containers.nix: Remove superfluous -v
2024-05-14 14:50:38 +02:00
Eelco Dolstra
9a58d90c73 tests/nixos/containers/containers.nix: Remove superfluous -v 2024-05-14 14:27:09 +02:00
Eelco Dolstra
39f7cbdc7c
Merge pull request #10691 from DeterminateSystems/commit-lock-file-summary
Rename commit-lockfile-summary to commit-lock-file-summary for consistency
2024-05-14 10:06:48 +02:00
Eelco Dolstra
1623249745
Merge pull request #10684 from siddhantk232/rm-readDirectory
Inline the usage of `nix::readDirectory` and remove it
2024-05-13 15:41:59 +02:00
Graham Christensen
e1e041ed8f Rename commit-lockfile-summary to commit-lock-file-summary for consistency 2024-05-13 09:23:59 -04:00
Valentin Gagarin
7822ecbadf tests: always clean the test directory
previously the test directory could have been left untouched before executing
a test when `init.sh` was not run - and sometimes it isn't
supposed to be run - which made the test suite highly stateful and thus
behaving surprisingly on multiple runs.
2024-05-13 15:19:49 +02:00
Valentin Gagarin
33ca905cdb tests: simplify initialisation and wiring
pararameterisation is not actually needed the way things are currently
set up, and it confused me when trying to understand what the code does.

all but one test sources vars-and-functions.sh, which nominally only
defines variables, but in practice is always coupled with the actual
initialisation. while the cleaner way of making this more legible would
be to source variables and initialisation separately, this would produce
a huge diff.

the change requires a few small fixes to keep the tests working:

- only create test home directory during initialisation

  that vars-and-functions.sh wrote to the file system seems not write

- fix creation of the test directory

  due to statefulness, the test home directory was implicitly creating
  the test root, too. decoupling that made it apparent that this was
  probably not intentional, and certainly confusing.

- only source vars-and-functions.sh if init.sh is not needed

  there is one test case that only needs a helper function but no
  initialisation side effects

- remove some unnecessary cleanups and split parts of re-used test code

  there were confusing bits in how initialisation code was repurposed,
  which break if trying to refactor the outer layers naively...
2024-05-13 15:19:49 +02:00
siddhantCodes
39e8aad446 Merge branch 'master' of github.com:NixOS/nix 2024-05-13 18:43:12 +05:30
Eelco Dolstra
56abd341bb
Merge pull request #10685 from siddhantk232/fs-cleanup
inline the usage of `nix::renameFile`, `nix::getFileType` and `nix::copyFile`
2024-05-13 14:12:10 +02:00
siddhantCodes
62e1ea2f4b use path for from arg in nix::copyFile 2024-05-13 16:10:21 +05:30
siddhantCodes
4d0777ca69 fix: copy fileName before calling std::distance 2024-05-13 15:36:00 +05:30
Eelco Dolstra
d8559cad8d
Merge pull request #10686 from DeterminateSystems/long-commit-message
git putFile: support flake maximalists
2024-05-13 10:22:57 +02:00
Graham Christensen
8b5e8f4fba git putFile: support flake maximalists
Passing the commit message as an argument causes update failures on repositories with lots of flake inputs. In some cases, the commit message is over 250,000 bytes.
2024-05-12 16:42:43 -04:00
Robert Hensing
c940d11fb0
Merge pull request #10666 from tie/derivation-outputs-drv-path
Forbid drvPath in strictDerivation outputs attribute
2024-05-12 21:14:32 +02:00
siddhantCodes
ccf94545db rename copy -> copyFile and remove old copyFile
the old `copyFile` was just a wrapper that was calling the `copy`
function. This wrapper function is removed and the `copy` function is
renamed to `copyFile`.
2024-05-12 19:20:17 +05:30
siddhantCodes
d3b7367c80 inline usage of nix::getFileType and remove it 2024-05-12 18:58:05 +05:30
siddhantCodes
4537663740 inline the usage of nix::renameFile
use `std::filesystem::rename` everywhere and remove `nix::renameFile`
2024-05-12 18:40:16 +05:30
siddhantCodes
1db7d1b840 inline the usage of nix::readDirectory
`nix::readDirectory` is removed. `std::filesystem::directory_iterator`
is used directly in places that used this util.
2024-05-12 17:42:18 +05:30
John Ericson
87ab3c0ea4
Merge pull request #10674 from nix-windows/local-store-on-windows
Build the local store on Windows
2024-05-10 13:26:17 -04:00
John Ericson
e0ff8da9d5 Build the local store on Windows
Fixes #10558

Co-Authored-By: Eugene Butler <eugene@eugene4.com>
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2024-05-10 13:05:23 -04:00
John Ericson
0998a3ac01 Remove LocalStore::OptimiseStats::blocksFreed as it is dead code 2024-05-10 12:55:21 -04:00
Eelco Dolstra
cb7224a8c2
Merge pull request #10676 from edolstra/require-docker-images
Die rather than warn if a Docker image is missing
2024-05-10 11:55:46 +02:00
Eelco Dolstra
6df07f3e81 Die rather than warn if a Docker image is missing
The warning was done to handle older Nix releases that didn't have
Docker images (091f232896), but this was
a bad idea because it causes us to silently skip uploading Docker
images if e.g. Hydra hasn't finished building them yet.

Issue #10648.
2024-05-10 11:31:36 +02:00
Eelco Dolstra
9951e14ae0 Handle zip files containing symlinks
In streaming mode, libarchive doesn't handle symlinks in zip files
correctly. So write the entire file to disk so libarchive can access
it in random-access mode.

Fixes #10649. This was broken in cabee98152.
2024-05-09 19:33:09 +02:00
Eelco Dolstra
de8c3c034c
Merge pull request #10668 from edolstra/unit-prefixes
Support unit prefixes in configuration settings
2024-05-09 19:29:36 +02:00