Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 956470 - dev-lang/clojure-1.12.0 doesn't install the clj command
Summary: dev-lang/clojure-1.12.0 doesn't install the clj command
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Maciej Barć
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-23 00:54 UTC by ignamartinoli
Modified: 2025-05-26 00:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ignamartinoli 2025-05-23 00:54:59 UTC
Installing the dev-lang/clojure package doesn't install the `clj` command (different from the `clojure` command)
Comment 1 Maciej Barć gentoo-dev 2025-05-23 07:40:27 UTC
This is quite difficult in a Clojure from-source build. I've investigated a little but this subject (and of packaging up `tools-dep`) and sadly this is currently not possible. 
This is due to 2 things: 
1st - many external dependencies of additional clojure tools, 
2nd - nontrivial build scripts and how the repo that builds clj is split from the repo we use to build clojure.

You have correctly noticed that most Linux distros provide clj from upstream as a binary package (`Component: Binary packages → Current packages`), but we do not.

At the time clojure was packaged up this was a good choice since we had leiningen for building clojure projects. 
But now the upstream also produced a tool for building clj projects hence this mess. 
As a alternative for project management you can still use lein tho.

If You have any idea how to switch up our ebuild to support `clj`/`tools-deps`, or how to emulate them (upstream's binary pkg) correctly - then patches welcome!
Comment 2 ignamartinoli 2025-05-23 21:15:48 UTC
Thanks Maciej for the explanation.

I was looking at the official installation script (https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh). If I were to convert it into an Ebuild, would this be a dev-lang/clojure-bin installation?

Because going with a binary installation could be a solution (just like with the dev-lang/scala-bin package).
Comment 3 Maciej Barć gentoo-dev 2025-05-23 21:18:09 UTC
> If I were to convert it into an Ebuild, would this be a dev-lang/clojure-bin installation?

yes

> Because going with a binary installation could be a solution (just like with the dev-lang/scala-bin package).

It can. If you look into Gentoo overlays you might even find that somebody might have already made such -bin pkg.
Comment 4 ignamartinoli 2025-05-26 00:51:59 UTC
Hey Maciej. Following your advice, I searched and couldn't find a clojure-bin ebuild in Zugaina; so I did it myself.

It's working (even tho it may need a little bit of polish).
I would like to share it with the community, so that anybody can use it.
Should I open a PR on the main Gentoo repository or GURU?