Skip to content

pcre: drop - #578893

Merged
mweinelt merged 10 commits into
NixOS:masterfrom
mweinelt:kill-pcre
Oct 26, 2026
Merged

pcre: drop#578893
mweinelt merged 10 commits into
NixOS:masterfrom
mweinelt:kill-pcre

Conversation

@mweinelt

@mweinelt mweinelt commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

The package is considered end of life and was last maintainted in 2015.

We spent the 26.11 cycle working on removing our reliance on it and this
is the final stretch.

Closes: #356387
Blocked-By: #573955

Things done

@mweinelt
mweinelt marked this pull request as draft October 25, 2026 16:50
@mweinelt mweinelt moved this to In progress in 26.11 Blockers Oct 25, 2026
Comment thread pkgs/top-level/aliases.nix Resolved
@mweinelt
mweinelt force-pushed the kill-pcre branch 5 times, most recently from 2fe9f73 to a4c7454 Compare October 25, 2026 19:08
@Scrumplex Scrumplex self-assigned this Oct 25, 2026
@Scrumplex Scrumplex added this to the 26.11 milestone Oct 25, 2026
@Scrumplex
Scrumplex force-pushed the kill-pcre branch 4 times, most recently from f2b0d69 to e618da0 Compare October 25, 2026 22:00
nixpkgs-branch-check[bot]

This comment was marked as outdated.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 6.topic: python Python is a high-level, general-purpose programming language. labels Oct 25, 2026
@mweinelt

Copy link
Copy Markdown
Member Author

cc @wolfgangwalther who said these haskell packages were non-blocking. Please help unblock this.

Scrumplex and others added 3 commits October 26, 2026 00:54
Added TODO instead of marking as broken, as it may not even affect
anything at all?

Signed-off-by: Sefa Eyeoglu <[email protected]>
The package is considered end of life and was last maintainted in 2015.

We spent the 26.11 cycle working on removing our reliance on it and this
is the final stretch.
@Scrumplex

Copy link
Copy Markdown
Member

Running maintainers/scripts/haskell/regenerate-hackage-packages.sh against current master (05d7bc7), I get the following diff:

diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml
index 3c0778f58658..32aa368f7780 100644
--- a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml
+++ b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml
@@ -4,50 +4,186 @@
 # depend on a dependency marked as broken.
 dont-distribute-packages:
 
+ - 2captcha
+ - 3d-graphics-examples
+ - 3dmodels
  - 4Blocks
  - a-piece-of-flake
  - a50
+ - AAI
+ - aasam
+ - abacate
  - abcBridge
+ - abcnotation
+ - abeson
(truncated thousands of lines to reduce noise)
  - zwirn
+ - zwirn-core
+ - zxcvbn-dvorak
+ - zydiskell
+ - zyre2
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 7464813ddf49..b920c08a7727 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -81949,6 +81949,7 @@ self: {
       ];
       description = "Perform refactorings specified by the refact library";
       license = lib.meta.getLicenseFromSpdxId "BSD-3-Clause";
+      hydraPlatforms = lib.platforms.none;
       mainProgram = "refactor";
     }
   ) { };
@@ -236126,6 +236127,7 @@ self: {
       ];
       description = "First class accessor labels implemented as lenses";
       license = lib.licenses.bsd3;
+      hydraPlatforms = lib.platforms.none;
     }
   ) { };
 
@@ -446811,7 +446813,7 @@ self: {
     {
       mkDerivation,
       base,
-      lua5_4,
+      lua,
       tasty,
       tasty-hunit,
     }:
@@ -446824,7 +446826,7 @@ self: {
         "-f-use-pkgconfig"
       ];
       libraryHaskellDepends = [ base ];
-      librarySystemDepends = [ lua5_4 ];
+      librarySystemDepends = [ lua ];
       testHaskellDepends = [
         base
         tasty
@@ -446833,7 +446835,7 @@ self: {
       description = "Lua, an embeddable scripting language";
       license = lib.meta.getLicenseFromSpdxId "MIT";
     }
-  ) { inherit (pkgs) lua5_4; };
+  ) { lua = null; };
 
   lua-arbitrary = callPackage (
     {

@maralorn

Copy link
Copy Markdown
Member

Yeah, I think this PR has nothing to with the breakage. Our script is just broken on master.

Another candidate is #554512 which at least also broke the script for lix.

The workaround for now is to just run regenerate-hackage-packages.sh --fast that or rather just drop the change to the transitive-broken list.

@mweinelt

Copy link
Copy Markdown
Member Author

Just ran regenerate-hackage-packages.sh with --fast and committed just the relevant hunks that removed the pcre references.

@maralorn maralorn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re the Haskell fix this should be fine now. It will mean a few failed hydra jobs, but that isn’t a blocker and will get cleaned up in due time.

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 26, 2026
@mweinelt
mweinelt added this pull request to the merge queue Oct 26, 2026
@mweinelt

Copy link
Copy Markdown
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 578893
Commit: 5f6d3c4717a94055cf6aee4c280a104ee9510578


x86_64-linux

⏩ 43 packages marked as broken and skipped:
  • coccinelle
  • cvehound
  • gbforth
  • gforth
  • comby
  • babeldoc
  • linuxKernel.packages.linux_6_18.drbd
  • linuxKernel.packages.linux_6_1.drbd
  • linuxKernel.packages.linux_6_12.drbd
  • linuxKernel.packages.linux_7_2.drbd
  • linuxKernel.packages.linux_7_3.drbd
  • linuxKernel.packages.linux_6_6.drbd
  • linuxKernel.packages.linux_xanmod.drbd
  • linuxKernel.packages.linux_xanmod_latest.drbd
  • linuxKernel.packages.linux_xanmod_stable.drbd
  • linuxPackages.drbd
  • linuxPackages_latest.drbd
  • ocamlPackages.inifiles
  • linuxPackages_xanmod_stable.drbd
  • linuxPackages_xanmod.drbd
  • linuxKernel.packages.linux_zen.drbd
  • linuxPackages_zen.drbd
  • ocamlPackages.ocaml_pcre
  • ocamlPackages.mparser-pcre
  • ocamlPackages_latest.inifiles
  • linuxPackages_xanmod_latest.drbd
  • ocamlPackages_latest.mparser-pcre
  • ocamlPackages_latest.ocaml_pcre
  • ocamlPackages.janeStreet.patdiff
  • patdiff
  • python313Packages.hyperscan
  • python314Packages.hyperscan
  • tests.makeHardcodeGsettingsPatch.basic
  • tests.makeHardcodeGsettingsPatch.existsFn
  • tests.makeHardcodeGsettingsPatch.patches
  • ocamlPackages.janeStreet.janestreet_csv
  • trafficserver
  • ocamlPackages.patdiff
  • ocamlPackages_latest.janeStreet.patdiff
  • ocamlPackages.janestreet_csv
  • ocamlPackages_latest.patdiff
  • ocamlPackages_latest.janeStreet.janestreet_csv
  • ocamlPackages_latest.janestreet_csv
⏩ 2 packages present in ofBorg's evaluation, but not found in the checkout:
  • pcre
  • tests.pkg-config.defaultPkgConfigPackages.libpcre
⏩ 1 package blacklisted:
  • tests.pkg-config.defaultPkgConfigPackages.tests-combined
❌ 58 packages failed to build:
  • haskellPackages.curryer
  • haskellPackages.bugsnag
  • haskellPackages.bizzlelude
  • haskellPackages.bugsnag-wai
  • haskellPackages.arbtt
  • haskellPackages.bugsnag-yesod
  • haskellPackages.ghc-core
  • haskellPackages.fakedata
  • haskellPackages.hcoord
  • haskellPackages.firefly
  • haskellPackages.file-modules
  • haskellPackages.heatshrink
  • haskellPackages.clash-lib-hedgehog
  • haskellPackages.highlighter2
  • haskellPackages.esqueleto
  • haskellPackages.esqueleto-compat
  • haskellPackages.esqueleto-postgis
  • haskellPackages.http-trace
  • haskellPackages.hmp3-ng
  • haskellPackages.hpc-threshold
  • haskellPackages.hedgehog-fakedata
  • haskellPackages.hs-opentelemetry-instrumentation-persistent-mysql
  • haskellPackages.hnix-store-db
  • haskellPackages.juandelacosa
  • haskellPackages.krank
  • haskellPackages.logic-TPTP
  • haskellPackages.mysql-json-table
  • haskellPackages.mysql-simple
  • haskellPackages.pcre-heavy
  • haskellPackages.pcre-less
  • haskellPackages.pcre-light
  • haskellPackages.persistent-mysql
  • haskellPackages.lens-regex-pcre
  • haskellPackages.persistent-sql-lifted
  • haskellPackages.persistent-typed-db
  • haskellPackages.misfortune
  • haskellPackages.phizzle
  • haskellPackages.lambdabot-novelty-plugins
  • haskellPackages.regex-pcre
  • haskellPackages.regex-easy
  • haskellPackages.persistent-pagination
  • haskellPackages.string-random
  • haskellPackages.rex
  • haskellPackages.tagging
  • haskellPackages.haskoin-wallet
  • haskellPackages.ua-parser
  • haskellPackages.validate-input
  • haskellPackages.sizes
  • haskellPackages.bcp47-orphans
  • haskellPackages.test-karya
  • krank
  • haskellPackages.headroom
  • haskellPackages.r3x-haskell-sdk
  • haskellPackages.tiktoken
  • haskellPackages.microformats2-parser
  • haskellPackages.quickcheck-string-random
  • haskellPackages.lambdabot
  • lambdabot
✅ 2 packages built:
  • lutris
  • lutris-free

haskellPackages.pcre-light
/nix/store/3xs2wv4lvvx1xgihzin1bcpsjjhn57pv-ghc-9.10.3/bin/hpc-ghc-9.10.3
Using hsc2hs version 0.68.10 found on system at:
/nix/store/3xs2wv4lvvx1xgihzin1bcpsjjhn57pv-ghc-9.10.3/bin/hsc2hs-ghc-9.10.3
Using hscolour version 1.25 found on system at:
/nix/store/za7vaxs70c6j3gv64wc6fvg8dm3j9vxx-hscolour-1.25/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/r5ri78axx1qggkjq3vawywlzglg70b5w-gcc-wrapper-16.2.0/bin/ld
No pkg-config found
Using runghc version 9.10.3 found on system at:
/nix/store/3xs2wv4lvvx1xgihzin1bcpsjjhn57pv-ghc-9.10.3/bin/runghc-9.10.3
Using strip version 2.46 found on system at:
/nix/store/r5ri78axx1qggkjq3vawywlzglg70b5w-gcc-wrapper-16.2.0/bin/strip
Using tar found on system at:
/nix/store/n318yf1q5vysgh2qn6fd1q8yjy9vmwvh-gnutar-1.35/bin/tar
No uhc found
Error: [Cabal-4345]
Missing dependency on a foreign library:
* Missing (or bad) C library: pcre
haskellPackages.regex-pcre
source root is regex-pcre-0.95.0.1
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file "regex-pcre-0.95.0.1/src/Text/Regex/PCRE/Wrap.hsc"
Running phase: patchPhase
@nix {"action":"setPhase","phase":"patchPhase"}
Running phase: compileBuildDriverPhase
@nix {"action":"setPhase","phase":"compileBuildDriverPhase"}
setupCompileFlags: -package-db=/build/tmp.wNUMj2a1Ha/setup-package.conf.d -threaded
[1 of 2] Compiling Main             ( /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs, /build/tmp.wNUMj2a1Ha/Main.o )
[2 of 2] Linking Setup
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix {"action":"setPhase","phase":"updateAutotoolsGnuConfigScriptsPhase"}
Running phase: configurePhase
@nix {"action":"setPhase","phase":"configurePhase"}
configureFlags: --verbose --prefix=/nix/store/r66hwg6nbjc9ld6yrfbj90v2r0ghq46b-regex-pcre-0.95.0.1 --libdir=$prefix/lib/$compiler/lib --libsubdir=$abi/$libname --docdir=/nix/store/gb5j6cwnfjybplvgvg12avr9dsk370zb-regex-pcre-0.95.0.1-doc/share/doc/regex-pcre-0.95.0.1 --with-gcc=gcc --package-db=/build/tmp.wNUMj2a1Ha/package.conf.d --ghc-option=-j10 --ghc-option=+RTS --ghc-option=-A64M --ghc-option=-RTS --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --enable-split-sections --enable-library-stripping --enable-executable-stripping --ghc-option=-haddock --extra-lib-dirs=/nix/store/r9nlzwasmr1hgcbrfzcp2b2cz33scij2-ncurses-6.6/lib --extra-lib-dirs=/nix/store/pfds9zw10xksh0zr7qplqg1lj9avs2gz-libffi-3.8.0/lib --extra-lib-dirs=/nix/store/bvfkqam1y3zmsb3k41iml0zwx13sknjl-elfutils-0.195/lib --extra-lib-dirs=/nix/store/7whfqxz5vs4kn8jiybvdj5k7ib6h4442-gmp-with-cxx-6.3.0/lib --extra-lib-dirs=/nix/store/vbmxpq22lm0hhb37mhykinj45aa0ljc3-numactl-2.0.18/lib
Using Parsec parser
Configuring regex-pcre-0.95.0.1...
Flags chosen: pkg-config=True
Error: [Cabal-7620]
The program 'pkg-config' version >=0.9.0 is required but it could not be found.

Merged via the queue into NixOS:master with commit 09374a8 Oct 26, 2026
29 checks passed
@mweinelt
mweinelt deleted the kill-pcre branch October 26, 2026 00:39
@Scrumplex Scrumplex moved this from In review to Done in 26.11 Blockers Oct 26, 2026
happy-dude added a commit to happy-dude/dotfiles that referenced this pull request Oct 28, 2026
NixOS/nixpkgs#578893 removed pcre and marked ocaml_pcre broken. On
nixpkgs-unstable f05535a0efcb, neither profile evaluates any more, first
failing in nixGL's wrapper check:

    error: 'pcre' has been removed because it is end of life and was not
    updated upstream since 2015

nixGL's checkPhase runs `${pcre}/bin/pcregrep` only to list the store
paths a wrapper references. pcre2grep takes the same pattern and `-o0`,
so call nixGL.nix directly with a `pcre` whose `bin/pcregrep` runs
pcre2grep. The nixGL source stays as upstream ships it; nix-community/nixGL#227
proposes the same swap upstream.

nixpkgs' coccinelle 1.3.1 links ocaml_pcre, so it no longer evaluates
either. Coccinelle 1.3.3 moved to pcre2 upstream
(coccinelle/coccinelle@0af33438), so build that tag against
ocamlPackages.pcre2. NixOS/nixpkgs#554724 bumps to 1.3.3 but still uses
ocaml_pcre, so the override checks the locked coccinelle's inputs for
ocaml_pcre rather than comparing versions. It compares names, because
evaluating the broken package would throw. coccinelle moves out of the
`with pkgs;` list so the overridden one is visibly what is installed.

Each workaround switches itself off once its locked input carries the
fix: when nixGL.nix stops taking `pcre`, or nixpkgs' coccinelle stops
linking ocaml_pcre. Home Manager then warns that the workaround in
home.nix can be removed.

Tested on nixpkgs-unstable f05535a0efcb: both profiles evaluate and
build, nixGLIntel, nixVulkanIntel, and the nixGL-wrapped mesa-demos
build, and the pcregrep shim still rejects a wrapper that references a
missing store path. spatch reports version 1.3.3 with PCRE syntax,
links libpcre2-8, and applies a small semantic patch and a `=~` regex
rule. Coccinelle's own `--ctestall` run on this 1.3.3 + pcre2 build
earlier reported 763/763 plus 21 known failures, the same as 1.3.3 with
its bundled pcre2. With nixGL locked to the #227 branch, the shim turns
off and the nixGL warning appears. With a nixpkgs copy whose coccinelle
uses pcre2, the override turns off and its warning appears. A copy
bumped to 1.3.3 but still on ocaml_pcre keeps the override and warns
about nothing. Those two nixpkgs copies were checked by evaluation only.

Link: NixOS/nixpkgs#578893
Link: NixOS/nixpkgs#554724
Link: nix-community/nixGL#227
Assisted-by: claude-opus-5-5:high oh-my-pi
Signed-off-by: Stanley Chan <[email protected]>
@andersk

andersk commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

haskellPackages.regex-pcre-builtin includes an even older bundled version of the same unmaintained library and should probably dropped too. 😢

The upgrade path for Haskell users of regex-pcre and regex-pcre-builtin seems to be regex-pcre2, with just a few renames (e.g. Text.Regex.PCRE → Text.Regex.PCRE2, compUTF8 → compUTF, execBlank → matchBlank).

Sreehari425 pushed a commit to Sreehari425/nixGL that referenced this pull request Oct 31, 2026
nixpkgs removed pcre in NixOS/nixpkgs#578893, so every wrapper fails to
evaluate:

    error: 'pcre' has been removed because it is end of life and was not
    updated upstream since 2015

The wrapper check only uses pcregrep to list store paths, and pcre2grep
takes the same pattern and flags. `${pcre2.bin}` instead of `lib.getExe'`
because the nixpkgs.nix pin predates `lib.getExe'`.

Link: NixOS/nixpkgs#578893
Assisted-by: claude-opus-5-5:high oh-my-pi/18.12.3
Signed-off-by: Stanley Chan <[email protected]>
drupol added a commit to fossar/nix-phps that referenced this pull request Nov 1, 2026
drupol added a commit to fossar/nix-phps that referenced this pull request Nov 1, 2026
drupol added a commit to fossar/nix-phps that referenced this pull request Nov 1, 2026
phijor pushed a commit to phijor/nixGL that referenced this pull request Nov 9, 2026
nixpkgs removed pcre in NixOS/nixpkgs#578893, so every wrapper fails to
evaluate:

    error: 'pcre' has been removed because it is end of life and was not
    updated upstream since 2015

The wrapper check only uses pcregrep to list store paths, and pcre2grep
takes the same pattern and flags. `${pcre2.bin}` instead of `lib.getExe'`
because the nixpkgs.nix pin predates `lib.getExe'`.

Link: NixOS/nixpkgs#578893
Assisted-by: claude-opus-5-5:high oh-my-pi/18.12.3
Signed-off-by: Stanley Chan <[email protected]>
@dudebout dudebout mentioned this pull request Nov 28, 2026
5 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Tracking: Migrate from PCRE to PCRE2

5 participants