emacs
emacs copied to clipboard
bug: `error: function 'anonymous lambda' called with unexpected argument 'nativeComp'` on Apple Silicon
Installing emacs with nix-darwin, i got error error: function 'anonymous lambda' called with unexpected argument 'nativeComp':
.nixpkgs on main [!+]
λ make darwin-debug
nix build .#darwinConfigurations.mydevice.system --show-trace --verbose \
--extra-experimental-features 'nix-command flakes'
Using saved setting for 'substituters = https://cache.nixos.org https://cachix.org/api/v1/cache/emacs' from ~/.local/share/nix/trusted-settings.json.
Using saved setting for 'trusted-public-keys = emacs.cachix.org-1:b1SMJNLY/mZF6GxQE+eDBeps7WnkT0Po55TAyzwOxTY=' from ~/.local/share/nix/trusted-settings.json.
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'darwin-system-24.05.20240626.66f253e+darwin4.5058197'
whose name attribute is located at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'activationScript' of derivation 'darwin-system-24.05.20240626.66f253e+darwin4.5058197'
at /nix/store/ifgsdvbl55siwqhalbnxxnycd77km640-source/modules/system/default.nix:95:7:
94|
95| activationScript = cfg.activationScripts.script.text;
| ^
96| activationUserScript = cfg.activationScripts.userScript.text;
… while calling anonymous lambda
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/attrsets.nix:1208:18:
1207| then recurse (path ++ [ name ]) value
1208| else f (path ++ [ name ]) value);
| ^
1209| in
… while calling anonymous lambda
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `system.activationScripts.script.text':
… while calling anonymous lambda
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/modules.nix:824:28:
823| # Process mkMerge and mkIf properties.
824| defs' = concatMap (m:
| ^
825| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/ifgsdvbl55siwqhalbnxxnycd77km640-source/modules/system/activation-scripts.nix':
… from call site
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/modules.nix:825:137:
824| defs' = concatMap (m:
825| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
826| ) defs;
… while calling 'dischargeProperties'
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/modules.nix:896:25:
895| */
896| dischargeProperties = def:
| ^
897| if def._type or "" == "merge" then
… while calling anonymous lambda
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/attrsets.nix:1208:18:
1207| then recurse (path ++ [ name ]) value
1208| else f (path ++ [ name ]) value);
| ^
1209| in
… while calling anonymous lambda
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `system.activationScripts.applications.text':
… while calling anonymous lambda
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/modules.nix:824:28:
823| # Process mkMerge and mkIf properties.
824| defs' = concatMap (m:
| ^
825| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/ifgsdvbl55siwqhalbnxxnycd77km640-source/modules/system/applications.nix':
… from call site
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/modules.nix:825:137:
824| defs' = concatMap (m:
825| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
826| ) defs;
… while calling 'dischargeProperties'
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/modules.nix:896:25:
895| */
896| dischargeProperties = def:
| ^
897| if def._type or "" == "merge" then
… while evaluating derivation 'system-applications'
whose name attribute is located at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'passAsFile' of derivation 'system-applications'
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/pkgs/build-support/trivial-builders/default.nix:69:9:
68| inherit buildCommand name;
69| passAsFile = [ "buildCommand" ]
| ^
70| ++ (derivationArgs.passAsFile or [ ]);
… while evaluating derivation 'darwin-manpages'
whose name attribute is located at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'buildCommand' of derivation 'darwin-manpages'
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/pkgs/build-support/trivial-builders/default.nix:68:16:
67| enableParallelBuilding = true;
68| inherit buildCommand name;
| ^
69| passAsFile = [ "buildCommand" ]
… while evaluating derivation 'options.json'
whose name attribute is located at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'buildCommand' of derivation 'options.json'
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/pkgs/build-support/trivial-builders/default.nix:68:16:
67| enableParallelBuilding = true;
68| inherit buildCommand name;
| ^
69| passAsFile = [ "buildCommand" ]
… while evaluating derivation 'options.json'
whose name attribute is located at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/pkgs/stdenv/generic/make-derivation.nix:331:7
… while evaluating attribute 'options' of derivation 'options.json'
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/nixos/lib/make-options-doc/default.nix:198:7:
197| ];
198| options = builtins.toFile "options.json"
| ^
199| (builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix));
… while evaluating the default value of option `services.emacs.package`
… from call site
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/options.nix:346:15:
345| builtins.addErrorContext "while evaluating the ${if opt?defaultText then "defaultText" else "default value"} of option `${name}`" (
346| renderOptionValue (opt.defaultText or opt.default)
| ^
347| );
… while calling 'renderOptionValue'
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/options.nix:383:23:
382| */
383| renderOptionValue = v:
| ^
384| if v ? _type && v ? text then v
… while calling anonymous lambda
at /nix/store/ifgsdvbl55siwqhalbnxxnycd77km640-source/modules/documentation/default.nix:37:18:
36| scrubDerivations = namePrefix: pkgSet: mapAttrs
37| (name: value:
| ^
38| let wholeName = "${namePrefix}.${name}"; in
… from call site
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/trivial.nix:895:7:
894| { # TODO: Should we add call-time "type" checking like built in?
895| __functor = self: f;
| ^
896| __functionArgs = args;
… while calling anonymous lambda
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/customisation.nix:144:34:
143| # Re-call the function but with different arguments
144| overrideArgs = mirrorArgs (newArgs: makeOverridable f (overrideWith newArgs));
| ^
145| # Change the result of the function call by applying g to it
… from call site
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/trivial.nix:895:7:
894| { # TODO: Should we add call-time "type" checking like built in?
895| __functor = self: f;
| ^
896| __functionArgs = args;
… while calling anonymous lambda
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/lib/customisation.nix:136:17:
135| in
136| mirrorArgs (origArgs:
| ^
137| let
error: function 'anonymous lambda' called with unexpected argument 'nativeComp'
at /nix/store/8sh7ig1gsxwgax10k4iad85bbpnygcxr-source/pkgs/applications/editors/emacs/make-emacs.nix:9:1:
8|
9| { lib
| ^
10| , stdenv
make: *** [darwin-debug] Error 1