infra/_archive/environments/dev/rkt.nix

73 lines
1.3 KiB
Nix
Raw Normal View History

2015-10-23 01:26:53 +02:00
{
2016-06-28 11:40:39 -07:00
pkgs ? import /home/steveej/src/github/NixOS/nixpkgs {},
2015-10-23 01:26:53 +02:00
mkGoEnv ? import ./go.nix,
rktPath,
2015-10-23 01:26:53 +02:00
}:
let
rktBasebuildInputs = with pkgs; [
2016-06-28 11:40:39 -07:00
glibc.out
glibc.static
autoreconfHook
2015-10-23 01:26:53 +02:00
gnupg1
squashfsTools
cpio
tree
intltool
libtool
pkgconfig
libgcrypt
gperf
libcap
libseccomp
libzip
eject
iptables
bc
acl
2016-06-28 11:40:39 -07:00
trousers
systemd
2015-10-23 01:26:53 +02:00
];
extraShellHook = ''
TARGET=$GOPATH/src/github.com/coreos/rkt
if [[ -e ${rktPath}/rkt/rkt.go ]]; then
pushd ${rktPath}
else
echo rktPath must be run the rkt repository clone, but got '${rktPath}'
exit 1
fi
if ! [[ -e $TARGET/rkt/rkt.go ]]; then
mkdir -p $TARGET
echo $PWD
sudo -E mount -o bind $PWD $TARGET
fi
pushd $TARGET
'';
2015-10-23 01:26:53 +02:00
in {
go15 = mkGoEnv {
inherit pkgs;
name = "rktGo15";
2016-06-28 11:39:21 -07:00
version = "1_5";
2015-10-23 01:26:53 +02:00
extraBuildInputs = rktBasebuildInputs;
inherit extraShellHook;
2015-10-23 01:26:53 +02:00
};
go16 = mkGoEnv {
inherit pkgs;
name = "rktGo16";
2016-06-28 11:39:21 -07:00
version = "1_6";
2015-10-23 01:26:53 +02:00
extraBuildInputs = rktBasebuildInputs;
inherit extraShellHook;
};
go17 = mkGoEnv {
inherit pkgs;
name = "rktGo17";
version = "1_7";
extraBuildInputs = rktBasebuildInputs;
inherit extraShellHook;
2015-10-23 01:26:53 +02:00
};
}