I’m trying to include in my nix config a directory to include resources I want to use within nixos and have included in declarative management - background images and the like. I’ve written a derivation that copies this directory into the nix store, see below. I’d like to include this derivation in a package overlay, so I can call the package from elsewhere in my config as needed. Currently, my config is structured like so:
/resources
[Files I want to use go here]
/pkgs
/derivations
My derivation to copy /resources into the store goes here
/overlays
/resources.nix
All files in /pkgs/overlays are included as package overlays on nixpkgs.
error:
… while calling anonymous lambda
[Truncated Error, see below]
error: getting status of '/nix/store/derivations/resources.nix': No such file or directory
Google Gemini Code assist seems to think that using callPackage in an overlay means it calls from the nix store not the project directory, but I can’t find any reference for this. I’m stuck on how to make this work. Any help would be appreciated.
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/activation/top-level.nix:71:12:
70| # Replace runtime dependencies
71| system = foldr ({ oldDependency, newDependency }: drv:
| ^
72| pkgs.replaceDependency { inherit oldDependency newDependency drv; }
… while calling 'foldr'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/lists.nix:121:20:
120| */
121| foldr = op: nul: list:
| ^
122| let
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/lists.nix:128:8:
127| else op (elemAt list n) (fold' (n + 1));
128| in fold' 0;
| ^
129|
… while calling 'fold''
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/lists.nix:124:15:
123| len = length list;
124| fold' = n:
| ^
125| if n == len
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/activation/top-level.nix:68:10:
67| then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"
68| else showWarnings config.warnings baseSystem;
| ^
69|
… while calling 'showWarnings'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/trivial.nix:929:28:
928|
929| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
| ^
930|
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/trivial.nix:929:33:
928|
929| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
| ^
930|
… while calling 'foldr'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/lists.nix:121:20:
120| */
121| foldr = op: nul: list:
| ^
122| let
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/lists.nix:128:8:
127| else op (elemAt list n) (fold' (n + 1));
128| in fold' 0;
| ^
129|
… while calling 'fold''
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/lists.nix:124:15:
123| len = length list;
124| fold' = n:
| ^
125| if n == len
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/activation/top-level.nix:48:16:
47| # makes it bootable. See `activatable-system.nix`.
48| baseSystem = pkgs.stdenvNoCC.mkDerivation ({
| ^
49| name = "nixos-system-${config.system.name}-${config.system.nixos.label}";
… while calling 'mkDerivation'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/pkgs/stdenv/generic/make-derivation.nix:46:5:
45| mkDerivation =
46| fnOrAttrs:
| ^
47| if builtins.isFunction fnOrAttrs
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-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/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:254:72:
253| # For definitions that have an associated option
254| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
255|
… while evaluating the option `system.systemBuilderArgs':
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:858:59:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'merge'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:582:20:
581| check = isAttrs;
582| merge = loc: defs:
| ^
583| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:583:35:
582| merge = loc: defs:
583| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
| ^
584| (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue
… while calling 'filterAttrs'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:646:5:
645| pred:
646| set:
| ^
647| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:647:29:
646| set:
647| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
| ^
648|
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:647:62:
646| set:
647| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
| ^
648|
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:583:51:
582| merge = loc: defs:
583| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
| ^
584| (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:583:86:
582| merge = loc: defs:
583| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
| ^
584| (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:836:28:
835| # Process mkMerge and mkIf properties.
836| defs' = concatMap (m:
| ^
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/activation/activatable-system.nix':
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:837:128:
836| defs' = concatMap (m:
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
838| ) defs;
… while calling 'dischargeProperties'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:908:25:
907| */
908| dischargeProperties = def:
| ^
909| if def._type or "" == "merge" then
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/activation/activation-script.nix:135:18:
134| apply = set: set // {
135| script = systemActivationScript set false;
| ^
136| };
… while calling 'systemActivationScript'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/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 /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/activation/activation-script.nix:51:9:
50|
51| ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
| ^
52|
… while calling 'textClosureMap'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/strings-with-deps.nix:75:35:
74|
75| textClosureMap = f: predefined: names:
| ^
76| concatStringsSep "\n" (map f (textClosureList predefined names));
… while calling 'id'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/trivial.nix:39:8:
38| */
39| id = x: x;
| ^
40|
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-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/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:254:72:
253| # For definitions that have an associated option
254| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
255|
… while evaluating the option `system.activationScripts.etc.text':
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:836:28:
835| # Process mkMerge and mkIf properties.
836| defs' = concatMap (m:
| ^
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/etc/etc-activation.nix':
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:837:128:
836| defs' = concatMap (m:
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
838| ) defs;
… while calling 'dischargeProperties'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:908:25:
907| */
908| dischargeProperties = def:
| ^
909| if def._type or "" == "merge" then
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:1571:24:
1570| let f = attrPath:
1571| zipAttrsWith (n: values:
| ^
1572| let here = attrPath ++ [n]; in
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:607:29:
606| merge = loc: defs:
607| zipAttrsWith (name: defs:
| ^
608| let merged = mergeDefinitions (loc ++ [name]) elemType defs;
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:836:28:
835| # Process mkMerge and mkIf properties.
836| defs' = concatMap (m:
| ^
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/etc/etc.nix':
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:837:128:
836| defs' = concatMap (m:
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
838| ) defs;
… while calling 'dischargeProperties'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:908:25:
907| */
908| dischargeProperties = def:
| ^
909| if def._type or "" == "merge" then
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:273:39:
272| then value
273| else { ${elemAt attrPath n} = atDepth (n + 1); };
| ^
274| in atDepth 0;
… while calling 'atDepth'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:270:17:
269| len = length attrPath;
270| atDepth = n:
| ^
271| if n == len
… while evaluating derivation 'etc'
whose name attribute is located at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'buildCommand' of derivation 'etc'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/pkgs/build-support/trivial-builders/default.nix:59:16:
58| enableParallelBuilding = true;
59| inherit buildCommand name;
| ^
60| passAsFile = [ "buildCommand" ]
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/etc/etc.nix:50:7:
49| mkdir -p "$out/etc"
50| ${lib.concatMapStringsSep "\n" (etcEntry: lib.escapeShellArgs [
| ^
51| "makeEtcEntry"
… while calling 'concatMapStringsSep'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/strings.nix:232:5:
231| f:
232| list: concatStringsSep sep (map f list);
| ^
233|
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/etc/etc.nix:50:37:
49| mkdir -p "$out/etc"
50| ${lib.concatMapStringsSep "\n" (etcEntry: lib.escapeShellArgs [
| ^
51| "makeEtcEntry"
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/nixos/modules/system/etc/etc.nix:50:47:
49| mkdir -p "$out/etc"
50| ${lib.concatMapStringsSep "\n" (etcEntry: lib.escapeShellArgs [
| ^
51| "makeEtcEntry"
… while calling 'concatMapStringsSep'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/strings.nix:232:5:
231| f:
232| list: concatStringsSep sep (map f list);
| ^
233|
… while calling 'escapeShellArg'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/strings.nix:1056:20:
1055| */
1056| escapeShellArg = arg:
| ^
1057| let
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-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/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:254:72:
253| # For definitions that have an associated option
254| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
255|
… while evaluating the option `environment.etc.dbus-1.source':
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:858:17:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:858:22:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'check'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:534:15:
533| descriptionClass = "noun";
534| check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
| ^
535| merge = mergeEqualOption;
… while evaluating derivation 'dbus-1'
whose name attribute is located at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'serviceDirectories' of derivation 'dbus-1'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/pkgs/development/libraries/dbus/make-dbus-conf.nix:17:12:
16| {
17| inherit serviceDirectories suidHelper apparmor;
| ^
18| preferLocalBuild = true;
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:552:14:
551| merge = loc: defs:
552| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
| ^
553| imap1 (m: def':
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:858:17:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:858:22:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'check'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:534:15:
533| descriptionClass = "noun";
534| check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
| ^
535| merge = mergeEqualOption;
… while evaluating derivation 'system-path'
whose name attribute is located at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'passAsFile' of derivation 'system-path'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/pkgs/build-support/trivial-builders/default.nix:60:9:
59| inherit buildCommand name;
60| passAsFile = [ "buildCommand" ]
| ^
61| ++ (derivationArgs.passAsFile or [ ]);
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-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/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:254:72:
253| # For definitions that have an associated option
254| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
255|
… while evaluating the option `environment.systemPackages':
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:858:59:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'merge'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:551:20:
550| check = isList;
551| merge = loc: defs:
| ^
552| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:552:35:
551| merge = loc: defs:
552| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
| ^
553| imap1 (m: def':
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/lists.nix:334:29:
333| */
334| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
335|
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/lists.nix:334:32:
333| */
334| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
335|
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/types.nix:553:21:
552| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
553| imap1 (m: def':
| ^
554| (mergeDefinitions
… while calling anonymous lambda
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:836:28:
835| # Process mkMerge and mkIf properties.
836| defs' = concatMap (m:
| ^
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/1d9p6aypwxb7s4k26i1zz9pgw63r9f9h-components/specific/sddm/theming.nix':
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:837:128:
836| defs' = concatMap (m:
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
838| ) defs;
… while calling 'dischargeProperties'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/modules.nix:908:25:
907| */
908| dischargeProperties = def:
| ^
909| if def._type or "" == "merge" then
… from call site
at /nix/store/iqf129n75cayrls3bbpyjfvc5jz8vpnc-overlays/resources.nix:3:15:
2| self: super: {
3| resources = super.callPackage (builtins.path {name = "resources"; path =../derivations/resources.nix;}) {};
| ^
4| }
… while calling 'callPackageWith'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/customisation.nix:212:35:
211| */
212| callPackageWith = autoArgs: fn: args:
| ^
213| let
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/customisation.nix:225:10:
224| # Filter out arguments that have a default value
225| (filterAttrs (name: value: ! value)
| ^
226| # Filter out arguments that would be passed
… while calling 'filterAttrs'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/attrsets.nix:646:5:
645| pred:
646| set:
| ^
647| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/customisation.nix:215:15:
214| f = if isFunction fn then fn else import fn;
215| fargs = functionArgs f;
| ^
216|
… while calling 'functionArgs'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/trivial.nix:975:18:
974| */
975| functionArgs = f:
| ^
976| if f ? __functor
… from call site
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/customisation.nix:214:14:
213| let
214| f = if isFunction fn then fn else import fn;
| ^
215| fargs = functionArgs f;
… while calling 'isFunction'
at /nix/store/5w3dp0m37794iffsbm9vd9f1xmmhda6i-source/lib/trivial.nix:991:16:
990| */
991| isFunction = f: builtins.isFunction f ||
| ^
992| (f ? __functor && isFunction (f.__functor f));
error: getting status of '/nix/store/derivations/resources.nix': No such file or directory
Yeah, I doubted the LLM would be any good, but couldn’t find much online elsewhere before.
Using Flakes, yeah.
Just realised the directory structure didn’t display properly here, it’s
/resources
/pkgs/derivations
/pkgs/overlays
I’d like the derivation to be in the /pkgs/derivations directory, so it references the /resources directory. That’s not the problem though, the problem is that the overlays seem unable to find the derivations directory to overlay the derivation.
I managed to get it working by changing the directory hierarchy to put /derivations within /overlays and /resources within /derivations. I’m not sure why it wasn’t working before, but this seems to work well enough.
I’m guessing it’s something to do with the order of adding overlays to nixpkgs? Maybe something to do with which files get copied to the store in which order?