Adds KaOS support#5535
Conversation
ShalokShalom
left a comment
There was a problem hiding this comment.
I did a mistake and hardcoded that one, how can we detect the version of ghc-tinfo6 easily?
| printf "To be detectable by IDEs and other applications is it recommended to symlink \e[34mGHC\e[0m to the PATH.\nDo you like to do that?" | ||
| read -p " y or n: " yn | ||
| case $yn in | ||
| [Yy]*) sudo ln -s /home/$USER/.stack/programs/x86_64-linux/ghc-tinfo6-8.8.4/bin/ghc /usr/bin; break;; |
There was a problem hiding this comment.
This line can only work when we soft code the version
There was a problem hiding this comment.
I don't think install scripts should ever do this. /usr/bin is controlled by your distros package manager.
Also note that there is a sudocmd function:
stack/etc/scripts/get-stack.sh
Line 138 in 708b516
There was a problem hiding this comment.
So you suggest a different dir for the PATH?
And using sudocmd instead sudo?
There was a problem hiding this comment.
My opinion is to not do anything here. Global GHC installations is probably not in the scope the install script. IDEs like HLS work with stack just fine without exposing a global GHC.
There was a problem hiding this comment.
its exactly what this script does for Debian and Co, no?
There was a problem hiding this comment.
its exactly what this script does for Debian and Co, no?
I don't think so.
|
I would like to resolve this pull request, one way or another. I am a Windows user, so forgive me if I take things step-by-step and ask questions that may seem obvious to a Linux user. I understand that KaOS is a Linux distribution that is x86-64-specific, and Other parts of the script (for other Linux distribtions) have things like this: do_fedora_install() {
install_dependencies() {
dnf_install_pkgs perl make automake gcc gmp-devel libffi zlib-devel xz tar git gnupg
}
if is_x86_64 ; then
install_dependencies "$1"
print_bindist_notice
install_x86_64_linux_binary
else
die "Sorry, currently only 64-bit (x86_64) Linux binary is available."
fi
}
# Install packages using dnf
dnf_install_pkgs() {
if ! sudocmd "install required system dependencies" dnf install -y ${QUIET:+-q} "$@"; then
die "\nInstalling dnf packages failed. Please run 'dnf check-update' and try again."
fi
}Should KaOS/kcp follow the same 'pattern' for its Is I wondered why KaOS is introduced via The addition of a link in |
|
Wonderful 😄 Yes, you are basically correct about everything - the only thing I like to mention, is that libtinfo is build by the community and kcp is also a package manager for the community repo. I only asked, if said dependency is fine to be added, since some people are quite sensitive about that. I personally think its perfectly fine. 👍🏼 I love to introduce KaOS on the same level and with the same syntax as other distros, I think I was just to shy and hesitant to actually change something of the existing code. You are also right about hard coding a specific version. The only thing that is important to me, is to have an option to let the user choose to automatically add the compiler to the PATH. Preferably, by scanning the sub directories, or simply by choosing the most recent version. This way, people can just start coding. 🥳 |
See this: commercialhaskell#5452
This detects KaOS with lsb_release. HINT: While working on this, I realized, that there is no entry for Arch, despite being implemented otherwise. Does it work even? KaOS is the name that lsb_release gives me in the Konsole, I guess your Perl foo magic converts it in lowercase letters, like the other distro names?
|
@ShalokShalom, I rebased on the master branch. Some of my comments above were not apt - I was mislead by the way that the GitHub UI presented the changes in the file. I now understand that lines 425-427 are not part of I have:
I am not in a position to test what I have done. Does the revised script actually work? |
|
Sorry, I am not on KaOS anymore. |
|
I asked for testers on the Haskell Community but had no response. I am going to close this pull request. It can be reopened if another KaOS user and Haskeller emerges. |
|
I just have no time at the moment. I tried to install KaOS in Virtualbox, but failed. Will try if I find the time |
See this: #5452
Is this something I am supposed to mention in the change.log?
Then I do it