-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression of revisionWithDefault from lib/trivial.nix #202244
Comments
i can't reproduce on nix 2.11 maybe it's because instead of using a submodule i symlinked nixpkgs to nix/nixos-unstable because my internet is slow could you try copying/symlinking the nixpkgs repo to nix/nixos-unstable and see if that gives the same error could you show what the error is on nix 2.3< because error reporting has improved since then |
I tried in my CI for my repo on GitHub, not sure you can see the logs but here's the build with nix 2.6: https://github.com/etu/nixconfig/actions/runs/3518086147/jobs/5896609626 Relevant bits: # nix installed:
~~> Setting up the default profile
installing 'nix-2.6.1'
building '/nix/store/gzyhl5kzycbw25km6raj1l5vgzil3iq7-user-environment.drv'...
installing 'nss-cacert-3.66'
building '/nix/store/l6pb1dxah695bqg70dvrcy1m4c5fsrbj-user-environment.drv'...
~~> Setting up the nix-daemon systemd service
Created symlink /etc/systemd/system/nix-daemon.service → /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.service.
Created symlink /etc/systemd/system/sockets.target.wants/nix-daemon.socket → /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket.
Created symlink /etc/systemd/system/nix-daemon.socket → /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket.
Alright! We're done!
# Run nix-build '<nixpkgs/nixos>' -I nixos-config=./hosts/private-laptop/configuration.nix -A system
copying path '/nix/store/mznslxrbaiwg25cw0kjh5pcmdl792bi4-config.el' from 'https://etu.cachix.org/'...
error: a string that refers to a store path cannot be appended to a path
at /home/runner/work/nixconfig/nixconfig/nix/nixos-unstable/lib/sources.nix:193:30:
192| then path
193| else toString (/. + "${base}/${path}");
| ^
194| in if pathIsRegularFile path
(use '--show-trace' to show detailed location information)
Error: Process completed with exit code 1. And here's the build with nix 2.11: https://github.com/etu/nixconfig/actions/runs/3518111690/jobs/5896663579 # nix installed:
~~> Setting up the default profile
installing 'nix-2.11.1'
building '/nix/store/1rsghfzhjmzwm2j3hca5803z4gvmpr02-user-environment.drv'...
installing 'nss-cacert-3.80'
building '/nix/store/x6mlg3gy8r657pd9l6md17fpb5ah2p8v-user-environment.drv'...
~~> Setting up the nix-daemon systemd service
Created symlink /etc/systemd/system/nix-daemon.service → /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.service.
Created symlink /etc/systemd/system/sockets.target.wants/nix-daemon.socket → /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket.
Created symlink /etc/systemd/system/nix-daemon.socket → /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.socket.
Alright! We're done!
# Run nix-build '<nixpkgs/nixos>' -I nixos-config=./hosts/private-laptop/configuration.nix -A system
copying path '/nix/store/mznslxrbaiwg25cw0kjh5pcmdl792bi4-config.el' from 'https://etu.cachix.org/'...
error: a string that refers to a store path cannot be appended to a path
at /home/runner/work/nixconfig/nixconfig/nix/nixos-unstable/lib/sources.nix:193:30:
192| then path
193| else toString (/. + "${base}/${path}");
| ^
194| in if pathIsRegularFile path
(use '--show-trace' to show detailed location information)
Error: Process completed with exit code 1. |
Do you have flakes enabled? Because I don't. I use stable nix. I would think it's way more likely to be related to that.
Interesting idea, I've just tried to rename the directory with the submodule and symlink to a clone of nixpkgs where I had checked out the same commit as I tried inside of the submodule. And that did work. |
run the build with --show-trace |
i disabled flakes for the testing |
error: a string that refers to a store path cannot be appended to a path
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30:
192| then path
193| else toString (/. + "${base}/${path}");
| ^
194| in if pathIsRegularFile path
… while evaluating 'absolutePath'
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:190:36:
189| packedRefsName = path + "/packed-refs";
190| absolutePath = base: path:
| ^
191| if lib.hasPrefix "/" path
… from call site
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:201:37:
200| else
201| let gitDir = absolutePath (dirOf path) (lib.head m);
| ^
202| commonDir'' = if pathIsRegularFile "${gitDir}/commondir"
… while realising the context of a path
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:35:32:
34| */
35| pathIsRegularFile = path: if pathExists path then (pathType path) == "regular" else false;
| ^
36|
… while evaluating 'pathIsRegularFile'
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:35:23:
34| */
35| pathIsRegularFile = path: if pathExists path then (pathType path) == "regular" else false;
| ^
36|
… from call site
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:202:40:
201| let gitDir = absolutePath (dirOf path) (lib.head m);
202| commonDir'' = if pathIsRegularFile "${gitDir}/commondir"
| ^
203| then lib.fileContents "${gitDir}/commondir"
… while evaluating 'removeSuffix'
at /etc/nixos/nix/nixos-unstable/lib/strings.nix:582:5:
581| # Input string
582| str:
| ^
583| let
… from call site
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:205:37:
204| else gitDir;
205| commonDir' = lib.removeSuffix "/" commonDir'';
| ^
206| commonDir = absolutePath gitDir commonDir';
… while evaluating 'hasPrefix'
at /etc/nixos/nix/nixos-unstable/lib/strings.nix:229:5:
228| # Input string
229| str: substring 0 (stringLength pref) str == pref;
| ^
230|
… from call site
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:191:18:
190| absolutePath = base: path:
191| if lib.hasPrefix "/" path
| ^
192| then path
… while evaluating 'absolutePath'
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:190:36:
189| packedRefsName = path + "/packed-refs";
190| absolutePath = base: path:
| ^
191| if lib.hasPrefix "/" path
… from call site
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:206:37:
205| commonDir' = lib.removeSuffix "/" commonDir'';
206| commonDir = absolutePath gitDir commonDir';
| ^
207| refFile = lib.removePrefix "${commonDir}/" "${gitDir}/${file}";
… while realising the context of a path
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:35:32:
34| */
35| pathIsRegularFile = path: if pathExists path then (pathType path) == "regular" else false;
| ^
36|
… while evaluating 'pathIsRegularFile'
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:35:23:
34| */
35| pathIsRegularFile = path: if pathExists path then (pathType path) == "regular" else false;
| ^
36|
… from call site
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:194:15:
193| else toString (/. + "${base}/${path}");
194| in if pathIsRegularFile path
| ^
195| # Resolve git worktrees. See gitrepository-layout(5)
… while evaluating 'readCommitFromFile'
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:187:36:
186| _commitIdFromGitRepoOrError =
187| let readCommitFromFile = file: path:
| ^
188| let fileName = path + "/${file}";
… from call site
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:208:22:
207| refFile = lib.removePrefix "${commonDir}/" "${gitDir}/${file}";
208| in readCommitFromFile refFile commonDir
| ^
209|
… while evaluating 'readCommitFromFile'
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:187:36:
186| _commitIdFromGitRepoOrError =
187| let readCommitFromFile = file: path:
| ^
188| let fileName = path + "/${file}";
… from call site
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:169:26:
168|
169| pathIsGitRepo = path: (_commitIdFromGitRepoOrError path)?value;
| ^
170|
… while evaluating 'pathIsGitRepo'
at /etc/nixos/nix/nixos-unstable/lib/sources.nix:169:19:
168|
169| pathIsGitRepo = path: (_commitIdFromGitRepoOrError path)?value;
| ^
170|
… from call site
at /etc/nixos/nix/nixos-unstable/lib/trivial.nix:218:11:
217| gitRepo = ./.. + "/.git";
218| in if lib.pathIsGitRepo gitRepo
| ^
219| then lib.commitIdFromGitRepo gitRepo
… while evaluating 'revisionWithDefault'
at /etc/nixos/nix/nixos-unstable/lib/trivial.nix:214:5:
213| # Default value to return if revision can not be determined
214| default:
| ^
215| let
… from call site
at /etc/nixos/nix/nixos-unstable/nixos/modules/misc/version.nix:79:17:
78| type = types.nullOr types.str;
79| default = trivial.revisionWithDefault null;
| ^
80| description = lib.mdDoc "The Git revision from which this NixOS configuration was built.";
… while evaluating the attribute 'default'
at /etc/nixos/nix/nixos-unstable/nixos/modules/misc/version.nix:79:7:
78| type = types.nullOr types.str;
79| default = trivial.revisionWithDefault null;
| ^
80| description = lib.mdDoc "The Git revision from which this NixOS configuration was built.";
… while evaluating the attribute 'value.content'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:885:14:
884| { _type = "override";
885| inherit priority content;
| ^
886| };
… while evaluating the attribute 'value._type'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:838:73:
837| highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;
838| strip = def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def;
| ^
839| in {
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:737:19:
736| # Avoid sorting if we don't have to.
737| if any (def: def.value._type or "" == "order") defs''.values
| ^
738| then sortProperties defs''.values
… from call site
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:737:14:
736| # Avoid sorting if we don't have to.
737| if any (def: def.value._type or "" == "order") defs''.values
| ^
738| then sortProperties defs''.values
… while evaluating the attribute 'values'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:741:9:
740| in {
741| values = defs''';
| ^
742| inherit (defs'') highestPrio;
… while evaluating the attribute 'mergedValue'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:747:5:
746| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
747| mergedValue =
| ^
748| if isDefined then
… while evaluating the option `system.nixos.revision':
… while evaluating the attribute 'value'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:712:9:
711| in warnDeprecation opt //
712| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
713| inherit (res.defsFinal') highestPrio;
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/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 /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:401:20:
400| then recurse (path ++ [name]) value
401| else f (path ++ [name]) value;
| ^
402| in mapAttrs g;
… while evaluating 'g'
at /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:398:19:
397| g =
398| name: value:
| ^
399| if isAttrs value && cond value
… from call site
… while evaluating 'optionalAttrs'
at /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:453:25:
452| */
453| optionalAttrs = cond: as: if cond then as else {};
| ^
454|
… from call site
at /etc/nixos/nix/nixos-unstable/nixos/modules/installer/tools/tools.nix:57:10:
56| nixosVersion = config.system.nixos.version;
57| } // optionalAttrs (config.system.nixos.revision != null) {
| ^
58| nixpkgsRevision = config.system.nixos.revision;
… while evaluating the attribute 'json' of the derivation 'nixos-version'
at /etc/nixos/nix/nixos-unstable/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 /etc/nixos/nix/nixos-unstable/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 'system-path'
at /etc/nixos/nix/nixos-unstable/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating 'check'
at /etc/nixos/nix/nixos-unstable/lib/types.nix:482:15:
481| descriptionClass = "noun";
482| check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
| ^
483| merge = mergeEqualOption;
… from call site
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:749:22:
748| if isDefined then
749| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
750| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:749:17:
748| if isDefined then
749| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
750| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… from call site
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:749:12:
748| if isDefined then
749| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
750| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while evaluating the attribute 'value'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:760:27:
759| optionalValue =
760| if isDefined then { value = mergedValue; }
| ^
761| else {};
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/lib/types.nix:492:14:
491| merge = loc: defs:
492| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
| ^
493| imap1 (m: def':
… from call site
… while evaluating the attribute 'serviceDirectories' of the derivation 'dbus-1'
at /etc/nixos/nix/nixos-unstable/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let
… while evaluating 'check'
at /etc/nixos/nix/nixos-unstable/lib/types.nix:482:15:
481| descriptionClass = "noun";
482| check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
| ^
483| merge = mergeEqualOption;
… from call site
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:749:22:
748| if isDefined then
749| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
750| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:749:17:
748| if isDefined then
749| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
750| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… from call site
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:749:12:
748| if isDefined then
749| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
750| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while evaluating the attribute 'mergedValue'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:747:5:
746| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
747| mergedValue =
| ^
748| if isDefined then
… while evaluating the option `environment.etc.dbus-1.source':
… while evaluating the attribute 'value'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:712:9:
711| in warnDeprecation opt //
712| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
713| inherit (res.defsFinal') highestPrio;
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/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 /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:401:20:
400| then recurse (path ++ [name]) value
401| else f (path ++ [name]) value;
| ^
402| in mapAttrs g;
… while evaluating 'g'
at /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:398:19:
397| g =
398| name: value:
| ^
399| if isAttrs value && cond value
… from call site
… while evaluating 'escapeShellArg'
at /etc/nixos/nix/nixos-unstable/lib/strings.nix:354:20:
353| */
354| escapeShellArg = arg: "'${replaceStrings ["'"] ["'\\''"] (toString arg)}'";
| ^
355|
… from call site
… while evaluating 'concatMapStringsSep'
at /etc/nixos/nix/nixos-unstable/lib/strings.nix:111:5:
110| # List of input strings
111| list: concatStringsSep sep (map f list);
| ^
112|
… from call site
at /etc/nixos/nix/nixos-unstable/nixos/modules/system/etc/etc.nix:54:43:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/nixos/modules/system/etc/etc.nix:54:33:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… from call site
… while evaluating 'concatMapStringsSep'
at /etc/nixos/nix/nixos-unstable/lib/strings.nix:111:5:
110| # List of input strings
111| list: concatStringsSep sep (map f list);
| ^
112|
… from call site
at /etc/nixos/nix/nixos-unstable/nixos/modules/system/etc/etc.nix:54:7:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… while evaluating the attribute 'buildCommand' of the derivation 'etc'
at /etc/nixos/nix/nixos-unstable/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 /etc/nixos/nix/nixos-unstable/lib/modules.nix:552:44:
551| defnsByName' = byName "config" (module: value:
552| [{ inherit (module) file; inherit value; }]
| ^
553| ) configs;
… while evaluating 'atDepth'
at /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:60:17:
59| len = length attrPath;
60| atDepth = n:
| ^
61| if n == len
… from call site
at /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:63:39:
62| then value
63| else { ${elemAt attrPath n} = atDepth (n + 1); };
| ^
64| in atDepth 0;
… while evaluating the attribute 'value'
at /etc/nixos/nix/nixos-unstable/lib/types.nix:552:58:
551| # Push down position info.
552| (map (def: mapAttrs (n: v: { inherit (def) file; value = v; }) def.value) defs);
| ^
553| emptyValue = { value = {}; };
… while evaluating 'dischargeProperties'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:799:25:
798| */
799| dischargeProperties = def:
| ^
800| if def._type or "" == "merge" then
… from call site
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:728:137:
727| defs' = concatMap (m:
728| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
729| ) defs;
… while evaluating definitions from `/etc/nixos/nix/nixos-unstable/nixos/modules/system/etc/etc.nix':
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:727:28:
726| # Process mkMerge and mkIf properties.
727| defs' = concatMap (m:
| ^
728| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… from call site
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:727:17:
726| # Process mkMerge and mkIf properties.
727| defs' = concatMap (m:
| ^
728| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating the attribute 'values'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:840:7:
839| in {
840| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
841| inherit highestPrio;
… while evaluating the attribute 'values'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:741:9:
740| in {
741| values = defs''';
| ^
742| inherit (defs'') highestPrio;
… while evaluating the attribute 'optionalValue.value'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:759:5:
758|
759| optionalValue =
| ^
760| if isDefined then { value = mergedValue; }
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/lib/types.nix:546:29:
545| merge = loc: defs:
546| zipAttrsWith (name: defs:
| ^
547| let merged = mergeDefinitions (loc ++ [name]) elemType defs;
… from call site
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:518:24:
517| let f = attrPath:
518| zipAttrsWith (n: values:
| ^
519| let here = attrPath ++ [n]; in
… from call site
… while evaluating the attribute 'value'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:552:44:
551| defnsByName' = byName "config" (module: value:
552| [{ inherit (module) file; inherit value; }]
| ^
553| ) configs;
… while evaluating 'dischargeProperties'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:799:25:
798| */
799| dischargeProperties = def:
| ^
800| if def._type or "" == "merge" then
… from call site
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:728:137:
727| defs' = concatMap (m:
728| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
729| ) defs;
… while evaluating definitions from `/etc/nixos/nix/nixos-unstable/nixos/modules/system/etc/etc-activation.nix':
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:727:28:
726| # Process mkMerge and mkIf properties.
727| defs' = concatMap (m:
| ^
728| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… from call site
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:727:17:
726| # Process mkMerge and mkIf properties.
727| defs' = concatMap (m:
| ^
728| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating the attribute 'values'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:840:7:
839| in {
840| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
841| inherit highestPrio;
… while evaluating the attribute 'values'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:741:9:
740| in {
741| values = defs''';
| ^
742| inherit (defs'') highestPrio;
… while evaluating the attribute 'mergedValue'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:747:5:
746| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
747| mergedValue =
| ^
748| if isDefined then
… while evaluating the option `system.activationScripts.etc.text':
… while evaluating the attribute 'value'
at /etc/nixos/nix/nixos-unstable/lib/modules.nix:712:9:
711| in warnDeprecation opt //
712| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
713| inherit (res.defsFinal') highestPrio;
… while evaluating anonymous lambda
at /etc/nixos/nix/nixos-unstable/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 /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:401:20:
400| then recurse (path ++ [name]) value
401| else f (path ++ [name]) value;
| ^
402| in mapAttrs g;
… while evaluating 'g'
at /etc/nixos/nix/nixos-unstable/lib/attrsets.nix:398:19:
397| g =
398| name: value:
| ^
399| if isAttrs value && cond value
… from call site
… while evaluating the attribute 'text'
at /etc/nixos/nix/nixos-unstable/nixos/modules/system/activation/activation-script.nix:9:5:
8| addAttributeName = mapAttrs (a: v: v // {
9| text = ''
| ^
10| #### Activation script snippet ${a}:
… while evaluating 'id'
at /etc/nixos/nix/nixos-unstable/lib/trivial.nix:14:5:
13| # The value to return
14| x: x;
| ^
15|
… from call site
… while evaluating 'textClosureMap'
at /etc/nixos/nix/nixos-unstable/lib/strings-with-deps.nix:75:35:
74|
75| textClosureMap = f: predefined: names:
| ^
76| concatStringsSep "\n" (map f (textClosureList predefined names));
… from call site
at /etc/nixos/nix/nixos-unstable/nixos/modules/system/activation/activation-script.nix:49:9:
48|
49| ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
| ^
50|
… while evaluating 'systemActivationScript'
at /etc/nixos/nix/nixos-unstable/nixos/modules/system/activation/activation-script.nix:20:33:
19|
20| systemActivationScript = set: onlyDry: let
| ^
21| set' = mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set;
… from call site
at /etc/nixos/nix/nixos-unstable/nixos/modules/system/activation/activation-script.nix:137:18:
136| apply = set: set // {
137| script = systemActivationScript set false;
| ^
138| };
… while evaluating the attribute 'system.activationScripts.script'
at /etc/nixos/nix/nixos-unstable/nixos/modules/system/activation/activation-script.nix:137:9:
136| apply = set: set // {
137| script = systemActivationScript set false;
| ^
138| };
… while evaluating the attribute 'activationScript' of the derivation 'nixos-system-agrajag-22.11.git.013fcdd1068'
at /etc/nixos/nix/nixos-unstable/pkgs/stdenv/generic/make-derivation.nix:270:7:
269| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
270| name =
| ^
271| let |
So one of the things that is different for a git submodule is that the
Then git uses the |
…re/virtual0000000000000000000000005-source''" This reverts commit b67ee6e. NixOS#202244 error: a string that refers to a store path cannot be appended to a path, at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30 appears to happen when there's a nixpkgs git submodule > So one of the things that is different for a git submodule is that the .git folder isn't a folder, it's a textfile that contains (in my case) this: > $ cat nix/nixos-unstable/.git > gitdir: ../../.git/modules/nixpkgs
…re/virtual0000000000000000000000005-source''" This reverts commit b67ee6e. #202244 error: a string that refers to a store path cannot be appended to a path, at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30 appears to happen when there's a nixpkgs git submodule > So one of the things that is different for a git submodule is that the .git folder isn't a folder, it's a textfile that contains (in my case) this: > $ cat nix/nixos-unstable/.git > gitdir: ../../.git/modules/nixpkgs (cherry picked from commit f0e298c)
…re/virtual0000000000000000000000005-source''" This reverts commit f41101a. NixOS/nixpkgs#202244 error: a string that refers to a store path cannot be appended to a path, at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30 appears to happen when there's a nixpkgs git submodule > So one of the things that is different for a git submodule is that the .git folder isn't a folder, it's a textfile that contains (in my case) this: > $ cat nix/nixos-unstable/.git > gitdir: ../../.git/modules/nixpkgs
…re/virtual0000000000000000000000005-source''" This reverts commit 2afa253. NixOS/nixpkgs#202244 error: a string that refers to a store path cannot be appended to a path, at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30 appears to happen when there's a nixpkgs git submodule > So one of the things that is different for a git submodule is that the .git folder isn't a folder, it's a textfile that contains (in my case) this: > $ cat nix/nixos-unstable/.git > gitdir: ../../.git/modules/nixpkgs
…re/virtual0000000000000000000000005-source''" This reverts commit d143c33. NixOS/nixpkgs#202244 error: a string that refers to a store path cannot be appended to a path, at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30 appears to happen when there's a nixpkgs git submodule > So one of the things that is different for a git submodule is that the .git folder isn't a folder, it's a textfile that contains (in my case) this: > $ cat nix/nixos-unstable/.git > gitdir: ../../.git/modules/nixpkgs
…re/virtual0000000000000000000000005-source''" This reverts commit d55cbc0. NixOS/nixpkgs#202244 error: a string that refers to a store path cannot be appended to a path, at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30 appears to happen when there's a nixpkgs git submodule > So one of the things that is different for a git submodule is that the .git folder isn't a folder, it's a textfile that contains (in my case) this: > $ cat nix/nixos-unstable/.git > gitdir: ../../.git/modules/nixpkgs
Steps To Reproduce
Steps to reproduce the behavior:
nix/nixos-unstable
to latest nixos-unstable (in this case to: af50806, it worked fine on 013fcdd which is currently locked in the repository.)nix-build ./nix/nixos-unstable/nixos/ -I nixos-config=./hosts/private-laptop/configuration.nix -A system --dry-run
Build log
Additional context
This seems to be an additional regression from #199812, if I apply the following patch the build works:
Furter testing:
I have tried to install the following nix derivations as nix package:
nix_2_3
nix_2_6
nix
Along with the correct nix daemon version in my CI builds, however none of them have managed to actually build my configuration. So to me it looks like there's not a single version of nix that can actually use nixos-unstable at the moment. Maybe it works or maybe it doesn't if one enables experimental flags? I don't know. I don't plan to do that.
Notify maintainers
cc @Artturin @roberth
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.I have also tried to pull in a newer version of nix using nix-shell just to use a newer version of nix for
nix-build
(this however doesn't affect the nix daemon version running) and I still see the same issue:The text was updated successfully, but these errors were encountered: