Cabal: Specifying remote Git repositories without .cabal file?

Created on 10 Dec 2018  路  1Comment  路  Source: haskell/cabal

Suppose we want use a remote git repository and write so:

source-repository-package
  type: git
  location: https://github.com/wataru86/han2zen
  tag: 7b13cb39506453b07eb38d5ad24799926f641bde

However, when that repository doesn't contain a cabal file, cabal complains with NoCabalFileFound. Of course we can generate cabal files and include it into git, but if there're alternatives, we'd like to know. Thanks.

enhancement

Most helpful comment

Hmm, this is nasty. Would it be enough if one would be able to specify a command(s) to be run (which would prepare the working directory to sdisted).

I'm :-1: of teaching cabal about hpack or anything else specifically. In fact there are

  • autoreconf -i
  • hpack
  • dhall-to-cabal
  • make (e.g. in alex, almost)

and probably more. Requiring a user to specify the preprocessors (field name up to bikeshedding) is IMHO more future-proof way:

  type: git
  location: https://github.com/wataru86/han2zen
  tag: 7b13cb39506453b07eb38d5ad24799926f641bde
  preprocessors:  hpack

would then work.

Things to look up in the implementation:

  • Windows: restricting to a single parametrless commands (i.e. no shell etc.) would do the job?
  • interaction with subdirectories (preprocess before or after chdir, should one be able to specify?)
  • how preprocessing would interact with sharing of checkouts (do we even share them?)

>All comments

Hmm, this is nasty. Would it be enough if one would be able to specify a command(s) to be run (which would prepare the working directory to sdisted).

I'm :-1: of teaching cabal about hpack or anything else specifically. In fact there are

  • autoreconf -i
  • hpack
  • dhall-to-cabal
  • make (e.g. in alex, almost)

and probably more. Requiring a user to specify the preprocessors (field name up to bikeshedding) is IMHO more future-proof way:

  type: git
  location: https://github.com/wataru86/han2zen
  tag: 7b13cb39506453b07eb38d5ad24799926f641bde
  preprocessors:  hpack

would then work.

Things to look up in the implementation:

  • Windows: restricting to a single parametrless commands (i.e. no shell etc.) would do the job?
  • interaction with subdirectories (preprocess before or after chdir, should one be able to specify?)
  • how preprocessing would interact with sharing of checkouts (do we even share them?)
Was this page helpful?
0 / 5 - 0 ratings