haskellPackages.callCabal2nix: provide fallback name if source is not package

This commit is contained in:
3noch 2017-02-04 02:01:10 -05:00
parent e4fe2165a0
commit 8454a9e753
No known key found for this signature in database
GPG Key ID: 6ABB57E3D52B0628

View File

@ -87,7 +87,7 @@ let
# Creates a Haskell package from a source package by calling cabal2nix on the source.
callCabal2nix = src: self.callPackage (haskellSrc2nix {
inherit src;
name = src.name;
name = src.name or baseNameOf src;
});
ghcWithPackages = selectFrom: withPackages (selectFrom self);