Skip to content

Projects using hpack (not .cabal) cannot be built #85

Description

@srid

Seems to be a regression from #57 #42

       > No cabal.project file or cabal file matching the default glob './*.cabal' was found.
       > Please create a package description file <pkgname>.cabal or a cabal.project file referencing the packages you want to build.

Turns out that the use of buildFromCabalSdist is the culprit:

let
fromSdist = self.buildFromCabalSdist or (builtins.trace "Your version of Nixpkgs does not support hs.buildFromCabalSdist yet." (pkg: pkg));
filterSrc = name: src: lib.cleanSourceWith { inherit src name; filter = path: type: true; };
in
lib.mapAttrs
(name: value:
let
# callCabal2nix does not need a filtered source. It will
# only pick out the cabal and/or hpack file.
pkgProto = self.callCabal2nix name value.root { };
pkgFiltered = pkgs.haskell.lib.overrideSrc pkgProto {
src = filterSrc name value.root;
};
in
fromSdist pkgFiltered)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcase for testsThings we must automate testing of

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions