Skip to content

Unable to install on m1 macbook #669

Description

@richardstrnad

Describe the bug
I was able to install nix on a m1 powered macbook (macOS 12.2.1) and can run some sample nix commands (e.g. nix-env -i hello)
But trying to run nix-env -if https://github.com/srid/neuron/archive/master.tar.gz -v doesn't produce much output and the installation doesn't seem to happen.
Could be related to nix, but maybe someone here can provide some help.

→ nix-env -if https://github.com/srid/neuron/archive/master.tar.gz -v
evaluating file '/nix/store/bx68jzgl62hfd4cfkma6qh79igiy4ymr-source/default.nix'
evaluating file '/nix/store/2mpgi4bvn8py4liv9w3mjxd2c5r7bvv8-source/default.nix'
evaluating file '/nix/store/bx68jzgl62hfd4cfkma6qh79igiy4ymr-source/flake.nix'
evaluating file '/nix/store/ncc4g52f8n965r6xd30283hw4lgw9lpy-source/flake.nix'
evaluating file '/nix/store/ncc4g52f8n965r6xd30283hw4lgw9lpy-source/default.nix'
evaluating file '/nix/store/bx68jzgl62hfd4cfkma6qh79igiy4ymr-source/home-manager-module.nix'
evaluating file '/nix/store/w45wpv1xdc3p3z541iq6fbii9wpyv0nx-env-manifest.nix'

To Reproduce
Steps to reproduce the behavior:

  1. Install nix on a m1 powered macbook
  2. Try to install neuron via nix-env

Desktop (please complete the following information):

  • macOS 12.2.1
  • 13" macbook pro m1

Activity

  1. srid commented on Apr 6, 2022

    @srid
    Owner

    @richardstrnad Neuron is in maintenance mode. You can try:

    nix-env -if https://github.com/srid/neuron/archive/update.tar.gz -v
    

    Which should use #670 - but it is in draft, so YMMV.


    I'd just suggest you switch to Emanote, which does work on M1 mac. Otherwise somebody needs to spend some time porting neuron to m1 mac.

  2. richardstrnad commented on Apr 6, 2022

    @richardstrnad
    Author

    Thanks for the quick reply!

    I saw the information about Emanote, but unfortunately the really nice https://github.com/oberblastmeister/neuron.nvim nvim plugin does currently only support Neuron (as far as I understand at least). That was the reason why i would love to keep using Neuron (for now).

    The installation is currently running, will update later.

  3. srid commented on Apr 6, 2022

    @srid
    Owner

    I came close to getting it to build on M1. It compiles, but segfaults at linking stage: #670 (comment)

    Perhaps you can bribe one of the Nix people to help fix it :-)

  4. richardstrnad commented on Apr 6, 2022

    @richardstrnad
    Author

    Will give it a try ;-)

    Thanks for the help and the great product (using it already on my intel based macbook). Issue can be closed from my point of view.

  5. srid commented on Apr 26, 2022

    @srid
    Owner

    I'd like to support M1 if possible. I could use some Nix help in #670

  6. reopened this on Apr 26, 2022
  7. sk91 commented on Jul 7, 2022

    @sk91

    :( have the same issue, want to use neuron.nvim but cannot install neuron on Mac M1 Max

    tried to install the update branch, but it does not work yet

    log
    nix run github:srid/neuron/update --extra-experimental-features nix-command --extra-experimental-features flakes --show-trace
    error: failed to extract archive (Can't replace existing directory with non-directory)
    
       … while evaluating 'fetch'
    
       at /nix/store/34y73fm1wiv6570agjs633q1r3z0m0kh-source/dep/directory-contents/thunk.nix:2:13:
    
            1| # DO NOT HAND-EDIT THIS FILE
            2| let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
             |             ^
            3|   if !fetchSubmodules && !private then builtins.fetchTarball {
    
       … from call site
    
       at /nix/store/34y73fm1wiv6570agjs633q1r3z0m0kh-source/dep/directory-contents/thunk.nix:9:4:
       … while evaluating the file '/nix/store/34y73fm1wiv6570agjs633q1r3z0m0kh-source/dep/directory-contents/thunk.nix':
    
       … while evaluating 'thunkSource'
    
       at /nix/store/622mj251cgg8kfi4y8vyyp3nllqjljy7-source/default.nix:27:17:
    
           26|   # Retrieve source that is controlled by the hack-* scripts; it may be either a stub or a checked-out git repo
           27|   thunkSource = p:
             |                 ^
           28|     let
    
       … from call site
    
       at /nix/store/34y73fm1wiv6570agjs633q1r3z0m0kh-source/project.nix:50:26:
    
           49|     pandoc-link-context = thunkSource ./dep/pandoc-link-context;
           50|     directory-contents = thunkSource ./dep/directory-contents;
             |                          ^
           51|     reflex-fsnotify = thunkSource ./dep/reflex-fsnotify;
    
       … while evaluating the attribute 'directory-contents'
    
       at /nix/store/34y73fm1wiv6570agjs633q1r3z0m0kh-source/project.nix:50:5:
    
           49|     pandoc-link-context = thunkSource ./dep/pandoc-link-context;
           50|     directory-contents = thunkSource ./dep/directory-contents;
             |     ^
           51|     reflex-fsnotify = thunkSource ./dep/reflex-fsnotify;
    
       … while evaluating 'canCleanSource'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/lib/sources.nix:230:20:
    
          229|
          230|   canCleanSource = src: src ? _isLibCleanSourceWith || !(pathHasContext (toString src));
             |                    ^
          231|
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:207:20:
    
          206|           inherit name extraCabal2nixOptions;
          207|           src = if pkgs.lib.canCleanSource src
             |                    ^
          208|                   then pkgs.lib.cleanSourceWith { inherit src filter; }
    
       … while evaluating the attribute 'buildCommand' of the derivation 'cabal2nix-directory-contents'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/stdenv/generic/make-derivation.nix:205:7:
    
          204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          205|       name =
             |       ^
          206|         let
    
       … while realising the context of a path
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:87:47:
    
           86|       # info that callPackage uses to determine the arguments).
           87|       drv = if lib.isFunction fn then fn else import fn;
             |                                               ^
           88|       auto = builtins.intersectAttrs (lib.functionArgs drv) scope;
    
       … while evaluating 'ensureAttrs'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:91:21:
    
           90|       # Converts a returned function to a functor attribute set if necessary
           91|       ensureAttrs = v: if builtins.isFunction v then { __functor = _: v; } else v;
             |                     ^
           92|
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:94:27:
    
           93|       # this wraps the `drv` function to add a `overrideScope` function to the result.
           94|       drvScope = allArgs: ensureAttrs (drv allArgs) // {
             |                           ^
           95|         overrideScope = f:
    
       … while evaluating 'drvScope'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:94:18:
    
           93|       # this wraps the `drv` function to add a `overrideScope` function to the result.
           94|       drvScope = allArgs: ensureAttrs (drv allArgs) // {
             |                  ^
           95|         overrideScope = f:
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/lib/customisation.nix:69:16:
    
           68|     let
           69|       result = f origArgs;
             |                ^
           70|
    
       … while evaluating 'makeOverridable'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/lib/customisation.nix:67:24:
    
           66|   */
           67|   makeOverridable = f: origArgs:
             |                        ^
           68|     let
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:104:8:
    
          103|       };
          104|     in lib.makeOverridable drvScope (auto // manualArgs);
             |        ^
          105|
    
       … while evaluating 'callPackageWithScope'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:78:37:
    
           77|   # here `bar` is a manual argument.
           78|   callPackageWithScope = scope: fn: manualArgs:
             |                                     ^
           79|     let
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:121:28:
    
          120|   defaultScope = mkScope self;
          121|   callPackage = drv: args: callPackageWithScope defaultScope drv args;
             |                            ^
          122|
    
       … while evaluating 'callPackage'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:121:22:
    
          120|   defaultScope = mkScope self;
          121|   callPackage = drv: args: callPackageWithScope defaultScope drv args;
             |                      ^
          122|
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:169:9:
    
          168|       };
          169|     }) (self.callPackage src args);
             |         ^
          170|
    
       … while evaluating 'overrideCabal'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/lib/compose.nix:38:22:
    
           37|    */
           38|   overrideCabal = f: drv: (drv.override (args: args // {
             |                      ^
           39|     mkDerivation = drv: (args.mkDerivation drv).override f;
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:157:5:
    
          156|   callPackageKeepDeriver = src: args:
          157|     overrideCabal (orig: {
             |     ^
          158|       preConfigure = ''
    
       … while evaluating 'callPackageKeepDeriver'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:156:33:
    
          155|   # annoyance.
          156|   callPackageKeepDeriver = src: args:
             |                                 ^
          157|     overrideCabal (orig: {
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:213:14:
    
          212|            inherit src;
          213|          }) (callPackageKeepDeriver expr args);
             |              ^
          214|
    
       … while evaluating 'overrideCabal'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/lib/compose.nix:38:22:
    
           37|    */
           38|   overrideCabal = f: drv: (drv.override (args: args // {
             |                      ^
           39|     mkDerivation = drv: (args.mkDerivation drv).override f;
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:211:10:
    
          210|         };
          211|       in overrideCabal (orig: {
             |          ^
          212|            inherit src;
    
       … while evaluating 'callCabal2nixWithOptions'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:200:66:
    
          199|     # Creates a Haskell package from a source package by calling cabal2nix on the source.
          200|     callCabal2nixWithOptions = name: src: extraCabal2nixOptions: args:
             |                                                                  ^
          201|       let
    
       … from call site
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:215:38:
    
          214|
          215|     callCabal2nix = name: src: args: self.callCabal2nixWithOptions name src "" args;
             |                                      ^
          216|
    
       … while evaluating 'callCabal2nix'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/development/haskell-modules/make-package-set.nix:215:32:
    
          214|
          215|     callCabal2nix = name: src: args: self.callCabal2nixWithOptions name src "" args;
             |                                ^
          216|
    
       … from call site
    
       at /nix/store/34y73fm1wiv6570agjs633q1r3z0m0kh-source/project.nix:77:26:
    
           76|
           77|     directory-contents = self.callCabal2nix "directory-contents" sources.directory-contents { };
             |                          ^
           78|
    
       … while evaluating anonymous lambda
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/stdenv/generic/make-derivation.nix:156:13:
    
          155|       (map (drv: drv.__spliced.hostHost or drv) depsHostHost)
          156|       (map (drv: drv.crossDrv or drv) buildInputs)
             |             ^
          157|     ]
    
       … from call site
    
       … while evaluating 'getOutput'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/lib/attrsets.nix:598:23:
    
          597|   */
          598|   getOutput = output: pkg:
             |                       ^
          599|     if ! pkg ? outputSpecified || ! pkg.outputSpecified
    
       … from call site
    
       … while evaluating the attribute 'buildInputs' of the derivation 'neuron-1.9.36.0'
    
       at /nix/store/l5l4i271x3mmbbjy1zjdmbfdnklddwxi-source/pkgs/stdenv/generic/make-derivation.nix:205:7:
    
          204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          205|       name =
             |       ^
          206|         let
    
  8. srid commented on Jul 8, 2022

    @srid
    Owner

    @sk91 Someone on Matrix reported that you can install neuron on M1 using Rosetta. Can you try this command?

    nix profile install github:srid/neuron --option system x86_64-darwin
    
  9. removed
    bugSomething isn't working
    on Jul 8, 2022
  10. sk91 commented on Jul 9, 2022

    @sk91

    That seems to work @srid thanks! )

  11. srid commented on Mar 22, 2026

    @srid
    Owner

    As of #677 - neuron now works on arm macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions