View previous topic :: View next topic |
Author |
Message |
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Fri Oct 19, 2018 12:27 am Post subject: [SOLVED] Can an ebuild build a haskell package with stack? |
|
|
By stack, I mean https://www.haskellstack.org/
Currently, haskell packages in gentoo overlay use cabal.
If an ebuild used stack, it wouldn't need to depend on other haskell packages on gentoo overlay.
Last edited by crocket on Sun Oct 21, 2018 10:37 am; edited 2 times in total |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21490
|
Posted: Fri Oct 19, 2018 2:07 am Post subject: |
|
|
Gentoo ebuilds are augmented bash, so if you can build it from the command line and the build system is not crazy or stupid, then yes, you can use an ebuild to do it. From looking at the linked page, that build system is both crazy and stupid, so you may have some extra work to do. Anything that starts with curl -sSL http://example.com/ | sh is always crazy.
Correct ebuilds always run without a network connection when evaluating the upstream code, so you may need to package and install prerequisites that upstream would otherwise "helpfully" download as part of their build. (Depending on local user configuration, Portage may not enforce the no-networking rule, but QA will rightly complain if the ebuild requires network access.) |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Fri Oct 19, 2018 7:02 am Post subject: |
|
|
Why do you think there are not many haskell packages on gentoo overlay?
Packages on haskell overlay often prevent gentoo upgrades because repoman doesn't check upper bounds of dependencies. There's no stabilization process on haskell overlay, either.
I want to install hledger and hledger-ui from gentoo overlay, but it is not available there.
I thought stack was going to make ebuild packaging easier because it allows you to create a haskell package without creating packages for dependencies. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21490
|
Posted: Fri Oct 19, 2018 11:48 pm Post subject: |
|
|
Probably because the maintainers only evaluate whether to add a package when the package is requested, and no one has called for them.
Repoman shouldn't be checking upper bounds, because you generally shouldn't need them. That's only required if the supporting packages routinely break backward compatibility.
How would you be able to install something without first installing its dependencies? |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Oct 20, 2018 1:31 pm Post subject: |
|
|
Hu wrote: | How would you be able to install something without first installing its dependencies? |
Stack fetches dependencies and builds them all. It is a self-contained build system.
I use stack as a haskell package manager on my system. I use stack to upgrade hledger and hledger-ui. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21490
|
Posted: Sat Oct 20, 2018 3:56 pm Post subject: |
|
|
That should be fine if it writes them only to an area outside where Portage maintains files. If it tries to use the same area that Portage uses, that could make a mess. Generally, you don't want two non-communicating package managers to compete over any given package or the dependencies of that package. |
|
Back to top |
|
|
crocket Guru
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sun Oct 21, 2018 10:02 am Post subject: |
|
|
I think https://bugs.gentoo.org/664836 solves my issue with hledger and hledger-ui.
From now on, I will just request porting haskell overlay packages to gentoo overlay. |
|
Back to top |
|
|
|