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

macOS Mojave support? #151

Open
paulyoung opened this issue Mar 12, 2019 · 2 comments
Open

macOS Mojave support? #151

paulyoung opened this issue Mar 12, 2019 · 2 comments

Comments

@paulyoung
Copy link
Contributor

paulyoung commented Mar 12, 2019

As mentioned in #146 (comment), I upgraded to macOS Mojave and started seeing the following error:

dyld: Library not loaded: /usr/lib/system/libsystem_network.dylib
  Referenced from: /nix/store/8ykfqv6jx9jvfhnc4cdygdzg0piy8253-Libsystem-osx-10.11.6/lib/libSystem.B.dylib
  Reason: image not found

After resolving that in general, I was still seeing it when trying to start a nix-shell with nixfromnpm:

...
building '/nix/store/0aw0k2pzibffd8l71hr29in5wnxmcnwa-remove-references-to.drv'...
dyld: Library not loaded: /usr/lib/system/libsystem_network.dylib
  Referenced from: /nix/store/8ykfqv6jx9jvfhnc4cdygdzg0piy8253-Libsystem-osx-10.11.6/lib/libSystem.B.dylib
  Reason: image not found
builder for '/nix/store/0aw0k2pzibffd8l71hr29in5wnxmcnwa-remove-references-to.drv' failed due to signal 6 (Abort trap: 6)
cannot build derivation '/nix/store/d32g7vmq4lsqj3nnjcg3k7lyv87ycm5y-nixfromnpm-0.13.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/79n3gcx51shhm650rmr7knwkxa9pppky-stdenv-darwin.drv', '/nix/store/d32g7vmq4lsqj3nnjcg3k7lyv87ycm5y-nixfromnpm-0.13.0.drv' failed

I realized that for nixfromnpm, I was still using the pinned version of nixpkgs that had the issue. I changed that to use my own:

{}:

self: super:

let
  nixfromnpmSrc = self.fetchFromGitHub {
    owner  = "paulyoung"; # Forked from adnelson
    repo   = "nixfromnpm";
    rev    = "ef49d70fffd37aac15ecca0adf1d8839f0840820";
    sha256 = "0knjqqpcm2ssc9p9zaq4bnm6d1403yz4mrnyzyw2lxnby052gyaz";
  };
in
  {
    nixfromnpm = (import "${nixfromnpmSrc}/release.nix" {
      nixpkgs = self.pkgs.src;
    }).nixfromnpm;
  }

But now I'm experiencing another issue that appears to be related to one of the dependencies.

Full trace:

$ nix-shell -p '[((import ../../default.nix {}).pkgs.nixfromnpm)]' --show-trace
error: while evaluating the attribute 'buildInputs' of the derivation 'shell' at /nix/store/6xz41g4cy8xw6rzh474nqkcvfw1xzhlx-nixpkgs-19.09pre171945.b36dc66bfea/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'pkgs.nixfromnpm' at /Users/paulyoung/projects/<my-project>/nix/overlays/nixfromnpm.nix:14:5:
while evaluating the attribute 'nixfromnpm' at /nix/store/1axna3bc1iafvx70wda167i9gqswdwfm-source/release.nix:58:35:
while evaluating the attribute 'buildInputs' of the derivation 'src-1.18' at /nix/store/bhcb0bpfyyq30azmqq5ybmf9rd70jp5n-source/pkgs/stdenv/generic/make-derivation.nix:180:11:
while evaluating the attribute 'handled' at /nix/store/bhcb0bpfyyq30azmqq5ybmf9rd70jp5n-source/pkgs/stdenv/generic/check-meta.nix:246:7:
while evaluating 'handleEvalIssue' at /nix/store/bhcb0bpfyyq30azmqq5ybmf9rd70jp5n-source/pkgs/stdenv/generic/check-meta.nix:142:28, called from /nix/store/bhcb0bpfyyq30azmqq5ybmf9rd70jp5n-source/pkgs/stdenv/generic/check-meta.nix:247:14:
Package ‘rcs-5.9.4’ in /nix/store/bhcb0bpfyyq30azmqq5ybmf9rd70jp5n-source/pkgs/applications/version-management/rcs/default.nix:19 is not supported on ‘x86_64-apple-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.
@paulyoung
Copy link
Contributor Author

I tried this on a NixOS VM (nixos-18.09.2327.37694c8cc0e-x86_64-linux):

$ nix-shell -p '[((import ../../default.nix {}).pkgs.nixfromnpm)]' --show-trace
error: while evaluating the attribute 'buildInputs' of the derivation 'shell' at /nix/store/146vj0vji5p4567p8idylfdzgfs4sbpv-nixos-18.09.2327.37694c8cc0e/nixos/pkgs/stdenv/generic/make-derivation.nix:177:11:
while evaluating the attribute 'pkgs.nixfromnpm' at /home/demo/projects/dfinity-lab/dev/nix/overlays/nixfromnpm.nix:14:5:
while evaluating the attribute 'nixfromnpm' at /nix/store/1axna3bc1iafvx70wda167i9gqswdwfm-source/release.nix:58:35:
opening file '/nix/store/y02ybc2xcjmm84k9kzhk677sd0lwqk24-src-1.18/default.nix': No such file or directory

@paulyoung
Copy link
Contributor Author

So, it turns out I was doing something completely incorrect with nixpkgs = self.pkgs.src; and pulling in the src package. What I wanted was nixpkgs = self.pkgs.src;

I'm still working on getting this to build in Mojave, but it seems like nixpkgs 18.09 and GHC 8.4 is involved (see adnelson/semver-range#14)

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

1 participant