Skip to content
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

issue installing package on a new nix setup on macOS #88

Open
andrewcrook opened this issue Apr 22, 2023 · 6 comments
Open

issue installing package on a new nix setup on macOS #88

andrewcrook opened this issue Apr 22, 2023 · 6 comments

Comments

@andrewcrook
Copy link

andrewcrook commented Apr 22, 2023

I am having trouble getting the package to install I get the following errors.
Also see information below

Trying to install

nix-env -f release.nix -iA pip2nix.python39

Result -> FAIL

installing 'python3.9-pip2nix-0.9.0.dev1'
error:
       … while evaluating the attribute 'drvPath'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/lib/customisation.nix:163:7:

          162|       outputUnspecified = true;
          163|       drvPath = assert condition; drv.drvPath;
             |       ^
          164|       outPath = assert condition; drv.outPath;

       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: cannot coerce null to a string

OS and Nix version

>nix-shell -p nix-info --run "nix-info -m”
........
 - system: `"aarch64-darwin"`
 - host os: `Darwin 22.4.0, macOS 13.3.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.14.1`
 - nixpkgs: `/Users/andrew/.nix-defexpr/channels/nixpkgs`

Nix Doctor -> PASS

>nix doctor  
[PASS] PATH contains only one nix version.
[PASS] All profiles are gcroots.
[PASS] Client protocol matches store protocol.

Checking flake -- FAIL

> nix flake check  
error:
       … while checking flake output 'packages'

         at /nix/store/4w4b4mxfhdc9lf3rsf4qqa9z8xnijbxl-source/lib.nix:73:15:

           72|             {
           73|               ${key} = (attrs.${key} or { })
             |               ^
           74|               // (appendSystem key system ret);

       … while checking the derivation 'packages.aarch64-darwin.pip2nix'

         at /nix/store/blyv4jldr6vh881fa3j5b36lf34fdc6a-source/release.nix:20:5:

           19|
           20|     pip2nix = filterAttrs (n: v: n != "recurseForDerivations") (
             |     ^
           21|       pkgs.recurseIntoAttrs (

       error: flake attribute 'packages.aarch64-darwin.pip2nix' is not a derivation

@andrewcrook
Copy link
Author

extended trace

nix-env --show-trace -f release.nix -iA pip2nix.python39

installing 'python3.9-pip2nix-0.9.0.dev1'
error:
       … while evaluating the attribute 'drvPath'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/lib/customisation.nix:163:7:

          162|       outputUnspecified = true;
          163|       drvPath = assert condition; drv.drvPath;
             |       ^
          164|       outPath = assert condition; drv.outPath;

       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'python3.9-pip2nix-0.9.0.dev1'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/development/interpreters/python/mk-python-derivation.nix:108:5

       … while evaluating attribute 'buildInputs' of derivation 'python3.9-pip2nix-0.9.0.dev1'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/make-derivation.nix:221:11:

          220|           depsHostHost                = lib.elemAt (lib.elemAt dependencies 1) 0;
          221|           buildInputs                 = lib.elemAt (lib.elemAt dependencies 1) 1;
             |           ^
          222|           depsTargetTarget            = lib.elemAt (lib.elemAt dependencies 2) 0;

       … while evaluating derivation 'python3.9-pip-20.1.1'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/development/interpreters/python/mk-python-derivation.nix:108:5

       … while evaluating attribute 'nativeBuildInputs' of derivation 'python3.9-pip-20.1.1'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/make-derivation.nix:218:11:

          217|           depsBuildBuild              = lib.elemAt (lib.elemAt dependencies 0) 0;
          218|           nativeBuildInputs           = lib.elemAt (lib.elemAt dependencies 0) 1;
             |           ^
          219|           depsBuildTarget             = lib.elemAt (lib.elemAt dependencies 0) 2;

       … while evaluating derivation 'python3-3.9.0'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/make-derivation.nix:192:11

       … while evaluating attribute 'CPPFLAGS' of derivation 'python3-3.9.0'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/development/interpreters/python/cpython/default.nix:165:3:

          164|
          165|   CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs);
             |   ^
          166|   LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs);

       … while calling anonymous lambda

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/development/interpreters/python/cpython/default.nix:165:41:

          164|
          165|   CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs);
             |                                         ^
          166|   LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs);

       … while evaluating derivation 'zlib-1.2.11'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/development/libraries/zlib/default.nix:23:3

       … while evaluating attribute 'src' of derivation 'zlib-1.2.11'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/development/libraries/zlib/default.nix:26:3:

           25|
           26|   src = fetchurl {
             |   ^
           27|     urls =

       … while evaluating derivation 'zlib-1.2.11.tar.gz'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/build-support/fetchurl/default.nix:122:3

       … while evaluating attribute 'mirrorsFile' of derivation 'zlib-1.2.11.tar.gz'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/build-support/fetchurl/default.nix:146:10:

          145|
          146|   inherit curlOpts showURLs mirrorsFile postFetch downloadToTemp executable;
             |          ^
          147|

       … while evaluating derivation 'mirrors-list'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/build-support/fetchurl/default.nix:16:7

       … while evaluating attribute 'stdenv' of derivation 'mirrors-list'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/make-derivation.nix:202:18:

          201|           args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
          202|           inherit stdenv;
             |                  ^
          203|

       … while evaluating derivation 'stdenv'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/default.nix:84:14

       … while evaluating attribute 'initialPath' of derivation 'stdenv'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/default.nix:114:14:

          113|
          114|       inherit initialPath shell
             |              ^
          115|         defaultNativeBuildInputs defaultBuildInputs;

       … while evaluating derivation 'xz-5.2.5'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/tools/compression/xz/default.nix:9:3

       … while evaluating attribute 'src' of derivation 'xz-5.2.5'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/tools/compression/xz/default.nix:11:3:

           10|
           11|   src = fetchurl {
             |   ^
           12|     url = "https://tukaani.org/xz/${name}.tar.bz2";

       … while evaluating derivation 'xz-5.2.5.tar.bz2'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/build-support/fetchurl/default.nix:122:3

       … while evaluating attribute 'nativeBuildInputs' of derivation 'xz-5.2.5.tar.bz2'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/make-derivation.nix:218:11:

          217|           depsBuildBuild              = lib.elemAt (lib.elemAt dependencies 0) 0;
          218|           nativeBuildInputs           = lib.elemAt (lib.elemAt dependencies 0) 1;
             |           ^
          219|           depsBuildTarget             = lib.elemAt (lib.elemAt dependencies 0) 2;

       … while evaluating derivation 'curl-7.72.0'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/make-derivation.nix:192:11

       … while evaluating attribute 'configureFlags' of derivation 'curl-7.72.0'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/make-derivation.nix:232:11:

          231|           # This parameter is sometimes a string, sometimes null, and sometimes a list, yuck
          232|           configureFlags = let inherit (lib) optional elem; in
             |           ^
          233|             (/**/ if lib.isString configureFlags then [configureFlags]

       … while evaluating derivation 'openssl-1.1.1g'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/make-derivation.nix:192:11

       … while evaluating attribute 'nativeBuildInputs' of derivation 'openssl-1.1.1g'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/stdenv/generic/make-derivation.nix:218:11:

          217|           depsBuildBuild              = lib.elemAt (lib.elemAt dependencies 0) 0;
          218|           nativeBuildInputs           = lib.elemAt (lib.elemAt dependencies 0) 1;
             |           ^
          219|           depsBuildTarget             = lib.elemAt (lib.elemAt dependencies 0) 2;

       … while evaluating derivation 'perl-5.32.0'
         whose name attribute is located at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/development/interpreters/perl/default.nix:22:5

       … while evaluating attribute 'disallowedReferences' of derivation 'perl-5.32.0'

         at /nix/store/7v68hly36ys9dx3b2514y4dc3fzbhs23-nixpkgs-20.09-src/pkgs/development/interpreters/perl/default.nix:34:5:

           33|
           34|     disallowedReferences = [ stdenv.cc ];
             |     ^
           35|

       error: cannot coerce null to a string

@datakurre
Copy link
Collaborator

Have you tried with nix flakes yet?

@datakurre
Copy link
Collaborator

$ nix run github:nix-community/pip2nix
warning: Git tree '/home/mikepurvis/pip2nix' is dirty
Usage: .pip2nix-wrapped [OPTIONS] COMMAND [ARGS]...

Options:
--help Show this message and exit.

Commands:
generate Generate a .nix file with specified packages.
scaffold

@andrewcrook
Copy link
Author

Just tried as instructed. I am still getting the same failure...

$ nix run github:nix-community/pip2nix

error:
       … while evaluating the attribute 'drvPath'

         at /nix/store/w5i4gmcbscmwmmzp6k1gq0p7ixdplrrx-source/lib/customisation.nix:163:7:

          162|       outputUnspecified = true;
          163|       drvPath = assert condition; drv.drvPath;
             |       ^
          164|       outPath = assert condition; drv.outPath;

       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: cannot coerce null to a string

@datakurre
Copy link
Collaborator

Sorry for the issue, and thanks for all the details. I can access a mac next week and will try this out.

@spott
Copy link

spott commented Sep 5, 2023

I am running into the same problem on macOS. Let me know if you need any more information about my system that might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants