From dbf26f58dd54facb1e168c31cd903f650e4393d5 Mon Sep 17 00:00:00 2001 From: Chris Farmiloe Date: Mon, 11 Aug 2014 18:38:13 +0200 Subject: [PATCH] add nix shell file --- shell.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..ca864d5 --- /dev/null +++ b/shell.nix @@ -0,0 +1,31 @@ +let + pkgs = import {}; + stdenv = pkgs.stdenv; + packer = stdenv.mkDerivation { + name = "packer"; + src = pkgs.fetchurl { + url = "https://dl.bintray.com/mitchellh/packer/0.6.1_linux_amd64.zip"; + sha256 = "1sjsp0jqmhc9frp6hm1g0zd42dipxwbd9xanhnf504yvnxdaa4ww"; + }; + buildInputs = [ + pkgs.unzip + ]; + phases = [ "installPhase" ]; + installPhase = + '' + ensureDir $out/bin + unzip $src -d $out/bin + ''; + }; +in +stdenv.mkDerivation rec { + name = "shell"; + version = "shell"; + src = ./.; + buildInputs = [ + packer + ]; + shellHook = '' + export GOPATH=$(pwd) + ''; +}