-
Install nix
-
Fork and clone the repository
gh repo fork --clone --remote ibis-project/ibis-substrait
- Set up public
ibis-substrait
Cachix cache to pull pre-built dependencies:
nix-shell -p cachix --run 'cachix use ibis-substrait'
- Run
nix-shell
in the checkout directory
cd ibis-substrait
nix-shell
- Open
nix/default.nix
and look for this block:
substrait = pkgs.fetchFromGitHub {
owner = "substrait-io";
repo = "substrait";
rev = "4e70145508133988967db1f3dc96a45ce555867f";
sha256 = "sha256:1c4d6asdghbp00qr8zrirxqwqhnhkjk8qy1phy1cmq2fvyzggqp3";
};
- Update the
rev
to the release ofsubstrait
you want to use and zero out thesha256
hash:
substrait = pkgs.fetchFromGitHub {
owner = "substrait-io";
repo = "substrait";
- rev = "4e70145508133988967db1f3dc96a45ce555867f";
- sha256 = "sha256:1c4d6asdghbp00qr8zrirxqwqhnhkjk8qy1phy1cmq2fvyzggqp3";
+ rev = "f3f6bdc947e689e800279666ff33f118e42d2146";
+ sha256 = "sha256:0000000000000000000000000000000000000000000000000000";
};
- Run
nix-shell
again to trigger a rebuild. This will error and will report the newsha256
hash to use:
...
unpacking source archive /build/f3f6bdc947e689e800279666ff33f118e42d2146.tar.gz
hash mismatch in fixed-output derivation '/nix/store/0gncgfv4fwjs93alhpkskmmxk65qsn3q-source':
wanted: sha256:0000000000000000000000000000000000000000000000000000
got: sha256:156rg46g9z7rcq5bkksvmfxdlj9djxx03zlahgfqb5h2b1h794cy
cannot build derivation '/nix/store/jqfylm2prkxqf33qjv8w5d3nlkivp0qq-gen-protos.drv': 1 dependencies couldn't be built
error: build of '/nix/store/jqfylm2prkxqf33qjv8w5d3nlkivp0qq-gen-protos.drv' failed
- Update
nix/default.nix
with the new hash:
substrait = pkgs.fetchFromGitHub {
owner = "substrait-io";
repo = "substrait";
- rev = "4e70145508133988967db1f3dc96a45ce555867f";
- sha256 = "sha256:1c4d6asdghbp00qr8zrirxqwqhnhkjk8qy1phy1cmq2fvyzggqp3";
+ rev = "f3f6bdc947e689e800279666ff33f118e42d2146";
+ sha256 = "sha256:156rg46g9z7rcq5bkksvmfxdlj9djxx03zlahgfqb5h2b1h794cy";
};
- Run
nix-shell
once more to load the new substraitproto
files. If this completes without error, rungen-protos
inside ofnix-shell
to update the generated protobuf stub files.
$ gen-protos
proto_prefix.py: wrote 8 file(s), 0 up-to-date, 0 not in src prefix
Writing mypy to substrait/ibis/extensions/extensions_pb2.pyi
Writing mypy to substrait/ibis/type_pb2.pyi
Writing mypy to substrait/ibis/algebra_pb2.pyi
Writing mypy to substrait/ibis/capabilities_pb2.pyi
Writing mypy to substrait/ibis/parameterized_types_pb2.pyi
Writing mypy to substrait/ibis/type_expressions_pb2.pyi
Writing mypy to substrait/ibis/function_pb2.pyi
Writing mypy to substrait/ibis/plan_pb2.pyi