Commit graph

174 commits

Author SHA1 Message Date
Jade Lovelace b7665da7e1 dockerTools: support meta attribute
I want to be able to set descriptions on my docker image derivations
since these can be ingested by various tooling for helpfulness.
2025-10-30 15:53:00 -07:00
Sebastián Mancilla 249233af0d
dockerTools: Comment tidy-ups, and documentation update (#450384) 2025-10-19 22:46:23 +00:00
Matt Sturgeon 237b3cb5ce
testers.testEqualContents: add checkMetadata option
Allows ignoring file metadata differences (permissions, ownership)
when comparing files.

This is especially useful on darwin, where we often run into subtle
issues like:

    -Device: 1,23 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ wheel)
    +Device: 1,23 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 350/ nixbld)
2025-10-17 16:18:56 +01:00
Morgan Jones b6659f5d61
doc: add hunks to fetchpatch 2025-10-12 23:47:56 -07:00
Joel Holdsworth db13980434
dockerTools: Updated Docker and OCI spec links
Co-authored-by: commiterate <111539270+commiterate@users.noreply.github.com>
2025-10-09 11:04:44 -07:00
Jasi 55f59a63a9
doc/fetchers: expand fetchFromBitbucket docs
The approach used to expand the documentation for `fetchFromBitbucket`
purposefully mimics the documentation for `fetchFromGitHub` with the
goal of making sure the reader is aware of all of the fetcher's
capabilities without having to read the source code.
2025-10-05 10:18:54 -04:00
nixpkgs-ci[bot] 6dd046bf75
Merge master into staging-next 2025-10-03 18:05:39 +00:00
Philip Taron 885fd34de3
fetchFromGitHub: use fetchgit when the rootDir option is set (#446709) 2025-10-03 17:43:22 +00:00
Michael Daniels 42637c305f
fetchFromGitHub: use fetchgit when the rootDir option is set
This argument was added to fetchgit in #427165,
and it's not supported by fetchzip.

Co-authored-by: Philip Taron <philip.taron@gmail.com>
2025-10-02 21:17:23 -04:00
K900 4999ae577c Merge remote-tracking branch 'origin/master' into staging-next 2025-09-30 21:47:55 +03:00
NAHO 854c5a5460
doc: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd --type file . doc --exec-batch sed --in-place --regexp-extended "
      s/\<builtins\.($(
        printf '%s\n' "${builtins[@]}" |
          paste --delimiter '|' --serial -
      ))\>/\1/g
    "

    nix fmt
2025-09-30 09:02:03 +02:00
nixpkgs-ci[bot] 8c2af3a8bf
Merge master into staging-next 2025-09-23 09:00:10 +00:00
Arne Keller d6199f835b
doc/build-helpers: fix appimage example where postExtract is used (#402756) 2025-09-23 08:48:42 +02:00
nixpkgs-ci[bot] b7962594cc
Merge staging-next into staging 2025-09-10 06:32:10 +00:00
Ben Siraphob 1e82a2f358
doc: fix typos 2025-09-09 13:14:34 +07:00
Defelo c2ec9234e8
fetchRadiclePatch: init 2025-08-30 17:26:06 +02:00
Ben Siraphob cc5b731ed3
doc: fix typos 2025-08-27 11:46:26 -07:00
Robert Hensing 8d128a4138 testers.testEqualContents: add postFailureMessage parameter
Add an optional postFailureMessage parameter to testEqualContents that allows
users to provide additional context when tests fail. This is particularly useful
for providing instructions on how to update expected results when they change
intentionally.

The message is displayed after the standard failure output, helping maintainers
understand what to do next when a test fails.
2025-08-24 20:09:54 +02:00
Defelo 0f4642c796
fetchFromRadicle: init 2025-08-20 15:29:26 +02:00
Johannes Kirschbauer 324edb5654
nixpkgs-manual: doc/build-helpers: fix broken links to derivation's advanced attributes (#427734) 2025-08-18 15:08:24 +02:00
Alan Urmancheev 618155ad67 doc/build-helpers: fix broken links to derivation's advanced attributes 2025-08-17 01:12:24 +04:00
Philip Taron 754ee2fc40
fetchgit: Add rootDir argument (#427165) 2025-08-10 17:38:43 -07:00
Yuriy Taraday 34612851db fetchgit: Add rootDir argument
With this argument fetchgit will make a subdirectory of the Git
repository a root of the resulting store path. This is helpful for
dealing with monorepos where many projects are in separate directories
and don't need a new source hash every time the monorepo is updated.

Commit hash is removed from the name of the derivation to prevent it
from changing the store path when nothing in the subdirectory changes.
2025-08-08 16:20:05 +02:00
Philip Taron 0ca32f3372
tor: add tor.proxyHook (#426763) 2025-07-25 15:16:39 -07:00
Ryan Hendrickson a3947d986f tor: add tor.proxyHook
tor.proxyHook is a setup hook intended for use with HTTP-based fetchers,
enabling them to download from .onion addresses using Tor as a proxy.
2025-07-24 13:25:04 -04:00
Wolfgang Walther 62fe016519
treewide: run treefmt with mdcr/nixfmt 2025-07-24 13:52:31 +02:00
Philip Taron 8279ffe622
treewide: specify that mebibytes are used when it's ambiguous (#424169) 2025-07-11 12:29:33 -07:00
Axel Karjalainen 7159ab6f43 treewide: specify where mebibytes are used when it's ambiguous 2025-07-11 00:44:23 +03:00
Yueh-Shun Li ef2f8315bf fetchhg: make argument hash overridable 2025-07-09 04:08:00 +08:00
Nick Cao abe0e73a27
testers.hasCmakeConfigModules: init (#410516) 2025-06-03 20:40:35 -04:00
qbisi 11291afcb3 testers.hasCmakeConfigModules: init 2025-05-31 04:24:52 +08:00
Tim Black 1247031689 pkgs/build-support/fetchgit: add fetchTags parameter
Added fetchTags feature to fetchgit, explicit and clear support for
fetching all tags after the source tree fetch completes. Doing this at
build-time in the fetcher is required for packages that invoke commands
like 'git describe' which require tags, and since the nix store is
read-only by design, it is not possible to git fetch --tags at
activation- or run-time. This feature may have been possible by
specifying a postFetch option including calling git fetch --tags,
however doing so obfuscates the solution to this very real problem.
Explicit support for fetching tags should be a first class citizen just
like fetching other refs.
2025-05-28 16:47:34 -07:00
Niklas Hambüchen 45991097c5 manual: Use a postPatch instead of a patchPhase 2025-05-24 22:10:55 +00:00
Niklas Hambüchen ee6c2bd2eb doc: Fix missing pre/post hooks everywhere 2025-05-24 13:22:41 +00:00
Adam Dinwoodie d95d3724d8 fetchgit: add preFetch hook
This allows running code to change the environment before the
nix-prefetch-git script is run.  In particular, it allows setting things
like NIX_PREFETCH_GIT_CHECKOUT_HOOK, which allows additional code to be
run before deleting the .git directory.

This also means there's potentially value in performing a deep clone
then removing the .git directory, so remove the assertion that prevents
doing so.
2025-05-06 14:14:26 +01:00
FliegendeWurst 855da9ad35 doc/build-helpers: don't overuse pname
See #277994
2025-04-29 09:41:46 +02:00
FliegendeWurst 244b31e61b doc/build-helpers: fix appimage example where postExtract is used 2025-04-29 09:41:46 +02:00
Pol Dellaiera 3218a4204f doc: do not reuse pname 2025-04-21 07:02:49 +02:00
Pol Dellaiera bcea0cf344 doc: update Nix code snippets format
Command: `mdcr --config doc/tests/mdcr-config.toml doc/`
2025-04-17 01:30:34 +02:00
Pol Dellaiera 5d979e79ce doc: fix various nix snippets 2025-04-17 01:30:34 +02:00
Connor Baker 871cda0b06
testers.shellcheck: refactor, update docs, and simplify tests (#385940) 2025-03-07 20:53:33 -08:00
Connor Baker 3de1aeac1f testers.shellcheck: refactor and update docs 2025-03-08 00:15:22 +00:00
Philip Taron cb26667f94
testers.shfmt: init (#385939) 2025-03-07 15:45:30 -08:00
Connor Baker 6f52f21ad2 testers.shfmt: init 2025-03-05 12:40:58 -08:00
Connor Baker 731b74db8b testers.testEqualArrayOrMap: use buildCommandPath and change checkSetupScript argument to script 2025-03-03 16:29:40 +00:00
Connor Baker 261693fe5d testers.testEqualArrayOrMap: init 2025-03-03 16:29:11 +00:00
Connor Baker f71332b2ae testers.testBuildFailure': output is created so long as checks succeed 2025-02-27 15:56:45 +00:00
Connor Baker 38745b132d testers.testBuildFailure': init 2025-02-27 15:56:45 +00:00
Philip Taron 6ea4ff601e
mkBinaryCache: support zstd and none as compression methods (#376365) 2025-02-26 09:05:25 -08:00
Peder Bergebakken Sundt d525eb5838 treewide: fix typos
done with `fd \\\.md$ . --type f -x typos --write-changes`
2025-02-22 02:02:07 +01:00