cabal2nix 2.15.2 → 2.15.3
raw patch · 3 files changed
+33/−3 lines, 3 filesdep ~CabalPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: Cabal
API changes (from Hackage documentation)
Files
- README.md +22/−0
- cabal2nix.cabal +5/−3
- src/Distribution/Nixpkgs/Haskell/FromCabal.hs +6/−0
README.md view
@@ -59,3 +59,25 @@ * directory * source archive (zip, tar.gz, ...) from http or https URL or local file. * git, mercurial, svn or bazaar repository++## `hackage2nix`++This repository also contains, in the [`hackage2nix/`](./hackage2nix) directory,+the tool to update the Haskell packages in+[nixpkgs](https://github.com/NixOS/nixpkgs). It has its own README there.++## Building++For ease of contribution, we support these methods to build `cabal2nix`:++* `stack build` if you have [_Stack_](http://haskellstack.org/)+ * The Stack build can use system dependencies from a pinned nixpkgs+ version for increased reproducibility (see [`stack.yaml`](./stack.yaml)).+ On NixOS this happens automatically.+ On non-NixOS, use `stack --nix build` for that.+* `cabal install` if you have [_cabal-install_](https://www.haskell.org/cabal/)+ installed+* TODO: Add a build method that requires only `nix` preinstalled,+ also pins nixpkgs, and is thus fully reproducible.++When making changes, please ensure that all these methods continue to work.
cabal2nix.cabal view
@@ -1,5 +1,5 @@ name: cabal2nix-version: 2.15.2+version: 2.15.3 synopsis: Convert Cabal files into Nix build instructions. description: Convert Cabal files into Nix build instructions. Users of Nix can install the latest@@ -27,7 +27,7 @@ gebbert, laMudri, Александр Цамутали maintainer: Peter Simons <simons@cryp.to> stability: stable-tested-with: GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1+tested-with: GHC == 8.8.3, GHC == 8.10.1 category: Distribution, Nix homepage: https://github.com/nixos/cabal2nix#readme bug-reports: https://github.com/nixos/cabal2nix/issues@@ -61,7 +61,9 @@ other-modules: Paths_cabal2nix hs-source-dirs: src build-depends: base > 4.11- , Cabal == 3.2.*+ -- When changing the Cabal version, ensure that it builds+ -- with all installation methods mentioned in the README!+ , Cabal >= 3.0 , aeson > 1 , ansi-wl-pprint , bytestring
src/Distribution/Nixpkgs/Haskell/FromCabal.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} @@ -106,8 +107,13 @@ then fromMaybe (error (display package ++ ": X-Cabal-File-Hash field is missing")) (lookup "X-Cabal-File-Hash" customFieldsPD) else "") & metaSection .~ ( Nix.nullMeta+#if MIN_VERSION_Cabal(3,2,0) & Nix.homepage .~ strip isSpace (fromShortText homepage) & Nix.description .~ fromShortText synopsis+#else+ & Nix.homepage .~ strip isSpace homepage+ & Nix.description .~ synopsis+#endif & Nix.license .~ nixLicense & Nix.platforms .~ Nix.allKnownPlatforms & Nix.hydraPlatforms .~ (if isFreeLicense nixLicense then Nix.allKnownPlatforms else Set.empty)