Changelog for cabal2nix-2.20.1
Revision History for cabal2nix
2.20.1
- Add support for Cabal
== 3.14.*in the test suite. - Adjust postprocessing hooks in
hfseventsto recent changes to Darwin frameworks in nixpkgs. Assumes at least 25.05 or recent Nixpkgs unstable for generatedhfseventsexpressions, see also nixpkgs#398707. - Use
pkgs.libpqoverpkgs.postgresqlwhen possible. Requires Nixpkgs with nixpkgs#359659 (e.g. 25.05 or later).
2.20.0
cabal2nixnow prints the commands it runs when fetching sources.cabal2nixnow produces colorful output using ANSI SGR escape sequences when printing to a TTY. This can be disabled using theNO_COLORenvironment variable or forcibly enabled usingFORCE_COLOR.hackage2nixnow defaults internally to an utf-8 locale, ignoring enviroment variables.cabal2nixnow exclusively uses the new plural testTargets argument.- This is an API breaking change:
_testTargetwas removed in favor of_testTargets. - Expressions using
_testTargetswill only work with Nixpkgs 24.11, 25.05 or newer. Warning: As of this writing (2025-03-10), the unstable channels of nixpkgs don't support testTargets yet. Inclusion is tracked by nixpkgs#371032.
- This is an API breaking change:
- Added support for the testFlags argument,
available since 21.11, to
Derivation. API breaking change. - Remove
_enableSplitObjsfromDerivationsince it hasn't been supported by Nixpkgs in a while, API breaking change. - Added and updated various library name to Nixpkgs attribute name mappings.
- Dropped/reduced post-processing hooks for
pandocgit-annexhaddocktz
- Postprocessing hooks utilising
replaceno longer fail when they can't find the binding to replace. This fixes an issue wherecabal2nixwould fail to generate an expression for a package whenhackage2nixwould succeed.
2.19.1
Warning: This version of cabal2nix generates Nix expressions that
are expected to be used with at least NixOS 22.11 or the unstable
channels at 3928cfa27d9925f9fbd1d211cf2549f723546a81 or later (which
should be all unstable channels published after 2022-10-23) due to changes
how libcrypt is provided by nixpkgs. For details read below.
cabal2nixandhackage2nixwill now emit a dependency onlibxcryptif thecryptlibrary is requested by a package description. This has been done becausenixpkgshas disabledlibcryptbeing bundled withglibc, so the library will need to be pulled in from elsewhere. These new generated nix expressions may not work correctly with older versions ofnixpkgs(since twolibcrypts would be pulled in). Versions expected to work are listed in the warning above. See also #576.cabal2nixandhackage2nixcan now resolve theFLAClibrary name. See also #567.- Fix test suite compilation with
Cabal >= 3.8. See also #572. - Packages closely tied to
cabal2nixhave been merged into the maincabal2nixsource repository. As a consequence, the cabal2nix source code has been moved into thecabal2nixsubdirectory. See also #567.
2.19.0
Note that some of the API has also changed in a breaking
manner because of the upgrade to distribution-nixpkgs
1.7.0,
see #506.
-
Only use
hpackwhen building if no cabal file is found for the package to process. See also #508. -
hackage2nixnow supports arbitrary Nix-style platform tuples inunsupported-platforms(including the newaarch64-darwin) as well as nixpkgs platform groups which are denoted as e. g.platforms.darwinand can be used instead of platform tuples. See also #506. API breaking change: TheIsStringinstance forPlatforminDistribution.Nixpkgs.Haskell.OrphanInstanceshas been removed. -
The new
hackage2nixsupported-platformsconfiguration field allows prescribing a specific list of platforms to set in the package'splatformsmeta attribute.unsupported-platformsare now translated tobadPlatformsinstead of being subtracted fromplatforms. See also #506 and #560. API Breaking Change forDistribution.Nixpkgs.Haskell.FromCabal.Configuration. -
cabal2nixwill no longer emit a dependency onwebkitgtk24x-gtk{2,3}if it detects the older 3.0 API of WebKit being used. Nixpkgs hasn't contained this package for a few years now due to security vulnerabilities and the packages still using it on Hackage are unmaintained. If you have a legacy project built with an old version of nixpkgs, either don't upgradecabal2nixor emulate the old behavior using overrides. See also #521. -
If the input cabal file declares just a single executable, the
mainProgrammeta attribute will be set in the resulting Nix expression. See also #506 and #557. -
If
cabal2nix(orhackage2nix) doesn't recognize the license of a package, it'll still assume that it's free and enable building on Hydra (i. e. use the default value ofhydraPlatforms). This is done because Hackage requires uploaded packages to be open source. You may need to keep this change in mind, however, if you usecabal2nixfor packaging unfree software. See also #520.isFreeLicensehas changed semantically as a result. -
Argument parsing logic in
cabal2nixhas been refactored in #544. API breaking change for the following modules:Cabal2nixDistribution.Nixpkgs.FetchDistribution.Nixpkgs.Haskell.Derivation(removed instance)Distribution.Nixpkgs.Haskell.PackageSourceSpec
-
Update handling of Lua bindings to reflect current state upstream. See #527 and #547.
2.18.0
- Support GHC 9.0.x and Cabal 3.4.0.0, API breaking change (See #503)
- Fix fetching remote archives: Previously they weren't properly unpacked, API breaking change (See #455)
- Resolution of system dependency attribute names in nixpkgs
- Update changed upstream attribute names, reflect deprecations
- Fix hackage2nix not resolving certain attribute names if multiple attribute names referred to the same derivation. (See #492 and distribution-nixpkgs#10)
- hackage2nix: accept multiple config files at the command
line given by specifying
--configmore than once (See #494)