diff --git a/flake.lock b/flake.lock index 8fd3bec..009b174 100644 --- a/flake.lock +++ b/flake.lock @@ -5895,11 +5895,11 @@ "nixpkgs-windows": "nixpkgs-windows_4" }, "locked": { - "lastModified": 1786729772, - "narHash": "sha256-7qE/hchFHmaCxoFCI4dtCqv2eHyL6VttgedTas41Lgs=", + "lastModified": 1788882543, + "narHash": "sha256-6CxENvB7siFQXqyTZnhyJVChiHF4hH7EVdt6xeyELIo=", "owner": "logos-co", "repo": "logos-nix", - "rev": "f55bf91b8a723ee5c27c39c773b034255538d280", + "rev": "782d8690bb74c767c90896a71194b58320d700a1", "type": "github" }, "original": { diff --git a/lib/common.nix b/lib/common.nix index 80627ec..c39ee3b 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -89,6 +89,18 @@ let systems = [ "aarch64-darwin" "x86_64-darwin" "aarch64-linux" "x86_64-linux" ] ++ lib.optional (logos-nix != null) "x86_64-windows"; + # Native sets carry logos-nix's own overlays -- today the two crates.io 403 + # fixes, which are what makes a Rust module's crates fetchable at all. Taking + # the LIST rather than naming entries is deliberate: naming them is how the + # importCargoLock fix shipped reaching nothing. + nativeOverlays = + if logos-nix == null then [ ] + else if logos-nix ? lib.nativeOverlays then logos-nix.lib.nativeOverlays + else throw ("logos-module-builder: the pinned logos-nix predates " + + "lib.nativeOverlays, so Rust modules would vendor crates from " + + "an endpoint crates.io 403s. Bump the logos-nix input past " + + "logos-co/logos-nix#11."); + # THE package-set constructor. Every module's pkgs comes from here, which is # what lets ~40 modules target Windows without each re-deriving the cross # plumbing. @@ -98,7 +110,7 @@ let # exactly what logos-nix.lib.mkWindowsPkgs wraps. mkPkgsWith = extraOverlays: system: if system != "x86_64-windows" then - import nixpkgs { inherit system; overlays = extraOverlays; } + import nixpkgs { inherit system; overlays = nativeOverlays ++ extraOverlays; } else if logos-nix == null then throw ("logos-module-builder: targeting x86_64-windows requires the " + "logos-nix input to be threaded into the builder lib.")