I tried on 28.10.2014 to build git-annex from source (nix-env --option use-binary-caches false -i git-annex) on Mac OS X 10.9 in a fresh nix store. It fails with
lsof_4.87_src/lsof.8
lsof_4.87_src/lsof.man
patching sources
configuring
./Configure: line 39: which: command not found
Unknown Darwin release: 13.3.0
Assuming Darwin 11.0
FATAL: can't find libproc.h
builder for `/nix/store/jfkx0f8gxc72z8hxwnzbnd4qfydn4nyr-lsof-4.87.drv' failed with exit code 1
cannot build derivation `/nix/store/izb60y2ak445zfkxikn8kbdb5izr0z68-git-annex-5.20141013.drv': 1 dependencies couldn't be built
lsof builds for me on master, do you have either full XCode or the XCode command-line tools installed?
Thanks for the tip, I will check if this was the reason. But where in the documentation it says that Xcode is a dependency to use nix on Mac OS X? I found not a single sentence on https://nixos.org/nix/about.html, nor https://nixos.org/nix/download.html, nor https://nixos.org/nix/manual/#chap-quick-start that this might be the case. It is kind of ironic that a dependency manager fails to specify its dependencies :-)
still a problem?
Still a problem in OSX 10.10.5 (Yosemite). And lsof is not in the binary cache, so my system tries to build it and fails.
On my fresh nix installation on Mac OS 10.11, "nix-env -i lsof" still fails (see output.txt). By now, I assume the pure stdenv is used, so XCode shouldn't make a difference anymore.
git-annex seems to be no more available, but this is another issue.
I have Xcode installed and it still doesn't work for me.
lsof-4.89 is in the binary cache. I think this can be closed.
nix-shell --pure -p lsof --run lsof runs fine. This should be closed.
Close it.
I can confirm that lsof works now, so this can be closed. Thanks for your efforts.
(However, the sad part...my primary goal to install git-annex now fails because derivation is no more available, at least for Mac, it seems...)
I've got git-annex here, as nixpkgs.gitAndTools.git-annex.
"x86_64-darwin"Darwin 16.7.0, macOS 10.12.6yesnonix-env (Nix) 1.11.16"nixpkgs-18.03pre126020.931a0b8be80"Yeah I managed to build it too when removing the platform restriction. I have contacted the maintainer. Is no problem anymore, thanks!