Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Can an ebuild build a haskell package with stack?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Fri Oct 19, 2018 12:27 am    Post subject: [SOLVED] Can an ebuild build a haskell package with stack? Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Fri Oct 19, 2018 2:07 am    Post subject: Reply with quote

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
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Fri Oct 19, 2018 7:02 am    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Fri Oct 19, 2018 11:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Sat Oct 20, 2018 1:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Sat Oct 20, 2018 3:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 558

PostPosted: Sun Oct 21, 2018 10:02 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum