You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I started getting a end-of-file error while using home-manager with nix-darwin and nix flakes as of a couple of weeks ago. I've distilled it down into a minimal workable example: https://github.com/lamdor/nix-darwin-home-manager-eof-mwe Which doesn't do anything, but blows up with:
❯ nix build github:lamdor/nix-darwin-home-manager-eof-mwe#darwinConfigurations.test.system
error: unexpected end-of-file
(use '--show-trace' to show detailed location information)
Which isn't that very helpful...
When doing the --show-trace, I get
Full output
❯ nix build github:lamdor/nix-darwin-home-manager-eof-mwe#darwinConfigurations.test.system --show-trace
error: unexpected end-of-file
… while evaluating the attribute 'buildCommand' of the derivation 'options-db.xml'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating the attribute 'passAsFile'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/build-support/buildenv/default.nix:77:5:
76| # XXX: The size is somewhat arbitrary
77| passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else [ ];
| ^
78| }
… while evaluating the attribute 'passAsFile' of the derivation 'nmd-documents'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating the attribute 'buildCommand' of the derivation 'manual-combined'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating the attribute 'buildCommand' of the derivation 'manual-olinkdb'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating the attribute 'buildCommand' of the derivation 'man-pages'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating the attribute 'passAsFile'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/build-support/buildenv/default.nix:77:5:
76| # XXX: The size is somewhat arbitrary
77| passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else [ ];
| ^
78| }
… while evaluating the attribute 'passAsFile' of the derivation 'home-manager-fonts'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating the attribute 'value'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:563:44:
562| defnsByName' = byName "config" (module: value:
563| [{ inherit (module) file; inherit value; }]
| ^
564| ) configs;
… while calling 'dischargeProperties'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:810:25:
809| */
810| dischargeProperties = def:
| ^
811| if def._type or "" == "merge" then
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:739:137:
738| defs' = concatMap (m:
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
740| ) defs;
… while evaluating definitions from `/nix/store/6sbr4qzw8frzbpnj4lxhhrk30yaa4z17-source/modules/targets/darwin/fonts.nix':
… while calling anonymous lambda
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:738:28:
737| # Process mkMerge and mkIf properties.
738| defs' = concatMap (m:
| ^
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:738:17:
737| # Process mkMerge and mkIf properties.
738| defs' = concatMap (m:
| ^
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating the attribute 'values'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:851:7:
850| in {
851| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
852| inherit highestPrio;
… while evaluating the attribute 'values'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:752:9:
751| in {
752| values = defs''';
| ^
753| inherit (defs'') highestPrio;
… while evaluating the attribute 'mergedValue'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:758:5:
757| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
758| mergedValue =
| ^
759| if isDefined then
… while evaluating the option `home-manager.users.test.home.activation.copyFonts.data':
… while evaluating the attribute 'value'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:723:9:
722| in warnDeprecation opt //
723| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
724| inherit (res.defsFinal') highestPrio;
… while calling anonymous lambda
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:265:72:
264| # For definitions that have an associated option
265| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
266|
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/attrsets.nix:532:20:
531| then recurse (path ++ [name]) value
532| else f (path ++ [name]) value;
| ^
533| in mapAttrs g;
… while calling 'g'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/attrsets.nix:529:19:
528| g =
529| name: value:
| ^
530| if isAttrs value && cond value
… from call site
… while evaluating the attribute 'data'
at /nix/store/6sbr4qzw8frzbpnj4lxhhrk30yaa4z17-source/modules/lib/dag.nix:83:9:
82| name = n;
83| data = v.data;
| ^
84| after = v.after ++ dagBefore dag n;
… while evaluating the attribute 'data'
at /nix/store/6sbr4qzw8frzbpnj4lxhhrk30yaa4z17-source/modules/lib/dag.nix:89:37:
88| in if sorted ? result then {
89| result = map (v: { inherit (v) name data; }) sorted.result;
| ^
90| } else
… while calling 'mkCmd'
at /nix/store/6sbr4qzw8frzbpnj4lxhhrk30yaa4z17-source/modules/home-environment.nix:657:17:
656| let
657| mkCmd = res: ''
| ^
658| _iNote "Activating %s" "${res.name}"
… from call site
… while evaluating the attribute 'text' of the derivation 'activation-script'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating the attribute 'buildCommand' of the derivation 'home-manager-generation'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating the attribute 'text' of the derivation 'activation-test'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while calling anonymous lambda
at /nix/store/6sbr4qzw8frzbpnj4lxhhrk30yaa4z17-source/nix-darwin/default.nix:16:36:
15| system.activationScripts.postActivation.text = concatStringsSep "\n"
16| (mapAttrsToList (username: usercfg: ''
| ^
17| echo Activating home-manager configuration for ${username}
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/attrsets.nix:478:16:
477| attrs:
478| map (name: f name attrs.${name}) (attrNames attrs);
| ^
479|
… while calling anonymous lambda
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/attrsets.nix:478:10:
477| attrs:
478| map (name: f name attrs.${name}) (attrNames attrs);
| ^
479|
… from call site
… while evaluating the attribute 'value'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:563:44:
562| defnsByName' = byName "config" (module: value:
563| [{ inherit (module) file; inherit value; }]
| ^
564| ) configs;
… while calling 'dischargeProperties'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:810:25:
809| */
810| dischargeProperties = def:
| ^
811| if def._type or "" == "merge" then
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:739:137:
738| defs' = concatMap (m:
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
740| ) defs;
… while evaluating definitions from `<unknown-file>':
… while calling anonymous lambda
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:738:28:
737| # Process mkMerge and mkIf properties.
738| defs' = concatMap (m:
| ^
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:738:17:
737| # Process mkMerge and mkIf properties.
738| defs' = concatMap (m:
| ^
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating the attribute 'values'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:851:7:
850| in {
851| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
852| inherit highestPrio;
… while evaluating the attribute 'values'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:752:9:
751| in {
752| values = defs''';
| ^
753| inherit (defs'') highestPrio;
… while evaluating the attribute 'mergedValue'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:758:5:
757| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
758| mergedValue =
| ^
759| if isDefined then
… while evaluating the option `system.activationScripts.postActivation.text':
… while evaluating the attribute 'value'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:723:9:
722| in warnDeprecation opt //
723| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
724| inherit (res.defsFinal') highestPrio;
… while calling anonymous lambda
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:265:72:
264| # For definitions that have an associated option
265| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
266|
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/attrsets.nix:532:20:
531| then recurse (path ++ [name]) value
532| else f (path ++ [name]) value;
| ^
533| in mapAttrs g;
… while calling 'g'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/attrsets.nix:529:19:
528| g =
529| name: value:
| ^
530| if isAttrs value && cond value
… from call site
… while evaluating the attribute 'value'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:563:44:
562| defnsByName' = byName "config" (module: value:
563| [{ inherit (module) file; inherit value; }]
| ^
564| ) configs;
… while calling 'dischargeProperties'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:810:25:
809| */
810| dischargeProperties = def:
| ^
811| if def._type or "" == "merge" then
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:739:137:
738| defs' = concatMap (m:
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
740| ) defs;
… while evaluating definitions from `/nix/store/b7mv8hq1amfaqim5mxvdkdbpmmk02n9y-source/modules/system/activation-scripts.nix':
… while calling anonymous lambda
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:738:28:
737| # Process mkMerge and mkIf properties.
738| defs' = concatMap (m:
| ^
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:738:17:
737| # Process mkMerge and mkIf properties.
738| defs' = concatMap (m:
| ^
739| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating the attribute 'values'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:851:7:
850| in {
851| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
852| inherit highestPrio;
… while evaluating the attribute 'values'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:752:9:
751| in {
752| values = defs''';
| ^
753| inherit (defs'') highestPrio;
… while evaluating the attribute 'mergedValue'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:758:5:
757| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
758| mergedValue =
| ^
759| if isDefined then
… while evaluating the option `system.activationScripts.script.text':
… while evaluating the attribute 'value'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:723:9:
722| in warnDeprecation opt //
723| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
724| inherit (res.defsFinal') highestPrio;
… while calling anonymous lambda
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/modules.nix:265:72:
264| # For definitions that have an associated option
265| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
266|
… from call site
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/attrsets.nix:532:20:
531| then recurse (path ++ [name]) value
532| else f (path ++ [name]) value;
| ^
533| in mapAttrs g;
… while calling 'g'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/lib/attrsets.nix:529:19:
528| g =
529| name: value:
| ^
530| if isAttrs value && cond value
… from call site
… while evaluating the attribute 'activationScript' of the derivation 'darwin-system-23.05.20221219.bb31220+darwin4.adb8ac0'
at /nix/store/1zzy0v6laha6r67l0n3wqkgqiwvvj7hv-source/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
When I remove the home-manager.users.test = { home.stateVersion = "21.11"; }; line, basically not using any of home-manager, but still using nix-darwin, it works fine. What's odd is that I can revert my nixpkgs lock back to a commit prior to Dec 8th, and things work fine.
I've bisected nixpkgs to show that NixOS/nixpkgs#199363 was the PR that this MWE started breaking. Which is interesting since I think options-db.xml has something to do with docs and so does that PR.
Does anyone have any ideas on how to fix and what to look at next?
Are you following the right branch?
Is there an existing issue for this?
Issue description
Hi, I started getting a end-of-file error while using home-manager with nix-darwin and nix flakes as of a couple of weeks ago. I've distilled it down into a minimal workable example: https://github.com/lamdor/nix-darwin-home-manager-eof-mwe Which doesn't do anything, but blows up with:
Which isn't that very helpful...
When doing the
--show-trace
, I getFull output
When I remove the
home-manager.users.test = { home.stateVersion = "21.11"; };
line, basically not using any of home-manager, but still using nix-darwin, it works fine. What's odd is that I can revert my nixpkgs lock back to a commit prior to Dec 8th, and things work fine.I've bisected nixpkgs to show that NixOS/nixpkgs#199363 was the PR that this MWE started breaking. Which is interesting since I think
options-db.xml
has something to do with docs and so does that PR.Does anyone have any ideas on how to fix and what to look at next?
Maintainer CC
@midchildan @ncf
System information
The text was updated successfully, but these errors were encountered: