Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extra-hackages wip #97

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

extra-hackages wip #97

wants to merge 6 commits into from

Conversation

brainrake
Copy link
Contributor

No description provided.

flake.nix Outdated
@@ -313,16 +319,31 @@
}
];

extraHackagePackages = with nixpkgs.lib;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this should be in the helper repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should rather update extraSources to this format (just a list of paths)

flake.nix Outdated Show resolved Hide resolved
@brainrake brainrake marked this pull request as ready for review May 10, 2022 12:14
@brainrake brainrake marked this pull request as draft May 10, 2022 12:34
@brainrake brainrake force-pushed the marton/extra-hackages branch from 0ec71d9 to f58bb30 Compare May 10, 2022 12:35
@brainrake
Copy link
Contributor Author

brainrake commented May 24, 2022

Status: error because of name clash in compact-map

error: attribute '2008.11.9' missing

       at /nix/store/qfj8prjmsjh30dcgb6hnhayir1hn3442-haskell-project-plan-to-nix-pkgs/default.nix:23:36:

           22|         "natural-transformation".revision = (((hackage."natural-transformation")."0.4").revisions).default;
           23|         "compact-map".revision = (((hackage."compact-map")."2008.11.9").revisions).default;
             |                                    ^
           24|         "happy".revision = (((hackage."happy")."1.20.0").revisions).default;

UPDATE: fixed with latest haskell.nix

@brainrake brainrake force-pushed the marton/extra-hackages branch from f58bb30 to c50eefd Compare June 13, 2022 09:43
@brainrake
Copy link
Contributor Author

brainrake commented Jun 13, 2022

rebased on master and updated to use separate hackages per package

@brainrake brainrake marked this pull request as ready for review June 13, 2022 19:42
@brainrake brainrake marked this pull request as draft June 13, 2022 19:43
@szg251
Copy link
Collaborator

szg251 commented Jul 6, 2022

@brainrake Did you run into this error:
error: The Haskell package set does not contain the package: wl-pprint-text (build dependency).

I want to use this repository to solve this issue https://github.com/mlabs-haskell/trustless-sidechain/issues/64

@szg251
Copy link
Collaborator

szg251 commented Jul 7, 2022

This is the full trace:

$ nix develop --show-trace
trace: To make project.plan-nix for bot-plutus-interface a fixed-output derivation but not materialized, set `plan-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'.
trace: To materialize project.plan-nix for bot-plutus-interface entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
error: The Haskell package set does not contain the package: wl-pprint-text (build dependency).
       If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.


       … while evaluating 'buildDepError'

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/modules/error-handler.nix:8:21:

            7|   config.errorHandler = {
            8|     buildDepError = pkg:
             |                     ^
            9|       builtins.throw ''

       … from call site

       at /nix/store/lmdlh79wysn9xav8byyn5ld26wf33qyi-hackage-nix/hackage/purescript-bridge-0.14.0.0-r0-bb95b6b72d9bb1a82c42610839ee042603e46c58354b5f4469fee88f22ca8b46.nix:36:40:

           35|           (hsPkgs."transformers" or (errorHandler.buildDepError "transformers"))
           36|           (hsPkgs."wl-pprint-text" or (errorHandler.buildDepError "wl-pprint-text"))
             |                                        ^
           37|           (hsPkgs."generic-deriving" or (errorHandler.buildDepError "generic-deriving"))

       … while evaluating the attribute 'value'

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/modules/plan.nix:46:38:

           45|               elemType
           46|               [{ inherit (def) file; value = def'; }]
             |                                      ^
           47|             ).optionalValue

       … while evaluating 'dischargeProperties'

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:747:25:

          746|   */
          747|   dischargeProperties = def:
             |                         ^
          748|     if def._type or "" == "merge" then

       … from call site

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:676:137:

          675|         defs' = concatMap (m:
          676|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          677|         ) defs;

       … while evaluating definitions from `/nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/modules/plan.nix':

       … while evaluating anonymous lambda

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:675:28:

          674|         # Process mkMerge and mkIf properties.
          675|         defs' = concatMap (m:
             |                            ^
          676|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … from call site

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:675:17:

          674|         # Process mkMerge and mkIf properties.
          675|         defs' = concatMap (m:
             |                 ^
          676|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating the attribute 'values'

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:788:7:

          787|     in {
          788|       values = concatMap (def: if getPrio def == highestPrio then [(strip def)] else []) defs;
             |       ^
          789|       inherit highestPrio;

       … while evaluating the attribute 'values'

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:689:9:

          688|       in {
          689|         values = defs''';
             |         ^
          690|         inherit (defs'') highestPrio;

       … while evaluating the attribute 'optionalValue'

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:707:5:

          706|
          707|     optionalValue =
             |     ^
          708|       if isDefined then { value = mergedValue; }

       … while evaluating anonymous lambda

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/modules/plan.nix:42:21:

           41|         if isList def.value then
           42|           imap1 (m: def':
             |                     ^
           43|             (mergeDefinitions

       … from call site

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/lists.nix:117:32:

          116|   */
          117|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                                ^
          118|

       … while evaluating anonymous lambda

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/lists.nix:117:29:

          116|   */
          117|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                             ^
          118|

       … from call site

       … while evaluating anonymous lambda

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/modules/plan.nix:40:33:

           39|     merge = loc: defs:
           40|       map (x: x.value) (filter (x: x ? value && x.value != null) (concatLists (imap1 (n: def:
             |                                 ^
           41|         if isList def.value then

       … from call site

       … while evaluating 'merge'

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/modules/plan.nix:39:18:

           38|     # Mostly copied from nixpkgs/lib/types.nix
           39|     merge = loc: defs:
             |                  ^
           40|       map (x: x.value) (filter (x: x ? value && x.value != null) (concatLists (imap1 (n: def:

       … from call site

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:697:59:

          696|       if isDefined then
          697|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                                                           ^
          698|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while evaluating the attribute 'mergedValue'

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:695:5:

          694|     # Type-check the remaining definitions, and merge them. Or throw if no definitions.
          695|     mergedValue =
             |     ^
          696|       if isDefined then

       … while evaluating the option `packages.purescript-bridge.components.library.depends':

       … while evaluating the attribute 'value'

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:661:9:

          660|     in warnDeprecation opt //
          661|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          662|         inherit (res.defsFinal') highestPrio;

       … while evaluating anonymous lambda

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:205:72:

          204|           # For definitions that have an associated option
          205|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          206|

       … from call site

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/attrsets.nix:401:20:

          400|               then recurse (path ++ [name]) value
          401|               else f (path ++ [name]) value;
             |                    ^
          402|         in mapAttrs g;

       … while evaluating 'g'

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/attrsets.nix:398:19:

          397|           g =
          398|             name: value:
             |                   ^
          399|             if isAttrs value && cond value

       … from call site

       … while evaluating 'operator'

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/lib/default.nix:142:20:

          141|         startSet = makePairs component.depends;
          142|         operator = {val,...}: makePairs val.config.depends;
             |                    ^
          143|       };

       … from call site

       … while evaluating 'flatLibDepends'

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/lib/default.nix:137:20:

          136|   ## flatLibDepends :: Component -> [Package]
          137|   flatLibDepends = component:
             |                    ^
          138|     let

       … from call site

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/builder/shell-for.nix:57:10:

           56|       (builtins.map (x: lib.nameValuePair (x.name) x)
           57|         (haskellLib.flatLibDepends {depends = directlySelectedComponents;}));
             |          ^
           58|

       … while evaluating the attribute 'depends'

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/builder/shell-for.nix:97:5:

           96|   component = {
           97|     depends = packageInputs;
             |     ^
           98|     libs = [];

       … while evaluating anonymous lambda

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/builder/make-config-files.nix:57:67:

           56|     (if enableDWARF then (x: map (p: p.dwarf or p) x) else x: x)
           57|     ((if needsProfiling then (x: map (p: p.profiled or p) x) else x: x)
             |                                                                   ^
           58|     (lib.filter (p: (p ? configFiles) && p.configFiles.targetPrefix == ghc.targetPrefix)

       … from call site

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/builder/make-config-files.nix:57:6:

           56|     (if enableDWARF then (x: map (p: p.dwarf or p) x) else x: x)
           57|     ((if needsProfiling then (x: map (p: p.profiled or p) x) else x: x)
             |      ^
           58|     (lib.filter (p: (p ? configFiles) && p.configFiles.targetPrefix == ghc.targetPrefix)

       … while evaluating anonymous lambda

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/builder/make-config-files.nix:56:60:

           55|   libDeps = map chooseDrv (
           56|     (if enableDWARF then (x: map (p: p.dwarf or p) x) else x: x)
             |                                                            ^
           57|     ((if needsProfiling then (x: map (p: p.profiled or p) x) else x: x)

       … from call site

       at /nix/store/6fg6hgsx1iayl8g160fmn385iqpc6g15-source/builder/make-config-files.nix:56:5:

           55|   libDeps = map chooseDrv (
           56|     (if enableDWARF then (x: map (p: p.dwarf or p) x) else x: x)
             |     ^
           57|     ((if needsProfiling then (x: map (p: p.profiled or p) x) else x: x)

       … while evaluating the attribute 'buildCommand' of the derivation 'ghc-shell-for-packages-config'

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/pkgs/stdenv/generic/make-derivation.nix:205:7:

          204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          205|       name =
             |       ^
          206|         let

       … while evaluating the attribute 'CABAL_CONFIG' of the derivation 'ghc-shell-for-packages'

       at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/pkgs/stdenv/generic/make-derivation.nix:205:7:

          204|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          205|       name =
             |       ^
          206|         let

@brainrake brainrake force-pushed the marton/extra-hackages branch from c50eefd to 7798208 Compare July 8, 2022 19:11
@brainrake brainrake force-pushed the marton/extra-hackages branch from d3fcc84 to 68ebf93 Compare July 18, 2022 14:02
@szg251
Copy link
Collaborator

szg251 commented Jul 27, 2022

@brainrake @L-as Is there something wrong here, or with the upstream haskell.nix? If the latter, could you link an issue here? I'm feeling a little bit left in the dark without any estimate.

@brainrake brainrake force-pushed the marton/extra-hackages branch from 68ebf93 to f200f99 Compare July 28, 2022 14:22
@roynakakawa
Copy link

@gege251 any update on this ticket ? as it is blocking this: https://github.com/mlabs-haskell/trustless-sidechain/issues/64

@L-as
Copy link
Contributor

L-as commented Aug 8, 2022

@roynakakawa @MangoIV has been assigned to take over this as @brainrake is on vacation.
The remaining problems were IIRC some build errors with wl-print-text or something.

@roynakakawa
Copy link

hello @MangoIV are we close to complete this ticket ? It's blocking https://github.com/mlabs-haskell/trustless-sidechain/issues/64

@MangoIV
Copy link

MangoIV commented Aug 16, 2022

Hi @roynakakawa, the issue is that for this to be fixed we have to upgrade the dependencies of BPI; for that we need to upgrade plutus-apps which is quite involved and out of scope. That's why we're splitting out the API from plutus-apps (this proposal has been accepted by IOG) I'm currently working on this but this is a blocker for this PR to be finished.

So the current dependency chain is

plutip -> pbi (this PR) -> plutus-apps

where plutus-apps is very outdated and needs to be fixed for BPI to work.

@L-as
Copy link
Contributor

L-as commented Aug 16, 2022 via email

@MangoIV MangoIV marked this pull request as ready for review August 18, 2022 15:51
@MangoIV MangoIV removed their assignment Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants