cabal2nix 2.20.0 → 2.20.1
raw patch · 5 files changed
+25/−6 lines, 5 filesdep ~CabalPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: Cabal
API changes (from Hackage documentation)
- Distribution.Nixpkgs.Fetch: fetch :: forall a. FetchSubmodules -> (String -> MaybeT IO a) -> Source -> IO (Maybe (DerivationSource, a))
+ Distribution.Nixpkgs.Fetch: fetch :: FetchSubmodules -> (String -> MaybeT IO a) -> Source -> IO (Maybe (DerivationSource, a))
Files
- CHANGELOG.md +11/−0
- cabal2nix.cabal +2/−2
- src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs +2/−1
- src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs +0/−2
- test/Main.hs +10/−1
CHANGELOG.md view
@@ -1,5 +1,16 @@ # Revision History for cabal2nix +## 2.20.1++* Add support for Cabal `== 3.14.*` in the test suite.+* Adjust postprocessing hooks in `hfsevents` to recent changes to Darwin+ frameworks in nixpkgs. Assumes at least 25.05 or recent Nixpkgs unstable+ for generated `hfsevents` expressions, see also+ [nixpkgs#398707](https://github.com/NixOS/nixpkgs/pull/398707).+* Use `pkgs.libpq` over `pkgs.postgresql` when possible. Requires+ Nixpkgs with [nixpkgs#359659](https://github.com/NixOS/nixpkgs/pull/359659)+ (e.g. 25.05 or later).+ ## 2.20.0 * `cabal2nix` now [prints the commands it runs when fetching sources](https://github.com/nixOS/cabal2nix/commit/5327953d299eba0b6de4e88bacf4bba9022bb5e2).
cabal2nix.cabal view
@@ -1,5 +1,5 @@ name: cabal2nix-version: 2.20.0+version: 2.20.1 synopsis: Convert Cabal files into Nix build instructions. description: Convert Cabal files into Nix build instructions. Users of Nix can install the latest@@ -12,7 +12,7 @@ -- list all contributors: git log --pretty='%an' | sort | uniq maintainer: sternenseemann <sternenseemann@systemli.org> stability: stable-tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.6 || == 9.8.3 || == 9.10.1+tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.8 || == 9.4.8 || == 9.6.7 || == 9.8.4 || == 9.10.1 || == 9.12.2 category: Distribution, Nix homepage: https://github.com/nixos/cabal2nix#readme bug-reports: https://github.com/nixos/cabal2nix/issues
src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs view
@@ -162,12 +162,13 @@ libNixName "pfs-1.2" = return "pfstools" libNixName "png" = return "libpng" libNixName "poppler-glib" = return "poppler_gi"-libNixName "pq" = return "postgresql"+libNixName "pq" = return "libpq" libNixName "pthread" = [] libNixName "pulse" = return "libpulseaudio" libNixName "pulse-simple" = return "libpulseaudio" libNixName "python-3.3" = return "python33" libNixName "python-3.4" = return "python34"+libNixName "python3-embed" = return "python3" libNixName "Qt5Core" = return "qt5" libNixName "Qt5Gui" = return "qt5" libNixName "Qt5Qml" = return "qt5"
src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs view
@@ -320,8 +320,6 @@ hfseventsOverrides = set isLibrary True . set (metaSection . platforms) (Just $ Set.singleton (NixpkgsPlatformGroup (ident # "darwin")))- . set (libraryDepends . tool . contains (bind "pkgs.darwin.apple_sdk.frameworks.CoreServices")) True- . set (libraryDepends . system . contains (bind "pkgs.darwin.apple_sdk.frameworks.Cocoa")) True . over (libraryDepends . haskell) (Set.union (Set.fromList (map bind ["self.base", "self.cereal", "self.mtl", "self.text", "self.bytestring"]))) opencvOverrides :: Derivation -> Derivation
test/Main.hs view
@@ -22,6 +22,9 @@ import Distribution.PackageDescription.Parsec #endif import Distribution.System+#if MIN_VERSION_Cabal(3,14,0)+import Distribution.Utils.Path (makeSymbolicPath)+#endif import Distribution.Verbosity import Distribution.Version import Language.Nix@@ -38,6 +41,7 @@ -- depend on the system environment: https://github.com/NixOS/cabal2nix/issues/333. -- -- TODO: Run this test without $HOME defined to ensure that we don't need that variable.+ -- TODO: make test suite independent of working directory somehow cabal2nix <- findExecutable "cabal2nix" >>= \case Nothing -> fail "cannot find 'cabal2nix' in $PATH" Just exe -> pure exe@@ -74,7 +78,12 @@ (\ref new -> ["diff", "-u", ref, new]) goldenFile nixFile- (readGenericPackageDescription silent cabalFile >>= writeFileLn nixFile . prettyShow . cabal2nix)+#if MIN_VERSION_Cabal(3,14,0)+ (readGenericPackageDescription silent Nothing (makeSymbolicPath cabalFile)+#else+ (readGenericPackageDescription silent cabalFile+#endif+ >>= writeFileLn nixFile . prettyShow . cabal2nix) -- | TODO: --