Commit Graph
917623 Commits
Author SHA1 Message Date
Jörg Thalheim dbc8a3bc5c prefetch-npm-deps: normalize packuments for deterministic hashes
Fixed-output derivations for npm dependencies fail with hash mismatches
when rebuilt on different days. The root cause is that npm registry
metadata (packuments) contain volatile fields that change whenever
upstream publishes a new version.

For example, the TypeScript packument changes daily due to nightly
releases, even though the lockfile pins a specific version. The cached
packument includes _rev, time, modified, and the full versions list -
all of which drift over time.

Strip these volatile fields and filter the versions map to only include
versions actually referenced in the lockfile.

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
2026-01-04 13:57:43 +00:00
Jörg Thalheim ab89ffc4b1 fetchNpmDeps: rename cacheVersion to fetcherVersion
To align with pnpm tooling.
2026-01-03 18:45:33 +00:00
Jörg Thalheim 0cb5de2d62 prefetch-npm-deps: use package name field for aliases
npm lockfiles can contain package aliases where the lockfile key differs
from the actual package name (e.g., "string-width-cjs" aliasing
"string-width"). Previously we always used the lockfile key, causing us
to fetch packuments for the wrong package.

Use the package's own "name" field when present, falling back to the
lockfile key. This ensures we fetch the correct packument for aliased
packages, fixing non-deterministic builds where the wrong packument
fetch could succeed or fail depending on network timing.
2025-12-31 07:53:32 +00:00
Jörg Thalheim 40f1b80ac7 prefetch-npm-deps: clarify backwards compatibility comment 2025-12-31 06:57:27 +00:00
Jörg Thalheim 3fb4fe294b prefetch-npm-deps: extract package names from lockfile keys
The current approach parses tarball URLs to extract package names for
packument fetching. This is fragile as it only handles npmjs.org URLs
and requires special-casing other registries.

Use lockfile keys directly instead. The lockfile already contains the
canonical package names in the form "node_modules/@scope/name", so we
can simply strip the prefix rather than parsing URLs.

This handles all registries uniformly and eliminates the URL parsing
code along with its tests.
2025-12-31 06:37:24 +00:00
Winter d028ea9cd8 npmConfigHook: suggest cache v2 when npm install fails 2025-12-31 00:37:52 -05:00
Winter f297c444c2 npmConfigHook: always make cache writable when using cache v2 2025-12-31 00:37:52 -05:00
Winter 0b66fed9d7 buildNpmPackage: add diagnostic for cache version mismatch 2025-12-31 00:37:52 -05:00
Jörg ThalheimandWinter cd638a9529 doc: add release note for buildNpmPackage packument support
Document the new npmDepsCacheVersion option that enables packument
caching for npm workspaces support.
2025-12-31 00:37:52 -05:00
Jörg ThalheimandWinter 5c99ffcb8e prefetch-npm-deps: add cacheVersion for packument support
Add a cacheVersion parameter to fetchNpmDeps and npmDepsCacheVersion to
buildNpmPackage. When set to 2, prefetch-npm-deps will also fetch and
cache packuments (package metadata) in addition to tarballs.

npm can request packuments with two different Accept headers:
- corgiDoc: abbreviated metadata (default)
- fullDoc: full metadata (used for workspaces)

npm's cache policy requires headers to match, so we cache both versions.

This is opt-in via cacheVersion to avoid breaking existing hashes.
Set npmDepsCacheVersion = 2 for projects using npm workspaces.

Also fix cacache index format to properly separate multiple entries
with newlines, and update map_cache() to parse multi-line index files.
2025-12-31 00:37:52 -05:00
nixpkgs-ci[bot]andGitHub 8ebf0e3108 Merge staging-next into staging 2025-12-25 00:18:49 +00:00
nixpkgs-ci[bot]andGitHub f64cb9db01 Merge master into staging-next 2025-12-25 00:18:14 +00:00
Gergő GutyinaandGitHub 657425eae2 golines: prevent building of the generate binary (#469537) 2025-12-25 00:09:57 +00:00
Gergő GutyinaandGitHub 5c8940ed53 python3Packages.langchain-chroma: 1.0.0 -> 1.1.0 (#471616) 2025-12-24 23:57:53 +00:00
Gergő GutyinaandGitHub 41cff23645 nitrokey-app2: 2.4.1 -> 2.4.3 (#471194) 2025-12-24 23:52:27 +00:00
Gergő GutyinaandGitHub 526d578618 python3Packages.python-sat: 1.8.dev24 -> 1.8.dev25 (#451052) 2025-12-24 23:50:57 +00:00
Gergő GutyinaandGitHub ef1fdc7177 python3Packages.langchain-google-genai: 4.0.0 -> 4.1.1 (#471910) 2025-12-24 23:44:58 +00:00
Gergő GutyinaandGitHub 3c19350ad9 angie: 1.10.2 -> 1.10.3 (#461565) 2025-12-24 23:42:51 +00:00
Gergő GutyinaandGitHub 982b0811ef ironbar: 0.17.1 -> 0.18.0 (#471935) 2025-12-24 23:40:24 +00:00
Yueh-Shun LiandGitHub c16f38e589 fetchFromGitHub: converge arguments that determines useFetchGit (#456226) 2025-12-24 23:39:52 +00:00
Felix BühlerandGitHub b08fd1a2e7 freshrss: 1.27.1 -> 1.28.0 (#473921) 2025-12-24 23:34:23 +00:00
Gergő GutyinaandGitHub 13ca85fa94 grafanaPlugins.grafana-pyroscope-app: 1.12.0 -> 1.14.2 (#468259) 2025-12-24 23:31:19 +00:00
Gergő GutyinaandGitHub 7f0c36ce8a portfolio: 0.80.4 -> 0.81.0 (#472776) 2025-12-24 23:23:43 +00:00
Gergő GutyinaandGitHub 1dc7ff8f1c python3Packages.atproto: 0.0.63 -> 0.0.65 (#470451) 2025-12-24 23:21:46 +00:00
Gergő GutyinaandGitHub c54fb0f20c python3Packages.libipld: 3.2.0 -> 3.3.2 (#467354) 2025-12-24 23:20:17 +00:00
Philip TaronandGitHub 25fe5b435e llama-cpp: 7445 -> 7527 (#473838) 2025-12-24 23:20:00 +00:00
nixpkgs-ci[bot]andGitHub 9db3ffa75c atlas: 0.38.0 -> 1.0.0 (#473928) 2025-12-24 23:13:38 +00:00
7c6f434candGitHub 338872f1fa widelands: 1.2.1 -> 1.3 (#473917) 2025-12-24 23:11:28 +00:00
Yohann BonifaceandGitHub 36bbd16fea bootdev-cli: 1.21.1 -> 1.22.0 (#473924) 2025-12-24 23:02:43 +00:00
Tomodachi94andGitHub 2a45ae2edd postcss: migrate from nodePackages (#473891) 2025-12-24 22:52:03 +00:00
zowoqandGitHub b1ea7754f1 terraform-providers.digitalocean_digitalocean: 2.71.0 -> 2.72.0 (#473939) 2025-12-24 22:49:17 +00:00
zowoqandGitHub c2e89001de terraform-providers.linode_linode: 3.6.0 -> 3.7.0 (#473886) 2025-12-24 22:49:09 +00:00
Gergő GutyinaandGitHub 4f97ebc4b7 nixos/n8n: fix malformed env vars (#460609) 2025-12-24 22:48:57 +00:00
Yueh-Shun LiandGitHub b3cc0b92c6 vigra: 1.12.2 -> 1.12.3 (#473927) 2025-12-24 22:38:27 +00:00
Bjørn ForsmanandGitHub 9affda6bcd nixos/gnome: enable ibus to fix keyboard handling (#473607) 2025-12-24 22:32:23 +00:00
nixpkgs-ci[bot]andGitHub 99a4369a87 mktxp: 1.2.14 -> 1.2.16 (#459703) 2025-12-24 22:16:59 +00:00
kirillrdyandGitHub 4f0a858f93 python3Packages.lance-namespace-urllib3-client: 0.3.2 -> 0.4.0 (#473674) 2025-12-24 22:13:39 +00:00
ColinandGitHub 4a958f5f5a mpvScripts.sponsorblock-minimal: 0-unstable-2025-09-09 -> 0-unstable-2025-12-21 (#473903) 2025-12-24 22:05:09 +00:00
nixpkgs-ci[bot]andGitHub 2d0af88fab go-passbolt-cli: 0.3.2 -> 0.4.0 (#473845) 2025-12-24 22:03:20 +00:00
R. Ryantm 24d11f6fea terraform-providers.digitalocean_digitalocean: 2.71.0 -> 2.72.0 2025-12-24 21:48:02 +00:00
Michael DanielsandGitHub 33ccc2e6f3 python3Packages.langgraph-sdk: 0.2.15 -> 0.3.0; python3Packages.langgraph: 1.0.4 -> 1.0.5; python3Packages.langgraph-cli: 0.4.9 -> 0.4.11 (#472132) 2025-12-24 21:33:11 +00:00
nixpkgs-ci[bot]andGitHub 114d134309 lux-cli: 0.22.2 -> 0.22.3 (#473923) 2025-12-24 21:16:41 +00:00
R. Ryantm 058cb05c15 atlas: 0.38.0 -> 1.0.0 2025-12-24 20:50:24 +00:00
Thiago Kenji OkadaandGitHub 5d2218aaeb libretro.ppsspp: 0-unstable-2025-12-16 -> 0-unstable-2025-12-22 (#473899) 2025-12-24 20:48:05 +00:00
Yohann BonifaceandGitHub 2432614562 python3Packages.dashscope: 1.25.4 -> 1.25.5 (#473680) 2025-12-24 20:43:29 +00:00
Yohann BonifaceandGitHub c6c1d50c61 htb-toolkit: 0-unstable-2025-08-12 -> 0-unstable-2025-12-19 (#473787) 2025-12-24 20:42:53 +00:00
nixpkgs-ci[bot]andGitHub 6687036a7f matrix-conduit: 0.10.9 -> 0.10.10 (#473724) 2025-12-24 20:42:49 +00:00
Bjørn ForsmanandGitHub 2f467310d3 easyeffects: 8.0.8 -> 8.0.9 (#473893) 2025-12-24 20:37:35 +00:00
Fabian AffolterandGitHub 0997ad8d6e python3Packages.leanblueprint: 0.0.19 -> 0.0.20 (#473725) 2025-12-24 20:16:57 +00:00
Fabian AffolterandGitHub e04572f8ac python3Packages.falconpy: 1.5.4 -> 1.5.5 (#473756) 2025-12-24 20:16:20 +00:00