ninegua / ic-nix Goto Github PK
View Code? Open in Web Editor NEWBuild Internet Computer projects with Nix
License: MIT License
Build Internet Computer projects with Nix
License: MIT License
Here is a laundry list. Welcome suggestions!
Hi @ninegua
I am referring to this new binary. Thoughts?
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
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.
Should I hard code that value? Is there a way to dynamically reference it using which ic-repl
?
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:
Thoughts?
It would be useful to let user to use other packages, e.g. gitMinimal
or gnumake
at the nix-shell
, while shell is pure. Could it be passed by arguments? And would it be still possible to re-use binary cache for huge packages like dfx
and canisters?
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.
@ninegua Please add this project to ic-nix?
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
).
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.
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.
Hi @ninegua
There were some breaking changes in the test client binary and they have now been fixed and updated. Could you please update ic-nix to pull in that binary? Thank you.
Here's the relevant discussion from that repo:
dfinity/test-state-machine-client#9 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.