You could use `pkgs.stdenv.lib.versionOlder "x.y" ghc.version` to override Cabal only iff GHC has a version that's older than the one we need. On platforms that have Cabal >= 1.18, you can pass `null` instead.