bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#49320: guix import hackage does not support build-tools and build-to


From: Philip Munksgaard
Subject: bug#49320: guix import hackage does not support build-tools and build-tool-depends stanzas
Date: Thu, 01 Jul 2021 20:26:17 +0200
User-agent: Cyrus-JMAP/3.5.0-alpha0-530-gd0c265785f-fm-20210616.002-gd0c26578

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

Attachment: language-c-quote.scm
Description: Text Data

Attachment: language-c-quote-fixed.scm
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]