2014-04-07 05:33:34 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper, go, lxc, sqlite, iproute, bridge_utils, devicemapper,
|
2014-09-03 23:30:59 +00:00
|
|
|
btrfsProgs, iptables, bash, e2fsprogs, xz}:
|
2014-01-24 13:39:43 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "docker-${version}";
|
2014-12-17 14:47:56 +00:00
|
|
|
version = "1.3.3";
|
2014-01-24 13:39:43 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/dotcloud/docker/archive/v${version}.tar.gz";
|
2014-12-17 14:47:56 +00:00
|
|
|
sha256 = "1jxvbm81zinh0achh8r2aac3x650aqiwn3w6iq1fg57fir1lw1cw";
|
2014-01-24 13:39:43 +00:00
|
|
|
};
|
|
|
|
|
2014-08-19 09:00:46 +00:00
|
|
|
buildInputs = [ makeWrapper go sqlite lxc iproute bridge_utils devicemapper btrfsProgs iptables e2fsprogs];
|
2014-01-24 13:39:43 +00:00
|
|
|
|
2014-07-27 22:00:59 +00:00
|
|
|
dontStrip = true;
|
2014-01-24 13:39:43 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
2014-07-27 22:00:59 +00:00
|
|
|
patchShebangs ./hack
|
2014-04-07 05:33:34 +00:00
|
|
|
export AUTO_GOPATH=1
|
2014-10-17 20:19:47 +00:00
|
|
|
export DOCKER_GITCOMMIT="c78088f"
|
2014-01-24 13:39:43 +00:00
|
|
|
./hack/make.sh dynbinary
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-09-03 16:24:51 +00:00
|
|
|
install -Dm755 ./bundles/${version}/dynbinary/docker-${version} $out/libexec/docker/docker
|
|
|
|
install -Dm755 ./bundles/${version}/dynbinary/dockerinit-${version} $out/libexec/docker/dockerinit
|
2014-09-03 23:30:59 +00:00
|
|
|
makeWrapper $out/libexec/docker/docker $out/bin/docker --prefix PATH : "${iproute}/sbin:sbin:${lxc}/bin:${iptables}/sbin:${e2fsprogs}/sbin:${xz}/bin"
|
2014-01-24 13:39:43 +00:00
|
|
|
|
|
|
|
# systemd
|
|
|
|
install -Dm644 ./contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service
|
|
|
|
|
|
|
|
# completion
|
|
|
|
install -Dm644 ./contrib/completion/bash/docker $out/share/bash-completion/completions/docker
|
|
|
|
install -Dm644 ./contrib/completion/zsh/_docker $out/share/zsh/site-functions/_docker
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.docker.io/;
|
|
|
|
description = "An open source project to pack, ship and run any application as a lightweight container";
|
|
|
|
license = licenses.asl20;
|
2014-07-27 22:00:59 +00:00
|
|
|
maintainers = with maintainers; [ offline tailhook ];
|
2014-01-24 13:39:43 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|