ic-nix icon indicating copy to clipboard operation
ic-nix copied to clipboard

Not able to use the latest release with MacOS M1

Open ravi-sawlani-yral opened this issue 2 years ago • 1 comments

Description

I have been trying to use the latest release of ic-nix with mac os M1 and tried all the options listed in the readme still was not able to get it working.

Attaching my nix file here


let
  rev = "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447";
  nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
  pkgs = import nixpkgs { };
  version = "20231213";
  dfx-env = import (builtins.fetchTarball "https://github.com/ninegua/ic-nix/releases/download/${version}/dfx-env.tar.gz") { version = "${version}"; inherit pkgs; };
in
dfx-env.overrideAttrs (old: {
  nativeBuildInputs = with pkgs; old.nativeBuildInputs ++
    [ rustup pkg-config openssl protobuf cmake cachix killall jq coreutils bc python3Full ];
})

Let me know if I am missing something here.

ravi-sawlani-yral avatar Dec 15 '23 12:12 ravi-sawlani-yral

Sorry that I didn't notice this question.

The problem seems to be that 20231213 wasn't a valid release tag.

Now that GitHub supports m1 runners, and I just updated the CI to build m1 binaries. So you should be able to do just this to get it working:

{ pkgs ? import <nixpkgs> {} }:
let
  version = "20240413";
  dfx-env = import (builtins.fetchTarball "https://github.com/ninegua/ic-nix/releases/download/${version}/dfx-env.tar.gz") { version = "${version}"; inherit pkgs; };
in
dfx-env.overrideAttrs (old: {
  nativeBuildInputs = with pkgs; old.nativeBuildInputs ++
    [ rustup pkg-config openssl protobuf cmake cachix killall jq coreutils bc python3Full ];
})

ninegua avatar Apr 13 '24 12:04 ninegua