GNU bug report logs - #49320
guix import hackage does not support build-tools and build-tool-depends stanzas

Previous Next

Package: guix;

Reported by: "Philip Munksgaard" <philip <at> munksgaard.me>

Date: Thu, 1 Jul 2021 18:27:01 UTC

Severity: normal

To reply to this bug, email your comments to 49320 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#49320; Package guix. (Thu, 01 Jul 2021 18:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Philip Munksgaard" <philip <at> munksgaard.me>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 01 Jul 2021 18:27:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Philip Munksgaard" <philip <at> munksgaard.me>
To: bug-guix <at> gnu.org
Subject: guix import hackage does not support build-tools and build-tool-depends stanzas
Date: Thu, 01 Jul 2021 20:26:17 +0200
[Message part 1 (text/plain, inline)]
The two stanzas build-tools[0] and build-tool-depends[1] are not supported by the cabal importer[2], which means that the generated build files for a package such as language-c-quote[3] doesn't work.

For instance, the attached language-c-quote.scm was generated by amending the result of running `guix cabal import -r language-c-quote`. Building it with `guix build -f language-c-quote.scm` yields the following error:

```
Setup.hs: The program 'alex' version >=3 is required but it could not be
found.

command "runhaskell" "Setup.hs" "configure" "--prefix=/gnu/store/javas0gpngal7lcmc77srpcc9z4891ni-ghc-language-c-quote-0.13" "--libdir=/gnu/store/javas0gpngal7lcmc77srpcc9z4891ni-ghc-language-c-quote-0.13/lib" "--docdir=/gnu/store/javas0gpngal7lcmc77srpcc9z4891ni-ghc-language-c-quote-0.13/share/doc/ghc-language-c-quote-0.13" "--libsubdir=$compiler/$pkg-$version" "--package-db=/tmp/guix-build-ghc-language-c-quote-0.13.drv-0/package.conf.d" "--global" "--enable-tests" "--enable-shared" "--enable-executable-dynamic" "--ghc-option=-fPIC" "--ghc-option=-optl=-Wl,-rpath=/gnu/store/javas0gpngal7lcmc77srpcc9z4891ni-ghc-language-c-quote-0.13/lib/$compiler/$pkg-$version" failed with status 1
builder for `/gnu/store/4l01sv6w7a7y8sikka48pd14rvw1wvj6-ghc-language-c-quote-0.13.drv' failed with exit code 1
build of /gnu/store/4l01sv6w7a7y8sikka48pd14rvw1wvj6-ghc-language-c-quote-0.13.drv failed
View build log at '/var/log/guix/drvs/4l/01sv6w7a7y8sikka48pd14rvw1wvj6-ghc-language-c-quote-0.13.drv.bz2'.
guix build: error: build of `/gnu/store/4l01sv6w7a7y8sikka48pd14rvw1wvj6-ghc-language-c-quote-0.13.drv' failed
```

The attached language-c-quote-fixed.scm adds the `ghc-happy` and `ghc-alex` packages to native-inputs, as required by the build-tools stanzas in the original cabal file.

However, build-tools has actually been deprecated in favor of build-tool-depends, as noted in the documentation, so I guess we should actually implement support for it in addition to build-tools.

0: https://cabal.readthedocs.io/en/3.4/cabal-package.html#pkg-field-build-tools
1: https://cabal.readthedocs.io/en/3.4/cabal-package.html#pkg-field-build-tool-depends
2: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/import/cabal.scm
3: https://hackage.haskell.org/package/language-c-quote
[language-c-quote.scm (text/x-scheme, attachment)]
[language-c-quote-fixed.scm (text/x-scheme, attachment)]

This bug report was last modified 2 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.