Code Monkey home page Code Monkey logo

ic-nix's People

Contributors

anchpop avatar github-actions[bot] avatar ninegua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

anchpop

ic-nix's Issues

development plan

Here is a laundry list. Welcome suggestions!

  • Include vessel
  • Include ic-repl
  • Include ic-ref
  • Build wallet and asset canisters from source
  • Make sure release binaries contain no reference to /nix/store
  • Test dfx-env & dfx projects before release is made
  • Better shell for motoko dev
  • Cargo test for ic dev. Probably a long shot, since the only officially supported arch is x86_64
  • CI on Windows WSL2

Question: With ic-nix, how should I execute my ic-repl scripts?

Hi @ninegua

With ic-nix, how should I execute my ic-repl tests that are saved as .sh files?

Previously I had them saved like this
image
in a .sh file

And I just made them executable and run them like bash scripts. But now, my ic-repl binary lives inside the nix-store.
image

Should I hard code that value? Is there a way to dynamically reference it using which ic-repl?

Upgrading from v20230508 to v20230530 inflates canister sizes beyond 2MB

Hi @ninegua

Upgrading to the latest ic-nix release increases build outputs from earlier sizes to much larger now. You can test for this here:
https://github.com/go-bazzinga/hot-or-not-backend-canister/

The current repo uses the v20230508 version. Try the install script from scripts/canisters/local_deploy/install_all_canisters.sh. It installs fine.

Now change the version in the default.nix file and try the install script again after clean starting dfx. You'll see the following output:
image

Thoughts?

Build all canisters from source

At the moment, in building sdk and dfx, we fetch pre-built canister binaries just as the official sdk build does. Ideally they should all be built from source.

dfx?

There is incomplete support for dfx in https://github.com/nomeata/dfx-in-nix, but your project is probably a better place for this. Opening this issue to track progress (or to have a place for people to read why dfx is not part of ic-nix).

Error: The ‘env’ attribute set cannot contain any attributes passed to derivation.

When trying to build from source on a M1 pro macbook using the following command:

nix-shell https://github.com/ninegua/ic-nix/releases/latest/download/dfx-env.tar.gz --arg force true

I get the following error:

error: The ‘env’ attribute set cannot contain any attributes passed to derivation. The following attributes are overlapping: NIX_CFLAGS_COMPILE
(use '--show-trace' to show detailed location information)

Operating system: MacOS verntura 13.2.1
nix-shell version: 2.13.3

Based on the conversation in issue #38 I also tried the following nix.shell.

{ pkgs ? import <nixpkgs> { } }:
let
    ic-nix = pkgs.fetchFromGitHub {
    owner = "ninegua";
    repo = "ic-nix";
    rev = "0c8c6808a88d650b5546a60a073853f6ceae97cc";
    sha256 = "sha256-MiK4vw4TLjXN3VH24+yeUvV7Qy2zbtKr5io/lafXjVA=";
  };
  dfx-env = pkgs.callPackage "${ic-nix}/dfx-env.nix" {
    force = true;
    inherit pkgs ic-nix;
  };
in
dfx-env.overrideAttrs (old: {
  nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.rustup pkgs.pkg-config pkgs.openssl pkgs.protobuf pkgs.cmake pkgs.cachix pkgs.killall ];
})

but I'm still getting the same error.

Not able to use the latest release with MacOS M1

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.