Skip to content

Instantly share code, notes, and snippets.

@mausch
Created November 28, 2021 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mausch/1ce63b5caf6918c5b6e9773e3bd3d119 to your computer and use it in GitHub Desktop.
Save mausch/1ce63b5caf6918c5b6e9773e3bd3d119 to your computer and use it in GitHub Desktop.
git flakes currentSystem error
building the system configuration...
error: attribute 'currentSystem' missing
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/top-level/impure.nix:18:43:
17| # (build, in GNU Autotools parlance) platform.
18| localSystem ? { system = args.system or builtins.currentSystem; }
| ^
19|
… while evaluating anonymous lambda
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/stdenv/default.nix:7:1:
6|
7| { # Args just for stdenvs' usage
| ^
8| lib
… from call site
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/top-level/default.nix:118:12:
117|
118| stages = stdenvStages {
| ^
119| inherit lib localSystem crossSystem config overlays crossOverlays;
… while evaluating 'reverseList'
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/lib/lists.nix:393:17:
392| */
393| reverseList = xs:
| ^
394| let l = length xs; in genList (n: elemAt xs (l - n - 1)) l;
… from call site
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/stdenv/booter.nix:85:6:
84| // (stageFun prevStage))
85| (lib.lists.reverseList stageFuns);
| ^
86|
… while evaluating 'imap1'
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/lib/lists.nix:116:14:
115| */
116| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
117|
… from call site
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/stdenv/booter.nix:78:30:
77| # isn't already set.
78| withAllowCustomOverrides = lib.lists.imap1
| ^
79| (index: stageFun: prevStage:
… while evaluating 'go'
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/stdenv/booter.nix:63:18:
62| len = builtins.length list;
63| go = pred: n:
| ^
64| if n == len
… from call site
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/stdenv/booter.nix:72:13:
71| lapp = lnul cur;
72| cur = go lapp 0;
| ^
73| in cur;
… while evaluating 'dfold'
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/stdenv/booter.nix:60:27:
59| */
60| dfold = op: lnul: rnul: list:
| ^
61| let
… from call site
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/stdenv/booter.nix:136:4:
135|
136| in dfold folder postStage (_: {}) withAllowCustomOverrides
| ^
… while evaluating anonymous lambda
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/stdenv/booter.nix:42:1:
41| # other words, this does a foldr not foldl.
42| stageFuns: let
| ^
43|
… from call site
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/top-level/default.nix:122:10:
121|
122| pkgs = boot stages;
| ^
123|
… while evaluating anonymous lambda
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/top-level/default.nix:19:1:
18|
19| { # The system packages will be built on. See the manual for the
| ^
20| # subtle division of labor between these two `*System`s and the three
… from call site
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/top-level/impure.nix:83:1:
82|
83| import ./. (builtins.removeAttrs args [ "system" ] // {
| ^
84| inherit config overlays localSystem;
… while evaluating anonymous lambda
at /nix/store/mk4x3mhmgmzx0j0dda26ay19x22yxbyj-source/pkgs/top-level/impure.nix:15:1:
14|
15| { # We put legacy `system` into `localSystem`, if `localSystem` was not passed.
| ^
16| # If neither is passed, assume we are building packages on the current
… from call site
at /nix/store/apqjxw3dx7x8lh8gdibhcyc212sfrllx-source/configuration.nix:19:28:
18|
19| boot.kernelPackages = (import (fetchTarball {
| ^
20| url = "https://github.com/NixOS/nixpkgs/archive/f77036342e2b690c61c97202bf48f2ce13acc022.tar.gz";
… while evaluating the attribute 'value'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:392:44:
391| defnsByName' = byName "config" (module: value:
392| [{ inherit (module) file; inherit value; }]
| ^
393| ) configs;
… while evaluating 'dischargeProperties'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:609:25:
608| */
609| dischargeProperties = def:
| ^
610| if def._type or "" == "merge" then
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:538:137:
537| defs' = concatMap (m:
538| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
539| ) defs;
… while evaluating definitions from `/nix/store/apqjxw3dx7x8lh8gdibhcyc212sfrllx-source/configuration.nix':
… while evaluating anonymous lambda
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:537:28:
536| # Process mkMerge and mkIf properties.
537| defs' = concatMap (m:
| ^
538| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:537:17:
536| # Process mkMerge and mkIf properties.
537| defs' = concatMap (m:
| ^
538| 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/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:650:7:
649| in {
650| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
651| inherit highestPrio;
… while evaluating the attribute 'values'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:551:9:
550| in {
551| values = defs''';
| ^
552| inherit (defs'') highestPrio;
… while evaluating the attribute 'mergedValue'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:557:5:
556| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
557| mergedValue =
| ^
558| if isDefined then
… while evaluating 'apply'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/nixos/modules/system/boot/kernel.nix:40:15:
39| type = types.unspecified // { merge = mergeEqualOption; };
40| apply = kernelPackages: kernelPackages.extend (self: super: {
| ^
41| kernel = super.kernel.override (originalArgs: {
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:518:35:
517| # yield a value computed from the definitions
518| value = if opt ? apply then opt.apply res.mergedValue else res.mergedValue;
| ^
519|
… while evaluating the option `boot.kernelPackages':
… while evaluating the attribute 'value'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:525:9:
524| in warnDeprecation opt //
525| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
526| inherit (res.defsFinal') highestPrio;
… while evaluating anonymous lambda
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:140:72:
139| # For definitions that have an associated option
140| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
141|
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/attrsets.nix:301:20:
300| then recurse (path ++ [name]) value
301| else f (path ++ [name]) value;
| ^
302| in mapAttrs g set;
… while evaluating 'g'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/attrsets.nix:298:19:
297| g =
298| name: value:
| ^
299| if isAttrs value && cond value
… from call site
… while evaluating the attribute 'content'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:693:14:
692| { _type = "if";
693| inherit condition content;
| ^
694| };
… while evaluating 'dischargeProperties'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:609:25:
608| */
609| dischargeProperties = def:
| ^
610| if def._type or "" == "merge" then
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:615:11:
614| if def.condition then
615| dischargeProperties def.content
| ^
616| else
… while evaluating 'dischargeProperties'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:609:25:
608| */
609| dischargeProperties = def:
| ^
610| if def._type or "" == "merge" then
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:538:137:
537| defs' = concatMap (m:
538| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
539| ) defs;
… while evaluating definitions from `/nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/nixos/modules/system/boot/kernel.nix':
… while evaluating anonymous lambda
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:537:28:
536| # Process mkMerge and mkIf properties.
537| defs' = concatMap (m:
| ^
538| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:537:17:
536| # Process mkMerge and mkIf properties.
537| defs' = concatMap (m:
| ^
538| 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/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:650:7:
649| in {
650| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
651| inherit highestPrio;
… while evaluating the attribute 'values'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:551:9:
550| in {
551| values = defs''';
| ^
552| inherit (defs'') highestPrio;
… while evaluating the attribute 'mergedValue'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:557:5:
556| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
557| mergedValue =
| ^
558| if isDefined then
… while evaluating the option `assertions':
… while evaluating the attribute 'value'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:525:9:
524| in warnDeprecation opt //
525| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
526| inherit (res.defsFinal') highestPrio;
… while evaluating anonymous lambda
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/modules.nix:140:72:
139| # For definitions that have an associated option
140| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
141|
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/attrsets.nix:301:20:
300| then recurse (path ++ [name]) value
301| else f (path ++ [name]) value;
| ^
302| in mapAttrs g set;
… while evaluating 'g'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/attrsets.nix:298:19:
297| g =
298| name: value:
| ^
299| if isAttrs value && cond value
… from call site
… while evaluating 'fold''
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/lists.nix:55:15:
54| len = length list;
55| fold' = n:
| ^
56| if n == len
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/lists.nix:59:8:
58| else op (elemAt list n) (fold' (n + 1));
59| in fold' 0;
| ^
60|
… while evaluating 'foldr'
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/lib/lists.nix:52:20:
51| */
52| foldr = op: nul: list:
| ^
53| let
… from call site
at /nix/store/9v2i11v8nnfczb3hcvhb195p0m2n5w92-source/nixos/modules/system/activation/top-level.nix:128:12:
127| # Replace runtime dependencies
128| system = fold ({ oldDependency, newDependency }: drv:
| ^
129| pkgs.replaceDependency { inherit oldDependency newDependency drv; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment