add nix shell file
This commit is contained in:
parent
2339979240
commit
dbf26f58dd
31
shell.nix
Normal file
31
shell.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
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)
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue