From bb0f35f8a06752ccce5b8d0c5733378cd6afc22f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 20 Sep 2026 20:47:59 +0100 Subject: [PATCH] swift.swiftArch, swift.swiftOs: fix the eval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without the chnage the eval fails as: $ nix eval 'nixpkgs/staging#swift.swiftArch' error: … in the left operand of the update (//) operator at «github:NixOS/nixpkgs/9cfde996e4f874e9b58a0e9efb5193d565b6daf3»/lib/derivations.nix:265:8: 264| drv 265| // mapAttrs (_: lib.warn msg) drvToWrap | ^ 266| // ( … while calling the 'mapAttrs' builtin at «github:NixOS/nixpkgs/9cfde996e4f874e9b58a0e9efb5193d565b6daf3»/lib/derivations.nix:265:8: 264| drv 265| // mapAttrs (_: lib.warn msg) drvToWrap | ^ 266| // ( (stack trace truncated; use '--show-trace' to show the full, detailed trace) error: expected a set but found a string: "x86_64" --- pkgs/development/compilers/swift/by-name/sw/swift/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/swift/by-name/sw/swift/package.nix b/pkgs/development/compilers/swift/by-name/sw/swift/package.nix index 5d9d5eabcdc2..bc96a9cd7f91 100644 --- a/pkgs/development/compilers/swift/by-name/sw/swift/package.nix +++ b/pkgs/development/compilers/swift/by-name/sw/swift/package.nix @@ -241,9 +241,9 @@ stdenv.mkDerivation (finalAttrs: { // lib.optionalAttrs config.allowAliases { # Legacy aliases for the old Swift packaging. These should eventually be removed. swift = lib.warnOnInstantiate "`swift` is an alias for this (`swift`) package. Just use it directly." finalAttrs.finalPackage; - swiftArch = lib.warnOnInstantiate "'swiftArch' is an alias for 'stdenv.hostPlatform.swift.arch'." stdenv.hostPlatform.swift.arch; + swiftArch = lib.warn "'swiftArch' is an alias for 'stdenv.hostPlatform.swift.arch'." stdenv.hostPlatform.swift.arch; swiftDriver = lib.warnOnInstantiate "'swiftDriver' has been renamed to 'swift-driver'" finalAttrs.passthru.swift-driver; - swiftOs = lib.warnOnInstantiate "'swiftOs' is an alias for 'stdenv.hostPlatform.swift.platform'." stdenv.hostPlatform.swift.platform; + swiftOs = lib.warn "'swiftOs' is an alias for 'stdenv.hostPlatform.swift.platform'." stdenv.hostPlatform.swift.platform; }; meta = {