Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot install xmake on NixOS #1781

Closed
dannypsnl opened this issue Oct 28, 2021 · 6 comments
Closed

cannot install xmake on NixOS #1781

dannypsnl opened this issue Oct 28, 2021 · 6 comments
Milestone

Comments

@dannypsnl
Copy link

Is your feature request related to a problem? Please describe.

install script cannot work on NixOS.

Describe the solution you'd like

xmake works with nix-env to get dependencies or don't require package manager when dependencies existed.

Describe alternatives you've considered

Try to add xmake into nixpkgs.

@waruqi
Copy link
Member

waruqi commented Oct 28, 2021

I don't have a nixos environment to test it now. But you can build source code to install firstly.

https://xmake.io/#/guide/installation?id=source-compilation-and-installation

@dannypsnl
Copy link
Author

I will fail at ./script/get.sh part

➜  xmake git:(master) ./scripts/get.sh __local__ __install_only__
Branch: __local__
xmake, A cross-platform build utility based on Lua.   
Copyright (C) 2015-present Ruki Wang, tboox.org, xmake.io
                         _                            
    __  ___ __  __  __ _| | ______                    
    \ \/ / |  \/  |/ _  | |/ / __ \                   
     >  <  | \__/ | /_| |   <  ___/                   
    /_/\_\_|_|  |_|\__ \|_|\_\____|                   
                         by ruki, xmake.io            
                                                      
   👉  Manual: https://xmake.io/#/getting_started     
   🙏  Donate: https://xmake.io/#/sponsor             
                                                      
Dependencies Installation Fail
The getter currently only support these package managers
        * apt
        * yum
        * zypper
        * pacman
        * portage
        * xbps
 Please install following dependencies manually:
        * git
        * build essential like `make`, `gcc`, etc
        * libreadline-dev (readline-devel)
        * ccache (optional)

@waruqi
Copy link
Member

waruqi commented Oct 28, 2021

missing nixpkg here

xmake/scripts/get.sh

Lines 150 to 162 in 5dfb6ef

install_tools()
{
{ apt --version >/dev/null 2>&1 && $sudoprefix apt install -y git build-essential libreadline-dev ccache; } ||
{ yum --version >/dev/null 2>&1 && $sudoprefix yum install -y git readline-devel ccache && $sudoprefix yum groupinstall -y 'Development Tools'; } ||
{ zypper --version >/dev/null 2>&1 && $sudoprefix zypper --non-interactive install git readline-devel ccache && $sudoprefix zypper --non-interactive install -t pattern devel_C_C++; } ||
{ pacman -V >/dev/null 2>&1 && $sudoprefix pacman -S --noconfirm --needed git base-devel ccache; } ||
{ emerge -V >/dev/null 2>&1 && $sudoprefix emerge -atv dev-vcs/git ccache; } ||
{ pkg list-installed >/dev/null 2>&1 && $sudoprefix pkg install -y git getconf build-essential readline ccache; } || # termux
{ pkg help >/dev/null 2>&1 && $sudoprefix pkg install -y git readline ccache ncurses; } || # freebsd
{ apk --version >/dev/null 2>&1 && $sudoprefix apk add git gcc g++ make readline-dev ncurses-dev libc-dev linux-headers; } ||
{ xbps-install --version >/dev/null 2>&1 && $sudoprefix xbps-install -Sy git base-devel ccache; } #void
}

you can open a pr to add it.

@dannypsnl
Copy link
Author

I found even I install readline by nix-env -i readline, the test_tools() still cannot pass. I guess this is the reason, and I think xmake cannot do much on this.

@waruqi
Copy link
Member

waruqi commented Oct 29, 2021

I have improved get.sh to support nixos on dev branch

@dannypsnl
Copy link
Author

New get.sh works. Thanks!

@waruqi waruqi added this to the v2.5.9 milestone Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants