hackage2nix: Split configuration, auto disable hydra builds
We split configuration-hackage2nix.yaml into multiple files. We bump cabal2nix-unstable to get support for multiple config files in hackage2nix. * The file main.yaml is only supposed to be edited by humans. * The file stackage.yaml is only supposed to be updated by the update-stackage.sh * The file broken.yaml can be edited by humans, but probably future helpers will want to insert broken packages into this file based on hydra reports. * The file transitive-broken.yaml is newly introduced to be generated by regenerate-transitive-broken-packages.sh regenerate-transitive-broken-packages.sh makes a nix query (in transitive-broken-packages.nix) which evaluates all haskellPackages once with and once without "allowBroken" this way it get's a list of packages which are broken by some transitive dependency, but does not disable packages which have eval errors not caused by a broken package.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
let
|
||||
nixpkgs = import ../../..;
|
||||
inherit (nixpkgs {}) pkgs lib;
|
||||
getEvaluating = x:
|
||||
builtins.attrNames (
|
||||
lib.filterAttrs (
|
||||
_: v: (builtins.tryEval (v.outPath or null)).success && lib.isDerivation v && !v.meta.broken
|
||||
) x
|
||||
);
|
||||
brokenDeps = lib.subtractLists
|
||||
(getEvaluating pkgs.haskellPackages)
|
||||
(getEvaluating (nixpkgs { config.allowBroken = true; }).haskellPackages);
|
||||
in
|
||||
''
|
||||
# This file is automatically generated by
|
||||
# maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh
|
||||
# It is supposed to list all haskellPackages that cannot evaluate because they
|
||||
# depend on a dependency marked as broken.
|
||||
dont-distribute-packages:
|
||||
${lib.concatMapStringsSep "\n" (x: " - ${x}") brokenDeps}
|
||||
''
|
||||
Reference in New Issue
Block a user