IntersectMBO/cardano-base

Error building in nix on branch bls12-381

Closed this issue · 2 comments

zypeh commented

Related to #331

My goal was to include cardano-base branch bls12-381 on cardano-node. But when I try to include this

source-repository-package
    type: git
    location: https://github.com/input-output-hk/cardano-base
    tag: 1093bc43c8932f949a7bb26e316c532867248942
    --sha256: 0zv906ypr3lz4swi635z80h47w4db9lrva4lp3fsmkkvkxd8mf0x
    subdir:
        base-deriving-via
        binary
        binary/test
        cardano-crypto-class
        cardano-crypto-praos
        cardano-crypto-tests
        cardano-strict-containers
        cardano-mempool
        heapwords
        measures
        orphans-deriving-via
        slotting

in cardano-node's cabal-project and run nix build .#mainnet/node -o mainnet-node-local. It will shows

error: The Nixpkgs package set does not contain the package: blst (system dependency).
       You may need to augment the system package mapping in haskell.nix so that it can be found.
(use '--show-trace' to show detailed location information)

Which I also further added the dependencies blst to the respectively line in cardano-node's haskell.nix

-packages.cardano-crypto-class.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf pkgs.secp256k1 ] ];
+packages.cardano-crypto-class.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf pkgs.secp256k1 pkgs.blst ] ];

the error message remains the same.

But when I am trying to build (nix build) in branch bls12-381 I got this.

warning: Using saved setting for 'allow-import-from-derivation = true' from ~/.local/share/nix/trusted-settings.json.
warning: Using saved setting for 'extra-substituters = https://cache.iog.io' from ~/.local/share/nix/trusted-settings.json.
warning: Using saved setting for 'extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=' from ~/.local/share/nix/trusted-settings.json.
error: flake 'git+file:///mnt/data/zypeh/cardano-base' does not provide attribute 'packages.x86_64-linux.default' or 'defaultPackage.x86_64-linux'

So I believe the #331 isn't fix. Or perhaps my method is incorrect. Any comment / help is appreciated. Thanks in advance.

@zypeh This is now fixed. Could you try and confirm this?

zypeh commented

Thanks. It is solved. Closing this now