diff --git a/pkgs/development/haskell-modules/default.nix b/pkgs/development/haskell-modules/default.nix index cf30a7699ed6..31b20ab19f36 100644 --- a/pkgs/development/haskell-modules/default.nix +++ b/pkgs/development/haskell-modules/default.nix @@ -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);