berberman / arch-hs

Distribute hackage packages to archlinux
MIT License
19 stars 4 forks source link

<no location info>: error: module ‘Setup’ cannot be found locally #84

Closed Freed-Wu closed 1 year ago

Freed-Wu commented 1 year ago
$ arch-hs -o . toml-reader
$ cd haskell-toml-reader
$ makepkg -fsi --asdeps
==> Making package: haskell-toml-reader 0.2.1.0-1 (Mon 11 Sep 2023 05:22:40 PM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found toml-reader-0.2.1.0.tar.gz
==> Validating source files with sha256sums...
    toml-reader-0.2.1.0.tar.gz ... Skipped
==> Extracting sources...
  -> Extracting toml-reader-0.2.1.0.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...

<no location info>: error: module ‘Setup’ cannot be found locally
==> ERROR: A failure occurred in build().
    Aborting...
felixonmars commented 1 year ago

You need a shim-setup script. gen-setup from the uusi package would be able to do that but you could also write it yourself.

Freed-Wu commented 1 year ago

So it is not a bug? Users must add gen-setup by themselves.

felixonmars commented 1 year ago

I'm afraid yes. The cabal index doesn't seem to be providing necessary info so arch-hs doesn't know if the source tarball contains a Setup.hs or not.

Freed-Wu commented 1 year ago

The cabal index doesn't seem to be providing necessary info

OK, it is a bug of toml-reader. I'll report to https://github.com/brandonchinn178/toml-reader/issues/29.