1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

callCabal2nix: Take advantage of new hpack support.

This commit is contained in:
Shea Levy 2017-12-07 15:26:51 -05:00
parent bed3695848
commit 42519a0f87
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27

View file

@ -151,7 +151,9 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
# `fetchFromGitHub`.
overrideCabal (self.callPackage (haskellSrc2nix {
inherit name;
src = builtins.filterSource (path: type: pkgs.lib.hasSuffix ".cabal" path) src;
src = builtins.filterSource (path: type:
pkgs.lib.hasSuffix "${name}.cabal" path || pkgs.lib.hasSuffix "package.yaml" path
) src;
}) args) (_: { inherit src; });
# : Map Name (Either Path VersionNumber) -> HaskellPackageOverrideSet