value is a function while a set was expected
doronbehar opened this issue · comments
Doron Behar commented
- Enabled the module and saw I got the file in
/lib64/ld-linux-x86_64.so.2
. - Using this change in my /etc/nixos/flake.nix:
diff --git i/flake.nix w/flake.nix
index 0b86e95..306bf02 100644
--- i/flake.nix
+++ w/flake.nix
@@ -2,13 +2,21 @@
inputs = {
nixpkgs.url = "github:doronbehar/nixpkgs/myChannel";
syncthing-private.url = "git+file:///etc/nixos/syncthing-private";
+ nix-ld = {
+ url = "github:Mic92/nix-ld";
+ # this line assume that you also have nixpkgs as an input
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
};
- outputs = { self, nixpkgs, syncthing-private }: {
+ outputs = { self, nixpkgs, nix-ld, syncthing-private }: {
nixosConfigurations = (
nixpkgs.lib.genAttrs [ "ZENIX" "NUX" ]
(hostname: nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
- modules = [ (import ./configuration.nix hostname syncthing-private) ];
+ modules = [
+ nix-ld.nixosModules.nix-ld
+ (import ./configuration.nix hostname syncthing-private)
+ ];
})
) // {
# Other machines, with dedicated, configuartion.nix
And then:
$ nix-shell zoom.nix
at: (281:44) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
280| options = {};
281| config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]));
| ^
282| };
value is a function while a set was expected
(use '--show-trace' to show detailed location information)
And:
$ nix shell nixpkgs#nixStable -c nix-shell zoom.nix
warning: unknown setting 'experimental-features'
error: value is a function while a set was expected, at /nix/store/g9ph7c86sbwyp9pyv6wfdh9s0yl6h3lg-myChannel.tar.gz/lib/modules.nix:281:44
(use '--show-trace' to show detailed location information)
Full trace:
error: --- TypeError --------------------------------------------------------------------------------------------------------------- nix-shell
at: (281:44) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
280| options = {};
281| config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]));
| ^
282| };
value is a function while a set was expected
----------------------------------------------------------------- show-trace -----------------------------------------------------------------
trace: while evaluating 'addMeta'
at: (256:17) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
255| let
256| addMeta = config: if m ? meta
| ^
257| then mkMerge [ config { meta = m.meta; } ]
trace: from call site
at: (281:35) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
280| options = {};
281| config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]));
| ^
282| };
trace: while evaluating 'addFreeformType'
at: (259:25) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
258| else config;
259| addFreeformType = config: if m ? freeformType
| ^
260| then mkMerge [ config { _module.freeformType = m.freeformType; } ]
trace: from call site
at: (281:18) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
280| options = {};
281| config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]));
| ^
282| };
trace: while evaluating the attribute 'config'
at: (281:9) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
280| options = {};
281| config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]));
| ^
282| };
trace: while evaluating 'pushDownProperties'
at: (576:24) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
575| */
576| pushDownProperties = cfg:
| ^
577| if cfg._type or "" == "merge" then
trace: from call site
at: (337:73) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
336| mergeModules' prefix modules
337| (concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);
| ^
338|
trace: while evaluating anonymous lambda
at: (337:19) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
336| mergeModules' prefix modules
337| (concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);
| ^
338|
trace: from call site
at: (337:8) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
336| mergeModules' prefix modules
337| (concatMap (m: map (config: { file = m._file; inherit config; }) (pushDownProperties m.config)) modules);
| ^
338|
trace: while evaluating 'byName'
at: (362:25) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
361| */
362| byName = attr: f: modules:
| ^
363| foldl' (acc: module:
trace: from call site
at: (374:21) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
373| # an attrset 'name' => list of submodules that define ‘name’.
374| defnsByName = byName "config" (module: value:
| ^
375| map (config: { inherit (module) file; inherit config; }) (pushDownProperties value)
trace: while evaluating 'byName'
at: (362:25) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
361| */
362| byName = attr: f: modules:
| ^
363| foldl' (acc: module:
trace: from call site
at: (378:22) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
377| # extract the definitions for each loc
378| defnsByName' = byName "config" (module: value:
| ^
379| [{ inherit (module) file; inherit value; }]
trace: while evaluating the attribute 'values'
at: (637:7) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
636| in {
637| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
638| inherit highestPrio;
trace: while evaluating the attribute 'values'
at: (538:9) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
537| in {
538| values = defs''';
| ^
539| inherit (defs'') highestPrio;
trace: while evaluating the attribute 'mergedValue'
at: (544:5) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
543| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
544| mergedValue =
| ^
545| if isDefined then
trace: while evaluating the option `_module.freeformType':
trace: while evaluating the attribute 'value'
at: (512:9) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
511| in warnDeprecation opt //
512| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
513| inherit (res.defsFinal') highestPrio;
trace: while evaluating anonymous lambda
at: (139:72) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
138| # For definitions that have an associated option
139| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
140|
trace: from call site
at: (279:20) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/attrsets.nix
278| then recurse (path ++ [name]) value
279| else f (path ++ [name]) value;
| ^
280| in mapAttrs g set;
trace: while evaluating 'g'
at: (276:19) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/attrsets.nix
275| g =
276| name: value:
| ^
277| if isAttrs value && cond value
trace: from call site
trace: while evaluating the attribute '_module.freeformType'
trace: while evaluating 'evalModules'
at: (62:17) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/modules.nix
61| evalModules) and the less declarative the module set is. */
62| evalModules = { modules
| ^
63| , prefix ? []
trace: from call site
at: (58:12) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/nixos/lib/eval-config.nix
57| # system configuration.
58| inherit (lib.evalModules {
| ^
59| inherit prefix check;
trace: while evaluating the attribute 'config.nixpkgs.overlays'
at: (64:5) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/nixos/lib/eval-config.nix
63| { modulesPath = builtins.toString ../modules; } // specialArgs;
64| }) config options _module;
| ^
65|
trace: while evaluating anonymous lambda
at: (1:7) in file: /etc/nixos/overlays-compat/overlays.nix
1| self: super:
| ^
2| with super.lib;
trace: from call site
at: (69:67) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/fixed-points.nix
68| #
69| extends = f: rattrs: self: let super = rattrs self; in super // f self super;
| ^
70|
trace: while evaluating 'extends'
at: (69:24) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/fixed-points.nix
68| #
69| extends = f: rattrs: self: let super = rattrs self; in super // f self super;
| ^
70|
trace: from call site
at: (69:42) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/fixed-points.nix
68| #
69| extends = f: rattrs: self: let super = rattrs self; in super // f self super;
| ^
70|
trace: while evaluating 'extends'
at: (69:24) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/fixed-points.nix
68| #
69| extends = f: rattrs: self: let super = rattrs self; in super // f self super;
| ^
70|
trace: from call site
at: (19:20) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/fixed-points.nix
18| # details.
19| fix = f: let x = f x; in x;
| ^
20|
trace: while evaluating 'fix'
at: (19:9) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/lib/fixed-points.nix
18| # details.
19| fix = f: let x = f x; in x;
| ^
20|
trace: from call site
at: (252:3) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/top-level/stage.nix
251| # Return the complete set of packages.
252| lib.fix toFix
| ^
trace: while evaluating anonymous lambda
at: (12:1) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/top-level/stage.nix
11|
12| { ## Misc parameters kept the same for all stages
| ^
13| ##
trace: from call site
at: (116:26) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/top-level/default.nix
115| # sets. Only apply arguments which no stdenv would want to override.
116| allPackages = newArgs: import ./stage.nix ({
| ^
117| inherit lib nixpkgsFun;
trace: while evaluating 'allPackages'
at: (116:17) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/top-level/default.nix
115| # sets. Only apply arguments which no stdenv would want to override.
116| allPackages = newArgs: import ./stage.nix ({
| ^
117| inherit lib nixpkgsFun;
trace: from call site
at: (101:12) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/stdenv/booter.nix
100| then args'
101| else allPackages ((builtins.removeAttrs args' ["selfBuild"]) // {
| ^
102| adjacentPackages = if args.selfBuild or true then null else rec {
trace: while evaluating 'folder'
at: (89:33) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/stdenv/booter.nix
88| # debugging purposes.
89| folder = nextStage: stageFun: prevStage: let
| ^
90| args = stageFun prevStage;
trace: from call site
at: (68:18) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/stdenv/booter.nix
67| # Note the cycle -- call-by-need ensures finite fold.
68| cur = op pred (builtins.elemAt list n) succ;
| ^
69| succ = go cur (n + 1);
trace: while evaluating 'go'
at: (63:18) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/stdenv/booter.nix
62| len = builtins.length list;
63| go = pred: n:
| ^
64| if n == len
trace: from call site
at: (72:13) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/stdenv/booter.nix
71| lapp = lnul cur;
72| cur = go lapp 0;
| ^
73| in cur;
trace: while evaluating 'dfold'
at: (60:27) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/stdenv/booter.nix
59| */
60| dfold = op: lnul: rnul: list:
| ^
61| let
trace: from call site
at: (136:4) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/stdenv/booter.nix
135|
136| in dfold folder postStage (_: {}) withAllowCustomOverrides
| ^
trace: while evaluating anonymous lambda
at: (42:1) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/stdenv/booter.nix
41| # other words, this does a foldr not foldl.
42| stageFuns: let
| ^
43|
trace: from call site
at: (126:10) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/top-level/default.nix
125|
126| pkgs = boot stages;
| ^
127|
trace: while evaluating anonymous lambda
at: (20:1) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/top-level/default.nix
19|
20| { # The system packages will be built on. See the manual for the
| ^
21| # subtle division of labor between these two `*System`s and the three
trace: from call site
at: (84:1) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/top-level/impure.nix
83|
84| import ./. (builtins.removeAttrs args [ "system" "platform" ] // {
| ^
85| inherit config overlays crossSystem crossOverlays;
trace: while evaluating anonymous lambda
at: (15:1) in file: /nix/store/bqkrixcaa2h9awdsb4b5rrwc288fl264-source/pkgs/top-level/impure.nix
14|
15| { # We combine legacy `system` and `platform` into `localSystem`, if
| ^
16| # `localSystem` was not passed. Strictly speaking, this is pure desugar, but
trace: from call site
at: (1:6) in file: /home/doron/repos/nix-ld/examples/zoom.nix
1| with import <nixpkgs> {};
| ^
2|
Jörg Thalheim commented
I don't know what myChannel.tar.gz
, but it does not look like code that comes from nix-ld. You might want to find out if this comes from some overlay.
Jörg Thalheim commented
Ok. It might be the import of nixpkgs that is broken.
It fails in the very first line:
with import <nixpkgs> {};
Jörg Thalheim commented
Closing because this does not look like an issue of nix-ld.