From 21df8c56b8b3919538f94823f016db014fa39726 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 8 Feb 2026 12:15:50 +0100 Subject: [PATCH] maintainers/haskell: record pnames, not attr names to transitive broken The attribute names in haskellPackages no longer match the Hackage package names in all cases (which hackage2nix uses to match its config files against packages), but the pnames do, so let's use those here. To prevent accidentally disabling a package because a versioned package depends on a broken one, we need to filter out all versioned attributes as well. This doesn't change anything since they already have empty hydraPlatforms. --- .../haskell/regenerate-transitive-broken-packages.sh | 2 +- .../scripts/haskell/transitive-broken-packages.nix | 9 +++++++-- .../configuration-hackage2nix/transitive-broken.yaml | 10 +--------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh b/maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh index d128433ce32b..1448f3666e1c 100755 --- a/maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh +++ b/maintainers/scripts/haskell/regenerate-transitive-broken-packages.sh @@ -20,6 +20,6 @@ cat > $tmpfile << EOF dont-distribute-packages: EOF -nix-instantiate --eval --option restrict-eval true -I . --strict --json maintainers/scripts/haskell/transitive-broken-packages.nix | jq -r . | LC_ALL=C.UTF-8 sort --ignore-case >> $tmpfile +nix-instantiate --show-trace --eval --option restrict-eval true -I . --strict --json maintainers/scripts/haskell/transitive-broken-packages.nix | jq -r . | LC_ALL=C.UTF-8 sort --ignore-case >> $tmpfile mv $tmpfile $config_file diff --git a/maintainers/scripts/haskell/transitive-broken-packages.nix b/maintainers/scripts/haskell/transitive-broken-packages.nix index f4a69e6e69a2..890bec72663d 100644 --- a/maintainers/scripts/haskell/transitive-broken-packages.nix +++ b/maintainers/scripts/haskell/transitive-broken-packages.nix @@ -1,11 +1,16 @@ let nixpkgs = import ../../..; inherit (nixpkgs { }) pkgs lib; + isVersioned = attr: builtins.match "[A-Za-z0-9-]+(_[0-9]+)+" attr != null; getEvaluating = x: - builtins.attrNames ( + lib.mapAttrsToList (_: v: v.pname) ( lib.filterAttrs ( - _: v: (builtins.tryEval (v.outPath or null)).success && lib.isDerivation v && !v.meta.broken + n: v: + !(isVersioned n) + && (builtins.tryEval (v.outPath or null)).success + && lib.isDerivation v + && !v.meta.broken ) x ); brokenDeps = lib.subtractLists (getEvaluating pkgs.haskellPackages) ( diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml index 154e3812ff1e..a8dd16f9ca1c 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml @@ -4,6 +4,7 @@ # depend on a dependency marked as broken. dont-distribute-packages: + - 4Blocks - a50 - abcBridge - AbortT-monadstf @@ -600,7 +601,6 @@ dont-distribute-packages: - cprng-aes - cprng-aes-effect - cql-io-tinylog - - cql_4_1_0_0 - cqrs-example - cqrs-memory - cqrs-postgresql @@ -765,7 +765,6 @@ dont-distribute-packages: - distribution-plot - dixi - dl-fedora - - dl-fedora_2_2 - dmenu-pkill - dmenu-pmount - dmenu-search @@ -945,7 +944,6 @@ dont-distribute-packages: - fay-uri - fay-websockets - fbrnch - - fbrnch_1_8 - fcd - FComp - feature-flipper-postgres @@ -1775,7 +1773,6 @@ dont-distribute-packages: - hylotab - hyloutils - hyperbole - - hyperbole_0_6_0 - hyperpublic - ide-backend - ide-backend-server @@ -2592,7 +2589,6 @@ dont-distribute-packages: - persistent-hssqlppp - persistent-iproute - persistent-map - - persistent-postgresql_2_14_3_0 - persistent-protobuf - persona-idp - peyotls @@ -3031,7 +3027,6 @@ dont-distribute-packages: - sandwich-contexts-kubernetes - sandwich-contexts-minio - sandwich-webdriver - - sandwich-webdriver_0_4_0_2 - sarsi - sasl - sat-micro-hs @@ -3203,7 +3198,6 @@ dont-distribute-packages: - SimpleLog - SimpleServer - simseq - - singletons-base_3_5_1 - singletons-presburger - siphon - siren-json @@ -3741,7 +3735,6 @@ dont-distribute-packages: - WebCont - webcrank-wai - webdriver-w3c - - webdriver_0_14_0_0 - webify - webserver - websnap @@ -3906,4 +3899,3 @@ dont-distribute-packages: - zoovisitor - zuramaru - zwirn - - _4Blocks