Skip to content

initial install on darwin ends with errors relating to unknown hostname option #375

Closed
@montchr

Description

@montchr

Expected Behavior

Running the initial install steps in the Quick Start guide on macOS 11.6 should not result in a series of errors.

Current Behavior

The install process looks like it's successful for the most part, but it ends with a series of errors:

...
created 129 symlinks in user environment
building '/nix/store/izybzyn94b2plalg380jzqq4nnqllsyl-nixos-entrypoint.drv'...
fatal: not a git repository (or any of the parent directories): .git
hostname: illegal option -- -
usage: hostname [-fs] [name-of-host]
/nix/store/83cv4fcjj56sch8z0njlrrf8wiv8kim2-devshell-dir/bin/bud: line 8:  -1: substring expression < 0
11.09s user 30.55s system 5% cpu 13:06.38s total

Steps to Reproduce

I ran the command from the quick start guide:

nix-shell https://github.com/divnix/devos/archive/master.tar.gz -A shell \
  --run "bud get master"

Your Environment

  • macOS 11.6 on MacBookPro16,2 (Intel)
  • nix-darwin (latest commit)

Probably relevant, I ran these commands in my shell. I'm guessing Darwin's hostname utility behaves differently than it would on NixOS or another Linux system.

❯ which hostname
/bin/hostname
❯ hostname --help
hostname: illegal option -- -
usage: hostname [-fs] [name-of-host]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions