2018-01-28 00:47:43 +01:00
|
|
|
{ lib, fetchurl, buildRubyGem, bundlerEnv, ruby, libarchive }:
|
2013-11-21 23:21:39 +01:00
|
|
|
|
2014-11-18 05:24:07 +01:00
|
|
|
let
|
2018-02-28 03:36:04 +01:00
|
|
|
version = "2.0.2";
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
url = "https://github.com/hashicorp/vagrant/archive/v${version}.tar.gz";
|
2018-02-28 03:36:04 +01:00
|
|
|
sha256 = "1sjfwgy2y6q5s1drd8h8xgz2a0sv1l3kx9jilgc02hlcdz070iir";
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
|
|
|
|
deps = bundlerEnv rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "vagrant";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
inherit ruby;
|
|
|
|
gemdir = ./.;
|
|
|
|
gemset = lib.recursiveUpdate (import ./gemset.nix) {
|
|
|
|
vagrant = {
|
|
|
|
source = {
|
|
|
|
type = "url";
|
|
|
|
inherit url sha256;
|
|
|
|
};
|
|
|
|
inherit version;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2014-11-18 05:24:07 +01:00
|
|
|
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
in buildRubyGem rec {
|
|
|
|
name = "${gemName}-${version}";
|
|
|
|
gemName = "vagrant";
|
|
|
|
inherit version;
|
2016-10-09 21:23:32 +02:00
|
|
|
|
2018-03-04 08:28:45 +01:00
|
|
|
doInstallCheck = true;
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
dontBuild = false;
|
|
|
|
src = fetchurl { inherit url sha256; };
|
2016-09-05 14:44:34 +02:00
|
|
|
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
patches = [
|
|
|
|
./unofficial-installation-nowarn.patch
|
|
|
|
];
|
2016-09-05 14:44:34 +02:00
|
|
|
|
2018-01-28 00:47:43 +01:00
|
|
|
# PATH additions:
|
|
|
|
# - libarchive: Make `bsdtar` available for extracting downloaded boxes
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/vagrant" \
|
2018-01-28 00:47:43 +01:00
|
|
|
--set GEM_PATH "${deps}/lib/ruby/gems/${ruby.version.libDir}" \
|
|
|
|
--prefix PATH ':' "${lib.getBin libarchive}/bin"
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
'';
|
2013-11-21 23:21:39 +01:00
|
|
|
|
2018-03-04 08:28:45 +01:00
|
|
|
installCheckPhase = ''
|
|
|
|
if [[ "$("$out/bin/vagrant" --version)" == "Vagrant ${version}" ]]; then
|
|
|
|
echo 'Vagrant smoke check passed'
|
|
|
|
else
|
|
|
|
echo 'Vagrant smoke check failed'
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
passthru = {
|
|
|
|
inherit ruby deps;
|
2016-09-05 14:44:34 +02:00
|
|
|
};
|
|
|
|
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
meta = with lib; {
|
2013-11-21 23:21:39 +01:00
|
|
|
description = "A tool for building complete development environments";
|
vagrant: Build from source
This is not quite as elegant as using `bundlerApp`,
which I could not get working.
However, this still uses most of the Ruby infrastructure,
including stock bundix, and should be fairly reasonable to maintain.
This means no more hacks to work around wrong embedded binaries,
and no need for an old version of Ruby.
Note that `vagrant share` is no longer included,
as that functionality is closed-source
and not present in the upstream source code.
The Vagrant maintainers publish official Vagrant installers,
which they prefer people use as most platforms don't
have great support for pinning known-good dependencies.
When run outside one of the offical installers,
Vagrant normally prints a warning to that effect.
However, Vagrant does run outside the installer environment
(nominally to support Vagrant development),
and this has the effect of functioning better by respecting
OS certs and shared libraries,
as opposed to trying to use bundled versions.
To keep these postive side effects without having to see the warning
on every Vagrant invocation, patch out the call to print the warning.
Note that I have reset the maintainers since the implementation is
totally redone; I'm happy to re-add any of the current maintainers.
2017-10-30 07:21:07 +01:00
|
|
|
homepage = https://www.vagrantup.com/;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ aneeshusa ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
2013-11-21 23:21:39 +01:00
|
|
|
};
|
|
|
|
}
|