IntersectMBO / plutus-apps

The Plutus application platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Dependency on unbuildable library 'gen' from cardano-api

locallycompact opened this issue · comments

Summary

Getting tons of these errors

https://gitlab.horizon-haskell.net/package-sets/horizon-plutus-apps/-/jobs/147824

Looks like yet another new cabal syntax I'm not compatible with. Can I turn it off?

Steps to reproduce the behavior

It's there in the CI

Actual Result

Breaks

Expected Result

Does not break.

Describe the approach you would take to fix this

No response

System info

NixOS

it's a cardano-node library that is used to generate tx (and parts of it) for testing purpose. IIRC, it shouldn't be exposed for other mean than testing.

What exactly do you want to "turn-off" here?

I just need to figure out how to make this build.

If I read your log correctly, your using a pretty old version of cabal, did you try to upgrade it?

That looks to be the reason but I can not see how to upgrade the version of cabal here.

I've tried shoving a version of cabal-install everywhere I can possibly try in make-package-set but it does not change the derivations produced by make-package-set.


        legacyPackages = pkgs.callPackage (nixpkgs + /pkgs/development/haskell-modules) {
          pkgs = pkgs.extend (_: _: { inherit cabal-install; });
          buildHaskellPackages = pkgs.haskell.packages.ghc8107.override {overrides = _: _: { cabal-install = horizon-platform.legacPackages.${system}.cabal-install; };};
          compilerConfig = pkgs.callPackage ./configuration-ghc.nix { inherit haskellLib cabal-install; };
          configurationArm = { pkgs, haskellLib }: self: super: { };
          configurationCommon = import ./configuration.nix { libsodium = iohk-pkgs.libsodium-vrf; };
          configurationDarwin = { pkgs, haskellLib }: self: super: { };
          configurationNix = { pkgs, haskellLib }: self: super: { };
          ghc = pkgs.haskell.compiler.ghc8107;
          inherit haskellLib;
          initialPackages = import ./initial-packages.nix;
          nonHackagePackages = self: super: { };
        };

How is haskell.nix able to change the version of cabal-install on a package set based on 8.10.7?

I'm as puzzled as you are. That being said, it doesn't look like a bug on plutus-apps side, so I'm closing it.

@locallycompact I found this old bug report haskell/cabal#6470 which shows a similar message and suggests it's a bug fixed in cabal 3.4 (you are using 3.2).

How is haskell.nix able to change the version of cabal-install on a package set based on 8.10.7?

I am not sure I understand what you mean here but Haskell.nix does not use package sets. If you asking how Haskell.nix provides the latest versions of cabal-install, it's a simple matter of ... installing cabal-install. The latest version of the cabal packages still compile with GHC 8.10.7. Note that cabal-install is not restricted to use the version of Cabal bundled with GHC. Quite the contrary cabal-install-3.10.1.0 requires Cabal ^>=3.10. I hope this helps.

@andreabedini I don't know what haskell.nix is doing differently to nixpkgs, but I tried everything to override cabal-install in a nixpkgs package set and came up short. cabal-install doesn't even seem to be in the build inputs for derivations used with make-package-set. The only thing that I know works is using the buildHaskellPackages from pkgs.haskell.compilers.944, does not have this error. That's what I use in horizon-plutus. It would be nice to figure this out, but I'm also not opposed to simply upgrading the entire cardano stack to 944 just to not have to deal with this problem. The only thing that is categorically a blocker there is plutus-tx-plugin.

@locallycompact Haskell.nix is very different from the haskell infrastructure in nixpkgs. I am interested in your work on horizon but I don't think this is the right place to discuss nixpkgs and horizon. Feel free to ping me on a different channel :)