forked from mirrors/nixpkgs
Merge pull request #30952 from aneeshusa/build-vagrant-from-source
Build vagrant from source
This commit is contained in:
commit
c5c8f17422
|
@ -65,6 +65,8 @@ let
|
|||
inherit (attrs.source) url rev sha256 fetchSubmodules;
|
||||
leaveDotGit = true;
|
||||
}
|
||||
else if type == "url" then
|
||||
fetchurl attrs.source
|
||||
else
|
||||
throw "buildRubyGem: don't know how to build a gem of type \"${type}\""
|
||||
);
|
||||
|
@ -84,7 +86,8 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {
|
|||
|
||||
buildInputs = [
|
||||
ruby makeWrapper
|
||||
] ++ lib.optionals (type == "git") [ git bundler ]
|
||||
] ++ lib.optionals (type == "git") [ git ]
|
||||
++ lib.optionals (type != "gem") [ bundler ]
|
||||
++ lib.optional stdenv.isDarwin darwin.libobjc
|
||||
++ buildInputs;
|
||||
|
||||
|
@ -159,14 +162,22 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {
|
|||
|
||||
echo "buildFlags: $buildFlags"
|
||||
|
||||
${lib.optionalString (type == "url") ''
|
||||
ruby ${./nix-bundle-install.rb} \
|
||||
"path" \
|
||||
'${gemName}' \
|
||||
'${version}' \
|
||||
'${lib.escapeShellArgs buildFlags}'
|
||||
''}
|
||||
${lib.optionalString (type == "git") ''
|
||||
ruby ${./nix-bundle-install.rb} \
|
||||
${gemName} \
|
||||
${attrs.source.url} \
|
||||
${src} \
|
||||
${attrs.source.rev} \
|
||||
${version} \
|
||||
${lib.escapeShellArgs buildFlags}
|
||||
"git" \
|
||||
'${gemName}' \
|
||||
'${version}' \
|
||||
'${lib.escapeShellArgs buildFlags}' \
|
||||
'${attrs.source.url}' \
|
||||
'${src}' \
|
||||
'${attrs.source.rev}'
|
||||
''}
|
||||
|
||||
${lib.optionalString (type == "gem") ''
|
||||
|
|
|
@ -13,31 +13,46 @@ end
|
|||
|
||||
# Options:
|
||||
#
|
||||
# type - installation type, either "git" or "path"
|
||||
# name - the gem name
|
||||
# version - gem version
|
||||
# build-flags - build arguments
|
||||
#
|
||||
# Git-only options:
|
||||
#
|
||||
# uri - git repo uri
|
||||
# repo - path to local checkout
|
||||
# ref - the commit hash
|
||||
# version - gem version
|
||||
# build-flags - build arguments
|
||||
|
||||
ruby = File.join(ENV["ruby"], "bin", RbConfig::CONFIG['ruby_install_name'])
|
||||
out = ENV["out"]
|
||||
bin_dir = File.join(ENV["out"], "bin")
|
||||
|
||||
name = ARGV[0]
|
||||
uri = ARGV[1]
|
||||
REPO = ARGV[2]
|
||||
ref = ARGV[3]
|
||||
version = ARGV[4]
|
||||
build_flags = ARGV[5]
|
||||
type = ARGV[0]
|
||||
name = ARGV[1]
|
||||
version = ARGV[2]
|
||||
build_flags = ARGV[3]
|
||||
if type == "git"
|
||||
uri = ARGV[4]
|
||||
REPO = ARGV[5]
|
||||
ref = ARGV[6]
|
||||
end
|
||||
|
||||
# options to pass to bundler
|
||||
options = {
|
||||
"name" => name,
|
||||
"uri" => uri,
|
||||
"ref" => ref,
|
||||
"name" => name,
|
||||
"version" => version,
|
||||
}
|
||||
if type == "path"
|
||||
options.merge!({
|
||||
"path" => Dir.pwd,
|
||||
})
|
||||
elsif type == "git"
|
||||
options.merge!({
|
||||
"uri" => uri,
|
||||
"ref" => ref,
|
||||
})
|
||||
end
|
||||
|
||||
# Monkey-patch Bundler to use our local checkout.
|
||||
# I wish we didn't have to do this, but bundler does not expose an API to do
|
||||
|
@ -63,26 +78,28 @@ Bundler.module_eval do
|
|||
end
|
||||
end
|
||||
|
||||
Bundler::Source::Git.class_eval do
|
||||
def allow_git_ops?
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
Bundler::Source::Git::GitProxy.class_eval do
|
||||
def checkout
|
||||
unless path.exist?
|
||||
FileUtils.mkdir_p(path.dirname)
|
||||
FileUtils.cp_r(File.join(REPO, ".git"), path)
|
||||
system("chmod -R +w #{path}")
|
||||
if type == "git"
|
||||
Bundler::Source::Git.class_eval do
|
||||
def allow_git_ops?
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
def copy_to(destination, submodules=false)
|
||||
unless File.exist?(destination.join(".git"))
|
||||
FileUtils.mkdir_p(destination.dirname)
|
||||
FileUtils.cp_r(REPO, destination)
|
||||
system("chmod -R +w #{destination}")
|
||||
Bundler::Source::Git::GitProxy.class_eval do
|
||||
def checkout
|
||||
unless path.exist?
|
||||
FileUtils.mkdir_p(path.dirname)
|
||||
FileUtils.cp_r(File.join(REPO, ".git"), path)
|
||||
system("chmod -R +w #{path}")
|
||||
end
|
||||
end
|
||||
|
||||
def copy_to(destination, submodules=false)
|
||||
unless File.exist?(destination.join(".git"))
|
||||
FileUtils.mkdir_p(destination.dirname)
|
||||
FileUtils.cp_r(REPO, destination)
|
||||
system("chmod -R +w #{destination}")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -94,7 +111,11 @@ Bundler.ui = Bundler::UI::Shell.new({"no-color" => no_color})
|
|||
Bundler.ui.level = "debug" if verbose
|
||||
|
||||
# Install
|
||||
source = Bundler::Source::Git.new(options)
|
||||
if type == "git"
|
||||
source = Bundler::Source::Git.new(options)
|
||||
else
|
||||
source = Bundler::Source::Path.new(options)
|
||||
end
|
||||
spec = source.specs.search_all(name).first
|
||||
Bundler.rubygems.with_build_args [build_flags] do
|
||||
source.install(spec)
|
||||
|
@ -139,8 +160,10 @@ FileUtils.ln_s(spec.loaded_from.to_s, "#{meta}/spec")
|
|||
File.open("#{meta}/name", "w") do |f|
|
||||
f.write spec.name
|
||||
end
|
||||
File.open("#{meta}/install-path", "w") do |f|
|
||||
f.write source.install_path.to_s
|
||||
if type == "git"
|
||||
File.open("#{meta}/install-path", "w") do |f|
|
||||
f.write source.install_path.to_s
|
||||
end
|
||||
end
|
||||
File.open("#{meta}/require-paths", "w") do |f|
|
||||
f.write spec.require_paths.join(" ")
|
||||
|
@ -150,8 +173,10 @@ File.open("#{meta}/executables", "w") do |f|
|
|||
end
|
||||
|
||||
# make the lib available during bundler/git installs
|
||||
File.open("#{out}/nix-support/setup-hook", "a") do |f|
|
||||
spec.require_paths.each do |dir|
|
||||
f.puts("addToSearchPath RUBYLIB #{source.install_path}/#{dir}")
|
||||
if type == "git"
|
||||
File.open("#{out}/nix-support/setup-hook", "a") do |f|
|
||||
spec.require_paths.each do |dir|
|
||||
f.puts("addToSearchPath RUBYLIB #{source.install_path}/#{dir}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
2
pkgs/development/tools/vagrant/Gemfile
Normal file
2
pkgs/development/tools/vagrant/Gemfile
Normal file
|
@ -0,0 +1,2 @@
|
|||
source "https://rubygems.org"
|
||||
gem 'vagrant'
|
149
pkgs/development/tools/vagrant/Gemfile.lock
Normal file
149
pkgs/development/tools/vagrant/Gemfile.lock
Normal file
|
@ -0,0 +1,149 @@
|
|||
GIT
|
||||
remote: https://github.com/mitchellh/vagrant-spec.git
|
||||
revision: 7ac8b4191de578e345b29acaf62ecc72c8e73be1
|
||||
specs:
|
||||
vagrant-spec (0.0.1)
|
||||
childprocess (~> 0.6.0)
|
||||
log4r (~> 1.1.9)
|
||||
rspec (~> 3.5.0)
|
||||
thor (~> 0.18.1)
|
||||
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
vagrant (2.0.1)
|
||||
childprocess (~> 0.6.0)
|
||||
erubis (~> 2.7.0)
|
||||
hashicorp-checkpoint (~> 0.1.1)
|
||||
i18n (>= 0.6.0, <= 0.8.0)
|
||||
listen (~> 3.1.5)
|
||||
log4r (~> 1.1.9, < 1.1.11)
|
||||
net-scp (~> 1.2.0)
|
||||
net-sftp (~> 2.1)
|
||||
net-ssh (~> 4.1.0)
|
||||
rb-kqueue (~> 0.2.0)
|
||||
rest-client (>= 1.6.0, < 3.0)
|
||||
ruby_dep (<= 1.3.1)
|
||||
wdm (~> 0.1.0)
|
||||
winrm (~> 2.1)
|
||||
winrm-elevated (~> 1.1)
|
||||
winrm-fs (~> 1.0)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
builder (3.2.3)
|
||||
childprocess (0.6.3)
|
||||
ffi (~> 1.0, >= 1.0.11)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
diff-lcs (1.3)
|
||||
domain_name (0.5.20170404)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
erubis (2.7.0)
|
||||
fake_ftp (0.1.1)
|
||||
ffi (1.9.18)
|
||||
gssapi (1.2.0)
|
||||
ffi (>= 1.0.1)
|
||||
gyoku (1.3.1)
|
||||
builder (>= 2.1.2)
|
||||
hashdiff (0.3.7)
|
||||
hashicorp-checkpoint (0.1.4)
|
||||
http-cookie (1.0.3)
|
||||
domain_name (~> 0.5)
|
||||
httpclient (2.8.3)
|
||||
i18n (0.8.0)
|
||||
listen (3.1.5)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
ruby_dep (~> 1.2)
|
||||
little-plugger (1.1.4)
|
||||
log4r (1.1.10)
|
||||
logging (2.2.2)
|
||||
little-plugger (~> 1.1)
|
||||
multi_json (~> 1.10)
|
||||
mime-types (3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2016.0521)
|
||||
multi_json (1.12.2)
|
||||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-sftp (2.1.2)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (4.1.0)
|
||||
netrc (0.11.0)
|
||||
nori (2.6.0)
|
||||
public_suffix (3.0.1)
|
||||
rake (12.0.0)
|
||||
rb-fsevent (0.10.2)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
rb-kqueue (0.2.5)
|
||||
ffi (>= 0.5.0)
|
||||
rest-client (2.0.2)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 4.0)
|
||||
netrc (~> 0.8)
|
||||
rspec (3.5.0)
|
||||
rspec-core (~> 3.5.0)
|
||||
rspec-expectations (~> 3.5.0)
|
||||
rspec-mocks (~> 3.5.0)
|
||||
rspec-core (3.5.4)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-expectations (3.5.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-its (1.2.0)
|
||||
rspec-core (>= 3.0.0)
|
||||
rspec-expectations (>= 3.0.0)
|
||||
rspec-mocks (3.5.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-support (3.5.0)
|
||||
ruby_dep (1.3.1)
|
||||
rubyntlm (0.6.2)
|
||||
rubyzip (1.2.1)
|
||||
safe_yaml (1.0.4)
|
||||
thor (0.18.1)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.4)
|
||||
wdm (0.1.1)
|
||||
webmock (2.3.2)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff
|
||||
winrm (2.2.3)
|
||||
builder (>= 2.1.2)
|
||||
erubis (~> 2.7)
|
||||
gssapi (~> 1.2)
|
||||
gyoku (~> 1.0)
|
||||
httpclient (~> 2.2, >= 2.2.0.2)
|
||||
logging (>= 1.6.1, < 3.0)
|
||||
nori (~> 2.0)
|
||||
rubyntlm (~> 0.6.0, >= 0.6.1)
|
||||
winrm-elevated (1.1.0)
|
||||
winrm (~> 2.0)
|
||||
winrm-fs (~> 1.0)
|
||||
winrm-fs (1.1.1)
|
||||
erubis (~> 2.7)
|
||||
logging (>= 1.6.1, < 3.0)
|
||||
rubyzip (~> 1.1)
|
||||
winrm (~> 2.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
fake_ftp (~> 0.1.1)
|
||||
rake (~> 12.0.0)
|
||||
rspec (~> 3.5.0)
|
||||
rspec-its (~> 1.2.0)
|
||||
vagrant!
|
||||
vagrant-spec!
|
||||
webmock (~> 2.3.1)
|
||||
|
||||
BUNDLED WITH
|
||||
1.14.6
|
|
@ -1,141 +1,55 @@
|
|||
{ stdenv, fetchurl, fetchpatch, dpkg, curl, libarchive, openssl, rake, ruby, buildRubyGem, libiconv
|
||||
, libxml2, libxslt, libffi, makeWrapper, p7zip, xar, gzip, cpio }:
|
||||
{ lib, fetchurl, buildRubyGem, bundlerEnv, ruby }:
|
||||
|
||||
let
|
||||
version = "2.0.1";
|
||||
url = "https://github.com/hashicorp/vagrant/archive/v${version}.tar.gz";
|
||||
sha256 = "1fjfl00n4rsq6khypm56g0vq6l153q128r35zky2ba30bz292ar1";
|
||||
|
||||
url = if stdenv.isLinux
|
||||
then "https://releases.hashicorp.com/vagrant/${version}/vagrant_${version}_${arch}.deb"
|
||||
else if stdenv.isDarwin
|
||||
then "https://releases.hashicorp.com/vagrant/${version}/vagrant_${version}_${arch}.dmg"
|
||||
else "system ${stdenv.system} not supported";
|
||||
deps = bundlerEnv rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "vagrant";
|
||||
inherit version;
|
||||
|
||||
sha256 = {
|
||||
"x86_64-linux" = "0kyqchjsy747vbvhqiynz81kik8g0xqpkv70rz7hyr9x7fl9i51g";
|
||||
"i686-linux" = "0p3xhxy6shkd0393wjyj8qycdn3zqv60vnyz1b6zclz0kfah07zs";
|
||||
"x86_64-darwin" = "01hr5j9k31hsdlcwv3srzk0lphd8w0n9z95jvfkschdyjm9clpwm";
|
||||
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
|
||||
inherit ruby;
|
||||
gemdir = ./.;
|
||||
gemset = lib.recursiveUpdate (import ./gemset.nix) {
|
||||
vagrant = {
|
||||
source = {
|
||||
type = "url";
|
||||
inherit url sha256;
|
||||
};
|
||||
inherit version;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
arch = builtins.replaceStrings ["-linux" "-darwin"] ["" ""] stdenv.system;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "vagrant-${version}";
|
||||
in buildRubyGem rec {
|
||||
name = "${gemName}-${version}";
|
||||
gemName = "vagrant";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
inherit url sha256;
|
||||
doCheck = true;
|
||||
dontBuild = false;
|
||||
src = fetchurl { inherit url sha256; };
|
||||
|
||||
patches = [
|
||||
./unofficial-installation-nowarn.patch
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram "$out/bin/vagrant" \
|
||||
--set GEM_PATH "${deps}/lib/ruby/gems/${ruby.version.libDir}"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit ruby deps;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A tool for building complete development environments";
|
||||
homepage = http://vagrantup.com;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ lovek323 globin jgeerds kamilchm ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
homepage = https://www.vagrantup.com/;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ aneeshusa ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin [ p7zip xar gzip cpio ];
|
||||
|
||||
unpackPhase = if stdenv.isLinux
|
||||
then ''
|
||||
${dpkg}/bin/dpkg-deb -x "$src" .
|
||||
''
|
||||
else ''
|
||||
7z x $src
|
||||
cd Vagrant/
|
||||
xar -xf Vagrant.pkg
|
||||
cd core.pkg/
|
||||
cat Payload | gzip -d - | cpio -id
|
||||
|
||||
# move unpacked directories to match unpacked .deb from linux,
|
||||
# so installPhase can be shared
|
||||
mkdir -p opt/vagrant/ usr/
|
||||
mv embedded opt/vagrant/embedded
|
||||
mv bin usr/bin
|
||||
'';
|
||||
|
||||
buildPhase = "";
|
||||
|
||||
installPhase = ''
|
||||
sed -i "s|/opt|$out/opt|" usr/bin/vagrant
|
||||
|
||||
# overwrite embedded binaries
|
||||
|
||||
# curl: curl, curl-config
|
||||
rm opt/vagrant/embedded/bin/{curl,curl-config}
|
||||
ln -s ${curl.bin}/bin/curl opt/vagrant/embedded/bin
|
||||
ln -s ${curl.dev}/bin/curl-config opt/vagrant/embedded/bin
|
||||
|
||||
# libarchive: bsdtar, bsdcpio
|
||||
rm opt/vagrant/embedded/lib/libarchive*
|
||||
ln -s ${libarchive}/lib/libarchive.so opt/vagrant/embedded/lib/libarchive.so
|
||||
rm opt/vagrant/embedded/bin/{bsdtar,bsdcpio}
|
||||
ln -s ${libarchive}/bin/bsdtar opt/vagrant/embedded/bin
|
||||
ln -s ${libarchive}/bin/bsdcpio opt/vagrant/embedded/bin
|
||||
|
||||
# openssl: c_rehash, openssl
|
||||
rm opt/vagrant/embedded/bin/{c_rehash,openssl}
|
||||
ln -s ${openssl.bin}/bin/c_rehash opt/vagrant/embedded/bin
|
||||
ln -s ${openssl.bin}/bin/openssl opt/vagrant/embedded/bin
|
||||
|
||||
# libiconv: iconv
|
||||
rm opt/vagrant/embedded/bin/iconv
|
||||
ln -s ${libiconv}/bin/iconv opt/vagrant/embedded/bin
|
||||
|
||||
# libxml: xml2-config, xmlcatalog, xmllint
|
||||
rm opt/vagrant/embedded/bin/{xml2-config,xmlcatalog,xmllint}
|
||||
ln -s ${libxml2.dev}/bin/xml2-config opt/vagrant/embedded/bin
|
||||
ln -s ${libxml2.bin}/bin/xmlcatalog opt/vagrant/embedded/bin
|
||||
ln -s ${libxml2.bin}/bin/xmllint opt/vagrant/embedded/bin
|
||||
|
||||
# libxslt: xslt-config, xsltproc
|
||||
rm opt/vagrant/embedded/bin/{xslt-config,xsltproc}
|
||||
ln -s ${libxslt.dev}/bin/xslt-config opt/vagrant/embedded/bin
|
||||
ln -s ${libxslt.bin}/bin/xsltproc opt/vagrant/embedded/bin
|
||||
|
||||
'' + (stdenv.lib.optionalString (! stdenv.isDarwin) ''
|
||||
# ruby: erb, gem, irb, rake, rdoc, ri, ruby
|
||||
rm opt/vagrant/embedded/bin/{erb,gem,irb,rake,rdoc,ri,ruby}
|
||||
ln -s ${ruby}/bin/erb opt/vagrant/embedded/bin
|
||||
ln -s ${ruby}/bin/gem opt/vagrant/embedded/bin
|
||||
ln -s ${ruby}/bin/irb opt/vagrant/embedded/bin
|
||||
ln -s ${rake}/bin/rake opt/vagrant/embedded/bin
|
||||
ln -s ${ruby}/bin/rdoc opt/vagrant/embedded/bin
|
||||
ln -s ${ruby}/bin/ri opt/vagrant/embedded/bin
|
||||
ln -s ${ruby}/bin/ruby opt/vagrant/embedded/bin
|
||||
|
||||
# ruby libs
|
||||
rm -rf opt/vagrant/embedded/lib/*
|
||||
for lib in ${ruby}/lib/*; do
|
||||
ln -s $lib opt/vagrant/embedded/lib/''${lib##*/}
|
||||
done
|
||||
|
||||
# libffi
|
||||
ln -s ${libffi}/lib/libffi.so.6 opt/vagrant/embedded/lib/libffi.so.6
|
||||
|
||||
'') + ''
|
||||
mkdir -p "$out"
|
||||
cp -r opt "$out"
|
||||
cp -r usr/bin "$out"
|
||||
wrapProgram "$out/bin/vagrant" --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ libxml2 libxslt ]}" \
|
||||
--prefix LD_LIBRARY_PATH : "$out/opt/vagrant/embedded/lib"
|
||||
|
||||
install -D "opt/vagrant/embedded/gems/gems/vagrant-$version/contrib/bash/completion.sh" \
|
||||
"$out/share/bash-completion/completions/vagrant"
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
# 'hide' the template file from shebang-patching
|
||||
chmod -x "$out/opt/vagrant/embedded/gems/gems/vagrant-$version/plugins/provisioners/salt/bootstrap-salt.sh"
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
chmod +x "$out/opt/vagrant/embedded/gems/gems/vagrant-$version/plugins/provisioners/salt/bootstrap-salt.sh"
|
||||
'' +
|
||||
(stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
# undo the directory movement done in unpackPhase
|
||||
mv $out/opt/vagrant/embedded $out/
|
||||
rm -r $out/opt
|
||||
'');
|
||||
}
|
||||
|
|
457
pkgs/development/tools/vagrant/gemset.nix
Normal file
457
pkgs/development/tools/vagrant/gemset.nix
Normal file
|
@ -0,0 +1,457 @@
|
|||
{
|
||||
addressable = {
|
||||
dependencies = ["public_suffix"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0viqszpkggqi8hq87pqp0xykhvz60g99nwmkwsb0v45kc2liwxvk";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.5.2";
|
||||
};
|
||||
builder = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.2.3";
|
||||
};
|
||||
childprocess = {
|
||||
dependencies = ["ffi"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1p3f43scdzx9zxmy2kw5zsc3az6v46nq4brwcxmnscjy4w4racbv";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.6.3";
|
||||
};
|
||||
crack = {
|
||||
dependencies = ["safe_yaml"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.4.3";
|
||||
};
|
||||
diff-lcs = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.3";
|
||||
};
|
||||
domain_name = {
|
||||
dependencies = ["unf"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "12hs8yijhak7p2hf1xkh98g0mnp5phq3mrrhywzaxpwz1gw5r3kf";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.5.20170404";
|
||||
};
|
||||
erubis = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.7.0";
|
||||
};
|
||||
fake_ftp = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0rn7lxdk3sqc2i4v2c5k25b9ca1qnkdf32nv04y760aml9mszwf7";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.1.1";
|
||||
};
|
||||
ffi = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "034f52xf7zcqgbvwbl20jwdyjwznvqnwpbaps9nk18v9lgb1dpx0";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.9.18";
|
||||
};
|
||||
gssapi = {
|
||||
dependencies = ["ffi"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0j93nsf9j57p7x4aafalvjg8hia2mmqv3aky7fmw2ck5yci343ix";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.2.0";
|
||||
};
|
||||
gyoku = {
|
||||
dependencies = ["builder"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1wn0sl14396g5lyvp8sjmcb1hw9rbyi89gxng91r7w4df4jwiidh";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.3.1";
|
||||
};
|
||||
hashdiff = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0yj5l2rw8i8jc725hbcpc4wks0qlaaimr3dpaqamfjkjkxl0hjp9";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.3.7";
|
||||
};
|
||||
hashicorp-checkpoint = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "15shgckjnxqpz1n9z6y4ax1dcnn5vdqcva29gdg2l7ny0g1w7c7m";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.1.4";
|
||||
};
|
||||
http-cookie = {
|
||||
dependencies = ["domain_name"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.0.3";
|
||||
};
|
||||
httpclient = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.8.3";
|
||||
};
|
||||
i18n = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "00nsll7q89ab6k43dl3apxjhy4zidlgjmgb9mpk42bj3wk5zdyzf";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.8.0";
|
||||
};
|
||||
listen = {
|
||||
dependencies = ["rb-fsevent" "rb-inotify" "ruby_dep"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "01v5mrnfqm6sgm8xn2v5swxsn1wlmq7rzh2i48d4jzjsc7qvb6mx";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.1.5";
|
||||
};
|
||||
little-plugger = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1frilv82dyxnlg8k1jhrvyd73l6k17mxc5vwxx080r4x1p04gwym";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.1.4";
|
||||
};
|
||||
log4r = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.1.10";
|
||||
};
|
||||
logging = {
|
||||
dependencies = ["little-plugger" "multi_json"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "06j6iaj89h9jhkx1x3hlswqrfnqds8br05xb1qra69dpvbdmjcwn";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.2.2";
|
||||
};
|
||||
mime-types = {
|
||||
dependencies = ["mime-types-data"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.1";
|
||||
};
|
||||
mime-types-data = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.2016.0521";
|
||||
};
|
||||
multi_json = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1raim9ddjh672m32psaa9niw67ywzjbxbdb8iijx3wv9k5b0pk2x";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.12.2";
|
||||
};
|
||||
net-scp = {
|
||||
dependencies = ["net-ssh"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0b0jqrcsp4bbi4n4mzyf70cp2ysyp6x07j8k8cqgxnvb4i3a134j";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.2.1";
|
||||
};
|
||||
net-sftp = {
|
||||
dependencies = ["net-ssh"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "04674g4n6mryjajlcd82af8g8k95la4b1bj712dh71hw1c9vhw1y";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.1.2";
|
||||
};
|
||||
net-ssh = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "013p5jb4wy0cq7x7036piw2a3s1i9p752ki1srx2m289mpz4ml3q";
|
||||
type = "gem";
|
||||
};
|
||||
version = "4.1.0";
|
||||
};
|
||||
netrc = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.11.0";
|
||||
};
|
||||
nori = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "066wc774a2zp4vrq3k7k8p0fhv30ymqmxma1jj7yg5735zls8agn";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.6.0";
|
||||
};
|
||||
public_suffix = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0mvzd9ycjw8ydb9qy3daq3kdzqs2vpqvac4dqss6ckk4rfcjc637";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.0.1";
|
||||
};
|
||||
rake = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "01j8fc9bqjnrsxbppncai05h43315vmz9fwg28qdsgcjw9ck1d7n";
|
||||
type = "gem";
|
||||
};
|
||||
version = "12.0.0";
|
||||
};
|
||||
rb-fsevent = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1fbpmjypwxkb8r7y1kmhmyp6gawa4byw0yb3jc3dn9ly4ld9lizf";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.10.2";
|
||||
};
|
||||
rb-inotify = {
|
||||
dependencies = ["ffi"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.9.10";
|
||||
};
|
||||
rb-kqueue = {
|
||||
dependencies = ["ffi"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "14mhzrhs2j43vj36i1qq4z29nd860shrslfik015f4kf1jiaqcrw";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.2.5";
|
||||
};
|
||||
rest-client = {
|
||||
dependencies = ["http-cookie" "mime-types" "netrc"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.0.2";
|
||||
};
|
||||
rspec = {
|
||||
dependencies = ["rspec-core" "rspec-expectations" "rspec-mocks"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "16g3mmih999f0b6vcz2c3qsc7ks5zy4lj1rzjh8hf6wk531nvc6s";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.5.0";
|
||||
};
|
||||
rspec-core = {
|
||||
dependencies = ["rspec-support"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1nacs062qbr98fx6czf1vwppn1js956nv2c8vfwj6i65axdfs46i";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.5.4";
|
||||
};
|
||||
rspec-expectations = {
|
||||
dependencies = ["diff-lcs" "rspec-support"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0bbqfrb1x8gmwf8x2xhhwvvlhwbbafq4isbvlibxi6jk602f09gs";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.5.0";
|
||||
};
|
||||
rspec-its = {
|
||||
dependencies = ["rspec-core" "rspec-expectations"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1pwphny5jawcm1hda3vs9pjv1cybaxy17dc1s75qd7drrvx697p3";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.2.0";
|
||||
};
|
||||
rspec-mocks = {
|
||||
dependencies = ["diff-lcs" "rspec-support"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0nl3ksivh9wwrjjd47z5dggrwx40v6gpb3a0gzbp1gs06a5dmk24";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.5.0";
|
||||
};
|
||||
rspec-support = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "10vf3k3d472y573mag2kzfsfrf6rv355s13kadnpryk8d36yq5r0";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.5.0";
|
||||
};
|
||||
ruby_dep = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0v0qznxz999lx4vs76mr590r90i0cm5m76wwvgis7sq4y21l308l";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.3.1";
|
||||
};
|
||||
rubyntlm = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1p6bxsklkbcqni4bcq6jajc2n57g0w5rzn4r49c3lb04wz5xg0dy";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.6.2";
|
||||
};
|
||||
rubyzip = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.2.1";
|
||||
};
|
||||
safe_yaml = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1hly915584hyi9q9vgd968x2nsi5yag9jyf5kq60lwzi5scr7094";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.0.4";
|
||||
};
|
||||
thor = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0d1g37j6sc7fkidf8rqlm3wh9zgyg3g7y8h2x1y34hmil5ywa8c3";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.18.1";
|
||||
};
|
||||
unf = {
|
||||
dependencies = ["unf_ext"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.1.4";
|
||||
};
|
||||
unf_ext = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "14hr2dzqh33kqc0xchs8l05pf3kjcayvad4z1ip5rdjxrkfk8glb";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.0.7.4";
|
||||
};
|
||||
vagrant = {
|
||||
dependencies = ["childprocess" "erubis" "hashicorp-checkpoint" "i18n" "listen" "log4r" "net-scp" "net-sftp" "net-ssh" "rb-kqueue" "rest-client" "ruby_dep" "wdm" "winrm" "winrm-elevated" "winrm-fs"];
|
||||
};
|
||||
vagrant-spec = {
|
||||
dependencies = ["childprocess" "log4r" "rspec" "thor"];
|
||||
source = {
|
||||
fetchSubmodules = false;
|
||||
rev = "7ac8b4191de578e345b29acaf62ecc72c8e73be1";
|
||||
sha256 = "03bpxlliyiny062p8a8vxyb1hymxpgfwliky4vlqn7lbm6z7n6kr";
|
||||
type = "git";
|
||||
url = "https://github.com/mitchellh/vagrant-spec.git";
|
||||
};
|
||||
version = "0.0.1";
|
||||
};
|
||||
wdm = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0x5l2pn4x92734k6i2wcjbn2klmwgkiqaajvxadh35k74dgnyh18";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.1.1";
|
||||
};
|
||||
webmock = {
|
||||
dependencies = ["addressable" "crack" "hashdiff"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.3.2";
|
||||
};
|
||||
winrm = {
|
||||
dependencies = ["builder" "erubis" "gssapi" "gyoku" "httpclient" "logging" "nori" "rubyntlm"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "02lzbixdbjvhmb0byqx9rl9x4xx9pqc8jwm7y6mmp7w7mri72zh6";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.2.3";
|
||||
};
|
||||
winrm-elevated = {
|
||||
dependencies = ["winrm" "winrm-fs"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "04krbwnj4cw7jy42w3n2y5kp2fbcp3v9mbf59pdhfk1py18bswcr";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.1.0";
|
||||
};
|
||||
winrm-fs = {
|
||||
dependencies = ["erubis" "logging" "rubyzip" "winrm"];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0vax34qbr3n6jifxyzr4nngaz8vrmzw6ydw21cnnrhidfkqgh7ja";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.1.1";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
diff --git i/bin/vagrant w/bin/vagrant
|
||||
index 19df75033..682fae226 100755
|
||||
--- i/bin/vagrant
|
||||
+++ w/bin/vagrant
|
||||
@@ -128,11 +128,6 @@ begin
|
||||
end
|
||||
end
|
||||
|
||||
- if !Vagrant.in_installer? && !Vagrant.very_quiet?
|
||||
- # If we're not in the installer, warn.
|
||||
- env.ui.warn(I18n.t("vagrant.general.not_in_installer") + "\n", prefix: false)
|
||||
- end
|
||||
-
|
||||
begin
|
||||
# Execute the CLI interface, and exit with the proper error code
|
||||
exit_status = env.cli(argv)
|
|
@ -7894,9 +7894,7 @@ with pkgs;
|
|||
|
||||
universal-ctags = callPackage ../development/tools/misc/universal-ctags { };
|
||||
|
||||
vagrant = callPackage ../development/tools/vagrant {
|
||||
ruby = ruby_2_4;
|
||||
};
|
||||
vagrant = callPackage ../development/tools/vagrant {};
|
||||
|
||||
bashdb = callPackage ../development/tools/misc/bashdb { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue