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

Installing vagrant on darwin from HEAD fails with missing kernelArch #55751

Closed
cresh opened this issue Feb 14, 2019 · 4 comments
Closed

Installing vagrant on darwin from HEAD fails with missing kernelArch #55751

cresh opened this issue Feb 14, 2019 · 4 comments

Comments

@cresh
Copy link
Contributor

cresh commented Feb 14, 2019

Issue description

nix-env -f ~/nixpkgs/ -i vagrant --show-trace
installing 'vagrant-2.2.0'
error: while evaluating the attribute 'postInstall' of the derivation 'vagrant-2.2.0' at /Users/crestani/nixpkgs/pkgs/development/ruby-modules/gem/default.nix:94:3:
while evaluating 'makeSearchPath' at /Users/crestani/nixpkgs/lib/strings.nix:122:5, called from /Users/crestani/nixpkgs/pkgs/development/tools/vagrant/default.nix:56:23:
while evaluating anonymous function at /Users/crestani/nixpkgs/lib/strings.nix:123:77, called from undefined position:
while evaluating anonymous function at /Users/crestani/nixpkgs/pkgs/development/tools/vagrant/default.nix:57:15, called from undefined position:
while evaluating the attribute 'buildInputs' of the derivation 'libguestfs-1.38.6' at /Users/crestani/nixpkgs/pkgs/development/libraries/libguestfs/default.nix:13:3:
while evaluating the attribute 'buildInputs' of the derivation 'systemd-239.20190110' at /Users/crestani/nixpkgs/pkgs/os-specific/linux/systemd/default.nix:22:3:
while evaluating the attribute 'ARCH' of the derivation 'linux-headers-4.18.3' at /Users/crestani/nixpkgs/pkgs/os-specific/linux/kernel-headers/default.nix:8:5:
while evaluating the attribute 'hostPlatform.platform.kernelArch' at /Users/crestani/nixpkgs/lib/systems/default.nix:26:7:
missing kernelArch

Steps to reproduce

  • Bleeding-edge checkout of nix-pkgs in ~/nix-pkgs
  • nix-env -f ~/nixpkgs/ -i vagrant --show-trace

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

  • system: "x86_64-darwin"
  • host os: Darwin 18.2.0, macOS 10.14.2
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.1.3
  • channels(crestani): "nixpkgs-19.03pre153206.f753852e11d"
  • nixpkgs: /Users/crestani/.nix-defexpr/channels/nixpkgs
@matthewbauer
Copy link
Member

I think this should fix it:

diff --git a/pkgs/development/tools/vagrant/default.nix b/pkgs/development/tools/vagrant/default.nix
index b8ba30361aa..ace4904b663 100644
--- a/pkgs/development/tools/vagrant/default.nix
+++ b/pkgs/development/tools/vagrant/default.nix
@@ -1,4 +1,5 @@
-{ lib, fetchurl, buildRubyGem, bundlerEnv, ruby, libarchive, libguestfs, qemu, writeText, withLibvirt ? true}:
+{ stdenv, lib, fetchurl, buildRubyGem, bundlerEnv, ruby, libarchive
+, libguestfs, qemu, writeText, withLibvirt ? stdenv.isLinux }:
 
 let
   # NOTE: bumping the version and updating the hash is insufficient;

@cresh
Copy link
Contributor Author

cresh commented Feb 15, 2019

Yes, that works! Thank you!

@anmonteiro
Copy link
Member

I'm getting this too. Is this gonna be fixed in nixpkgs, or should I use a custom derivation in my config?

@matthewbauer
Copy link
Member

It should be on master now

matthewbauer added a commit that referenced this issue Feb 25, 2019
samueldr pushed a commit that referenced this issue May 3, 2019
Fixes #55751

(cherry picked from commit 55fc5b5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants