Skip to content

Instantly share code, notes, and snippets.

@vivekhaldar
Created February 12, 2023 15:57
Show Gist options
  • Save vivekhaldar/e700f385dde7ba8d6b0a623000f74778 to your computer and use it in GitHub Desktop.
Save vivekhaldar/e700f385dde7ba8d6b0a623000f74778 to your computer and use it in GitHub Desktop.
devenv error for Python setup with Poetry
devenv.sh:
{ pkgs, ... }:
{
env.GREET = "Python-based dev env for copy-pics";
languages.python = {
enable = true;
poetry.enable = true;
};
}
Error output:
warning: applying 'toString' to path '«github:cachix/devenv/f623bbc43665fef680bdb9efd1abf26d57a8a00e»/src/modules/languages/python.nix' and then accessing it is deprecated, at «stdin»:0
error:
at «github:cachix/devenv/f623bbc43665fef680bdb9efd1abf26d57a8a00e»/src/modules/mkNakedShell.nix:62:12:
61| derivationArg = {
62| inherit name system;
| ^
63|
… while evaluating the attribute 'args' of the derivation 'devenv-shell'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/stdenv/generic/make-derivation.nix:286:7:
285| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
286| name =
| ^
287| let
… while evaluating the attribute 'passAsFile' of the derivation 'devenv-profile'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/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'
at «github:cachix/devenv/f623bbc43665fef680bdb9efd1abf26d57a8a00e»/src/modules/top-level.nix:16:13:
15| name = "devenv-profile";
16| paths = lib.flatten (builtins.map drvOrPackageToPaths config.packages);
| ^
17| ignoreCollisions = true;
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/lists.nix:138:13:
137| */
138| flatten = x:
| ^
139| if isList x
… while calling 'flatten'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/attrsets.nix:535:19:
534| g =
535| name: value:
| ^
536| if isAttrs value && cond value
… while calling 'g'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/attrsets.nix:538:20:
537| then recurse (path ++ [name]) value
538| else f (path ++ [name]) value;
| ^
539| in mapAttrs g;
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:270:72:
269| # For definitions that have an associated option
270| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
271|
… while calling anonymous lambda
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:728:9:
727| in warnDeprecation opt //
728| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
729| inherit (res.defsFinal') highestPrio;
… while evaluating the attribute 'value'
… while evaluating the option `packages':
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:763:5:
762| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
763| mergedValue =
| ^
764| if isDefined then
… while evaluating the attribute 'mergedValue'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:765:59:
764| if isDefined then
765| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
766| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/types.nix:491:20:
490| check = isList;
491| merge = loc: defs:
| ^
492| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
… while calling 'merge'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/types.nix:492:35:
491| merge = loc: defs:
492| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
| ^
493| imap1 (m: def':
… while calling anonymous lambda
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/lists.nix:117:29:
116| */
117| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
118|
… while calling anonymous lambda
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/lists.nix:117:32:
116| */
117| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
118|
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/types.nix:493:21:
492| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
493| imap1 (m: def':
| ^
494| (mergeDefinitions
… while calling anonymous lambda
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:775:5:
774|
775| optionalValue =
| ^
776| if isDefined then { value = mergedValue; }
… while evaluating the attribute 'optionalValue'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:757:9:
756| in {
757| values = defs''';
| ^
758| inherit (defs'') highestPrio;
… while evaluating the attribute 'values'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:856:7:
855| in {
856| values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
| ^
857| inherit highestPrio;
… while evaluating the attribute 'values'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:743:17:
742| # Process mkMerge and mkIf properties.
743| defs' = concatMap (m:
| ^
744| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:743:28:
742| # Process mkMerge and mkIf properties.
743| defs' = concatMap (m:
| ^
744| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while calling anonymous lambda
… while evaluating definitions from `«github:cachix/devenv/f623bbc43665fef680bdb9efd1abf26d57a8a00e»/src/modules/languages/python.nix':
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:744:137:
743| defs' = concatMap (m:
744| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
745| ) defs;
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:815:25:
814| */
815| dischargeProperties = def:
| ^
816| if def._type or "" == "merge" then
… while calling 'dischargeProperties'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/types.nix:497:38:
496| elemType
497| [{ inherit (def) file; value = def'; }]
| ^
498| ).optionalValue
… while evaluating the attribute 'value'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/attrsets.nix:535:19:
534| g =
535| name: value:
| ^
536| if isAttrs value && cond value
… while calling 'g'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/attrsets.nix:538:20:
537| then recurse (path ++ [name]) value
538| else f (path ++ [name]) value;
| ^
539| in mapAttrs g;
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:270:72:
269| # For definitions that have an associated option
270| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
271|
… while calling anonymous lambda
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:728:9:
727| in warnDeprecation opt //
728| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
729| inherit (res.defsFinal') highestPrio;
… while evaluating the attribute 'value'
… while evaluating the option `languages.python.poetry.package':
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:763:5:
762| # Type-check the remaining definitions, and merge them. Or throw if no definitions.
763| mergedValue =
| ^
764| if isDefined then
… while evaluating the attribute 'mergedValue'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:757:9:
756| in {
757| values = defs''';
| ^
758| inherit (defs'') highestPrio;
… while evaluating the attribute 'values'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:753:14:
752| # Avoid sorting if we don't have to.
753| if any (def: def.value._type or "" == "order") defs''.values
| ^
754| then sortProperties defs''.values
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:753:19:
752| # Avoid sorting if we don't have to.
753| if any (def: def.value._type or "" == "order") defs''.values
| ^
754| then sortProperties defs''.values
… while calling anonymous lambda
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:854:73:
853| highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;
854| strip = def: if def.value._type or "" == "override" then def // { value = def.value.content; } else def;
| ^
855| in {
… while evaluating the attribute 'value._type'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/modules.nix:901:14:
900| { _type = "override";
901| inherit priority content;
| ^
902| };
… while evaluating the attribute 'value.content'
at «github:cachix/devenv/f623bbc43665fef680bdb9efd1abf26d57a8a00e»/src/modules/languages/python.nix:23:9:
22| type = lib.types.package;
23| default = cfg.package.pkgs.poetry;
| ^
24| defaultText = lib.literalExpression "config.languages.python.package.pkgs.poetry";
… while evaluating the attribute 'default'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/development/interpreters/python/default.nix:40:24:
39| valid = value: pythonPackages.hasPythonModule value || providesSetupHook value || lib.elem value exceptions;
40| func = name: value:
| ^
41| if lib.isDerivation value then
… while calling 'func'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/development/interpreters/python/default.nix:41:16:
40| func = name: value:
41| if lib.isDerivation value then
| ^
42| lib.extendDerivation (valid value || throw "${name} should use `buildPythonPackage` or `toPythonModule` if it is to be part of the Python packages set.") {} value
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/attrsets.nix:576:5:
575| # Value to check.
576| value: value.type or null == "derivation";
| ^
577|
… while calling 'isDerivation'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/top-level/python-aliases.nix:27:22:
26| mapAliases = aliases:
27| lib.mapAttrs (n: alias: removeDistribute
| ^
28| (removeRecurseForDerivations
… while calling anonymous lambda
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/top-level/python-aliases.nix:27:29:
26| mapAliases = aliases:
27| lib.mapAttrs (n: alias: removeDistribute
| ^
28| (removeRecurseForDerivations
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/top-level/python-aliases.nix:15:22:
14| # sets from building on Hydra.
15| removeDistribute = alias: with lib;
| ^
16| if isDerivation alias then
… while calling 'removeDistribute'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/top-level/python-aliases.nix:16:8:
15| removeDistribute = alias: with lib;
16| if isDerivation alias then
| ^
17| dontDistribute alias
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/lib/attrsets.nix:576:5:
575| # Value to check.
576| value: value.type or null == "derivation";
| ^
577|
… while calling 'isDerivation'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/top-level/python-aliases.nix:28:31:
27| lib.mapAttrs (n: alias: removeDistribute
28| (removeRecurseForDerivations
| ^
29| (checkInPkgs n alias)))
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/top-level/python-aliases.nix:8:33:
7| # set to appear while listing all the packages available.
8| removeRecurseForDerivations = alias: with lib;
| ^
9| if alias.recurseForDerivations or false then
… while calling 'removeRecurseForDerivations'
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/top-level/python-aliases.nix:29:32:
28| (removeRecurseForDerivations
29| (checkInPkgs n alias)))
| ^
30| aliases;
… from call site
at «github:NixOS/nixpkgs/6ccc4a59c3f1b56d039d93da52696633e641bc71»/pkgs/top-level/python-aliases.nix:22:20:
21| # python-packages.nix.
22| checkInPkgs = n: alias: if builtins.hasAttr n super
| ^
23| then throw "Alias ${n} is still in python-packages.nix"
… while calling 'checkInPkgs'
error: poetry was promoted to a top-level attribute, use poetry-core to build Python packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment