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

error building homepage on macos #515

Open
bxrt opened this issue Sep 4, 2020 · 5 comments
Open

error building homepage on macos #515

bxrt opened this issue Sep 4, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@bxrt
Copy link

bxrt commented Sep 4, 2020

Following the instructions on https://github.com/NixOS/nixos-homepage to build the homepage as a novice Nix user I get the following error:

$ git clone https://github.com/bxrt/nixos-homepage.git
Cloning into 'nixos-homepage'...
remote: Enumerating objects: 425, done.
remote: Counting objects: 100% (425/425), done.
remote: Compressing objects: 100% (247/247), done.
remote: Total 5450 (delta 242), reused 340 (delta 176), pack-reused 5025
Receiving objects: 100% (5450/5450), 17.09 MiB | 8.01 MiB/s, done.
Resolving deltas: 100% (3329/3329), done.
$ cd nixos-homepage/
$ nix-shell
unpacking 'https://github.com/edolstra/flake-compat/archive/master.tar.gz'...
error: nix-shell requires a single derivation
Try 'nix-shell --help' for more information.

This is on macOS.

@garbas garbas added the bug Something isn't working label Sep 4, 2020
@davidak
Copy link
Member

davidak commented Sep 20, 2020

It works on NixOS 20.03.2868.ff6a070b4ef with Nix 2.3.6.
@bxrt which Nix version do you use and which channel?

@garbas
Copy link
Member

garbas commented Sep 21, 2020

@davidak @bxrt this is a macos specific problem.

Our current build system is quite complex since it even requires - sometimes - building Nix. There are few toolchains that are currently used to pull all of the different manuals in. We intentionally didn't put any effort into fixing this situation, not until the format and the tooling is decided for Nix/Nixpkgs/NixOS (in RFC #72).

Once format and tooling is decided for documentation we will try to use it also for the website, just to keep things simple. Of-course if we will see that using those tools requires too much hacking around then we would look for something else.

I would only tackle building on macos once we switch to new tooling, which would hopefully be easier to do. I hope you understand this, limited time and getting page in the best shape possible is a priority. But I would happily look at any PR if you decide to tackle this problem.

@bxrt In the meantime either use some linux builder via docker or even give nixbuild.net a try. In the worse case you can submit the PR and see if it builds.

@raboof
Copy link
Member

raboof commented Sep 24, 2020

maybe we should document how to build the docs in a docker container on macos? or wouldn't that work either for some reason?

@garbas garbas changed the title error building homepage error building homepage on macos Sep 24, 2020
@bxrt
Copy link
Author

bxrt commented Sep 25, 2020

I had success building the docs in a docker on macOS. Prerequisite: Docker Desktop for Mac.
In the terminal:
docker run -p 8000:8000 -it --name nixos-homepage nixos/nix

Still in the terminal, but on the prompt of the running container:

# nix-shell -p git
[nix-shell]$ git clone https://github.com/NixOS/nixos-homepage.git
[nix-shell]$ cd nixos-homepage
[nix-shell]$ nix-shell
[nix-shell]$ make
[nix-shell]$ python -m http.server --bind 0.0.0.0

Then browse to http://localhost:8000/ in the browser (Safari or Chrome) on MacOS.

(@garbas, I can see why you would want to simplify the toolchain, building included building cargo (The Rust package manager) and the go compiler.)

@garbas
Copy link
Member

garbas commented Sep 25, 2020

@bxrt could you add this to the README as an option when you are running on macos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants