Closed idontgetoutmuch closed 4 years ago
OTOH this seems to be working (I bodged the version number):
paths = builtins.map haskell.lib.dontHaddock (builtins.map haskell.lib.dontCheck reverseDepsList);
Spoke too soon - it seems that QuickCheck is getting built with tests :( and at the moment this does not fail but sits there doing nothing. I am guessing I need to somehow get a fixed point but my nix-fu is not good enough to do this.
<blackriversoftwa> cinimod`: It's been a while since I used the nixpkgs
haskell infrastructure, but you probably need to apply an
overlay to the package set and override the haskell stdenv to
set dontCheck and dontHaddock true
<blackriversoftwa> trying to do it per package and also for dependencies would
be very tricky
<cinimod`> blackriversoftwa: agreed but I somehow thought nix would find the
fixed point for me [16:13]
<blackriversoftwa> cinimod`: yes if you made an overlay for the
haskellPackages set (not an overlay for nixpkgs, you need to
apply an overlay to haskellPackages specifically) that
overrode every package [16:14]
<blackriversoftwa> cinimod`: but easier to just do an overlay that overwrites
the build options all of them start with
<clever> you can use a haskell overlay to mutate the mkDerivation function
[16:15]
<clever> which every haskell package uses
<blackriversoftwa> clever: thanks that is what I was trying to remember cc
cinimod`
* cinimod` goes to ponder "you can use a haskell overlay to mutate the
mkDerivation function" [16:16]
<clever> cinimod`:
https://github.com/input-output-hk/cardano-sl/blob/2.0.0/nix/overlays/debug.nix
[16:18]
<clever> cinimod`:
https://github.com/input-output-hk/cardano-sl/blob/2.0.0/nix/overlays/dont-check.nix
[16:19]
<clever> cinimod`: multiple overlays can stack in a sane manner, and other
examples exist in the same dir
<blackriversoftwa> clever: can you post a reminder of how to apply overlays to
e.g. haskellPackages rather than to the global pkgs?
[16:21]
<clever> blackriversoftwa:
https://github.com/input-output-hk/cardano-sl/blob/2.0.0/nix/haskell-packages.nix#L32-L41
<clever> blackriversoftwa: cardaniPkgsBase in this context, can just be
replaced with pkgs.haskellPackages [16:22]
<cinimod`> clever blackriversoftwa: I already have one Haskell overlay
<clever> cinimod`: the example i linked shows how to apply many at once
<blackriversoftwa> the .extend is the bit I was missing [16:23]
<clever> pkgs.extend and pkgs.linuxPackages.extend also exist
<cinimod`> :thumbsup:
@idontgetoutmuch I'm having a little bit of trouble figuring out what you are trying to accomplish.
Are you trying to turn off haddocks and tests for all the derivations in the Haskell package set?
There's an example in the nixpkgs manual that explains how to do something similar, in the section entitled "How to build with profiling enabled":
https://nixos.org/nixpkgs/manual/#miscellaneous-topics
Instead of setting enableLibraryProfiling = true
, you'd probably use doCheck = false
and doHaddock = false
.
If you can't figure out how to get this working with your own code, let me know and I'll try to come up with a simple example.
@cdepillabout apologies for not being clearer - I think I was sidetracked by the suggestion of using overlays. What you pointed me at was exactly what I needed. I now have a list of packages that will be broken by our proposal.
@idontgetoutmuch Glad you got it working, and good luck with the random
improvements!
The reason most packages are breaking is because of upper bounds restrictions. I've tried jailbreaking in various ways but to no avail.