diff options
author | Malte Brandy <malte.brandy@maralorn.de> | 2021-05-05 22:38:46 +0200 |
---|---|---|
committer | Malte Brandy <malte.brandy@maralorn.de> | 2021-05-07 21:58:08 +0200 |
commit | 7f236bd4b245b88c3111e627aa2654cb73be3d15 (patch) | |
tree | 48b42775395506a446dd871d0ff97da3faa834fc /maintainers/scripts/haskell/transitive-broken-packages.nix | |
parent | d75130019b38ef8ceb2d62a5d868ea4a31242b6e (diff) |
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.
Diffstat (limited to 'maintainers/scripts/haskell/transitive-broken-packages.nix')
-rw-r--r-- | maintainers/scripts/haskell/transitive-broken-packages.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/maintainers/scripts/haskell/transitive-broken-packages.nix b/maintainers/scripts/haskell/transitive-broken-packages.nix new file mode 100644 index 0000000000000..3ddadea216f67 --- /dev/null +++ b/maintainers/scripts/haskell/transitive-broken-packages.nix @@ -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} +'' |