cabal2nix: update to version 20150807

This update greatly enhances the accuracy with which dependencies are expressed
in the generated Nix files. Previous versions distinguished dependencies for
building ("buildDepends") and testing ("testDepends"). This distinction didn't
apply to system packages or build tools, however: the fields "extraLibs" and
"buildTools" applied to the entire build. This meant that dependencies required
only for testing would be pulled in regardless of whether the test were
actually being run, etc.

These days, we distinguish dependencies for libraries, executables, and tests,
and for each of those types we distinguish dependencies on Haskell libraries,
system libraries, pkgconfig libraries, and build tools. This gives us a
whopping 12 new attributes

    xxxHaskellDepends
    xxxSystemDepends
    xxxPkgconfigDepends
    xxxToolDepends

where "xxx" is any of "library", "executable", or "test".

The old dependency attributes are no longer generated by cabal2nix. The generic
builder in Nixpkgs still accepts them, though, for the sake of backwards
compatibility. This means that you don't have to re-generate all your build
expressions with the new version, but you *should*.
This commit is contained in:
Peter Simons 2015-08-07 14:43:21 +02:00
parent e16be46be2
commit 29fed6f834

View File

@ -1,35 +1,41 @@
{ mkDerivation, fetchgit, aeson, base, bytestring, Cabal, containers
, deepseq, deepseq-generics, directory, doctest, filepath, gitMinimal
, hackage-db, hspec, lens, monad-par, monad-par-extras, mtl, pretty
, process, QuickCheck, regex-posix, SHA, split, stdenv, transformers
, utf8-string, cartel, nix-prefetch-scripts, optparse-applicative
, makeWrapper
{ mkDerivation, fetchgit, aeson, ansi-wl-pprint, base, bytestring, Cabal
, containers, deepseq, deepseq-generics, directory, doctest, filepath
, hackage-db, hspec, lens, monad-par, monad-par-extras, mtl
, optparse-applicative, pretty, process, QuickCheck, regex-posix, SHA, split
, stdenv, transformers, utf8-string, makeWrapper, gitMinimal, cartel
, nix-prefetch-scripts
}:
mkDerivation rec {
pname = "cabal2nix";
version = "20150531";
version = "20150807";
src = fetchgit {
url = "http://github.com/NixOS/cabal2nix.git";
rev = "513a5fce6cfabe0b062424f6deb191a12f7e2187";
sha256 = "1j4x85cqj823d9swi473b4i9rz9wlm9m7c1il73h02dq5i67wida";
rev = "796dabfc3fb0a98174b680c5d722954096465103";
sha256 = "1blyjq80w9534ap4cg0m6awks0zj2135kxld1i9d2z88x1ijzx9v";
deepClone = true;
};
isLibrary = true;
isExecutable = true;
enableSharedLibraries = false;
enableSharedExecutables = false;
buildDepends = [
aeson base bytestring Cabal containers deepseq-generics directory
filepath hackage-db lens monad-par monad-par-extras mtl pretty
process regex-posix SHA split transformers utf8-string cartel
optparse-applicative
libraryHaskellDepends = [
aeson ansi-wl-pprint base bytestring Cabal containers
deepseq-generics directory filepath hackage-db lens monad-par
monad-par-extras mtl optparse-applicative pretty process
regex-posix SHA split transformers utf8-string
];
testDepends = [
aeson base bytestring Cabal containers deepseq deepseq-generics
directory doctest filepath hackage-db hspec lens monad-par
monad-par-extras mtl pretty process QuickCheck regex-posix SHA
split transformers utf8-string
executableHaskellDepends = [
aeson ansi-wl-pprint base bytestring Cabal containers
deepseq-generics directory filepath hackage-db lens monad-par
monad-par-extras mtl optparse-applicative pretty process
regex-posix SHA split transformers utf8-string
];
testHaskellDepends = [
aeson ansi-wl-pprint base bytestring Cabal containers deepseq
deepseq-generics directory doctest filepath hackage-db hspec lens
monad-par monad-par-extras mtl optparse-applicative pretty process
QuickCheck regex-posix SHA split transformers utf8-string
];
buildDepends = [ cartel ];
buildTools = [ gitMinimal makeWrapper ];
preConfigure = ''
git reset --hard # Re-create the index that fetchgit destroyed in the name of predictable hashes.