Skip to content

Add a file back after using gitIgnoreSource/cleanSourceWith #45

Open
@codygman

Description

I have the following:

    root = pkgs.lib.cleanSourceWith
      { filter = (path: type:
          ! (builtins.any
            (r: (builtins.match r (builtins.baseNameOf path)) != null)
            [
              "README.md"
              "notes"
              "ops"
              "tf"
              ".ghcid"
              ".dir-locals.el"
              ".semaphore"
            ])
        );
        src = gitignoreSource ./. ++ [];
      } ;

This worked alright until in lorri/issues#415 it was recommended that I make generating hpack part of my build process. So I did that like this:

        preConfigure = ''
          echo "generating cabal file from package.yaml..."
          hpack
           '';

But now I need to unignore the cabal file so that lorri will watch changes to it. Is there a way to do this? Can I compose a function to add a filepath back after cleanSourceWith?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions