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/regenerate-hackage-packages.sh | |
parent | d75130019b38ef8ceb2d62a5d868ea4a31242b6e (diff) | |
download | nixpkgs-7f236bd4b245b88c3111e627aa2654cb73be3d15.tar nixpkgs-7f236bd4b245b88c3111e627aa2654cb73be3d15.tar.gz nixpkgs-7f236bd4b245b88c3111e627aa2654cb73be3d15.tar.bz2 nixpkgs-7f236bd4b245b88c3111e627aa2654cb73be3d15.tar.lz nixpkgs-7f236bd4b245b88c3111e627aa2654cb73be3d15.tar.xz nixpkgs-7f236bd4b245b88c3111e627aa2654cb73be3d15.tar.zst nixpkgs-7f236bd4b245b88c3111e627aa2654cb73be3d15.zip |
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/regenerate-hackage-packages.sh')
-rwxr-xr-x | maintainers/scripts/haskell/regenerate-hackage-packages.sh | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/maintainers/scripts/haskell/regenerate-hackage-packages.sh b/maintainers/scripts/haskell/regenerate-hackage-packages.sh index 96131f98fa0..462840cd24c 100755 --- a/maintainers/scripts/haskell/regenerate-hackage-packages.sh +++ b/maintainers/scripts/haskell/regenerate-hackage-packages.sh @@ -1,9 +1,9 @@ #! /usr/bin/env nix-shell -#! nix-shell -i bash -p coreutils haskellPackages.cabal2nix-unstable -I nixpkgs=. +#! nix-shell -i bash -p coreutils haskellPackages.cabal2nix-unstable git nix -I nixpkgs=. # This script is used to regenerate nixpkgs' Haskell package set, using a tool -# called hackage2nix. hackage2nix looks at -# pkgs/development/haskell-modules/configuration-hackage2nix.yaml and generates +# called hackage2nix. hackage2nix looks at the config files in +# pkgs/development/haskell-modules/configuration-hackage2nix and generates # a Nix expression for package version specified there, using the Cabal files # from the Hackage database (available under all-cabal-hashes) and its # companion tool cabal2nix. @@ -14,10 +14,18 @@ set -euo pipefail -extractionDerivation='with import ./. {}; runCommand "unpacked-cabal-hashes" { } "tar xf ${all-cabal-hashes} --strip-components=1 --one-top-level=$out"' -unpacked_hackage="$(nix-build -E "$extractionDerivation" --no-out-link)" +extraction_derivation='with import ./. {}; runCommand "unpacked-cabal-hashes" { } "tar xf ${all-cabal-hashes} --strip-components=1 --one-top-level=$out"' +unpacked_hackage="$(nix-build -E "$extraction_derivation" --no-out-link)" +config_dir=pkgs/development/haskell-modules/configuration-hackage2nix -hackage2nix --hackage "$unpacked_hackage" --preferred-versions <(for n in "$unpacked_hackage"/*/preferred-versions; do cat "$n"; echo; done) --nixpkgs "$PWD" --config pkgs/development/haskell-modules/configuration-hackage2nix.yaml +hackage2nix \ + --hackage "$unpacked_hackage" \ + --preferred-versions <(for n in "$unpacked_hackage"/*/preferred-versions; do cat "$n"; echo; done) \ + --nixpkgs "$PWD" \ + --config "$config_dir/main.yaml" \ + --config "$config_dir/stackage.yaml" \ + --config "$config_dir/broken.yaml" \ + --config "$config_dir/transitive-broken.yaml" if [[ "${1:-}" == "--do-commit" ]]; then git add pkgs/development/haskell-modules/hackage-packages.nix |