diff options
Diffstat (limited to 'pkgs/development/tools/packer/default.nix')
-rw-r--r-- | pkgs/development/tools/packer/default.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/development/tools/packer/default.nix b/pkgs/development/tools/packer/default.nix new file mode 100644 index 00000000000..073de5137f8 --- /dev/null +++ b/pkgs/development/tools/packer/default.nix @@ -0,0 +1,35 @@ +{ stdenv, lib, gox, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "packer-0.6.0"; + + src = import ./deps.nix { + inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub; + }; + + buildInputs = [ gox ]; + + installPhase = '' + export GOPATH=$src + XC_ARCH=$(go env GOARCH) + XC_OS=$(go env GOOS) + + mkdir -p $out/bin + + cd $src/src/github.com/mitchellh/packer + gox \ + -os="''${XC_OS}" \ + -arch="''${XC_ARCH}" \ + -output "$out/bin/packer-{{.Dir}}" \ + ./... + mv $out/bin/packer{*packer*,} + ''; + + meta = with stdenv.lib; { + description = "A tool for creating identical machine images for multiple platforms from a single source configuration"; + homepage = "http://www.packer.io"; + license = licenses.mpl20; + maintainers = with maintainers; [ cstrahan ]; + platforms = platforms.unix; + }; +} |