2014-04-07 06:33:34 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, go, lxc, sqlite, iproute, bridge_utils, devicemapper,
|
|
|
|
btrfsProgs, iptables, bash}:
|
2014-01-24 13:39:43 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "docker-${version}";
|
2014-05-03 16:00:06 +01:00
|
|
|
version = "0.10.0";
|
2014-01-24 13:39:43 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/dotcloud/docker/archive/v${version}.tar.gz";
|
2014-05-03 16:00:06 +01:00
|
|
|
sha256 = "14gmx119hd3j0c6rbks2mm83hk46s5wnnyvj8rhn25h0yp39pm5q";
|
2014-01-24 13:39:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = ["unpackPhase" "preBuild" "buildPhase" "installPhase"];
|
|
|
|
|
2014-04-07 06:33:34 +01:00
|
|
|
buildInputs = [ makeWrapper go sqlite lxc iproute bridge_utils devicemapper btrfsProgs iptables ];
|
2014-01-24 13:39:43 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
patchShebangs ./hack
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2014-04-07 06:33:34 +01:00
|
|
|
export AUTO_GOPATH=1
|
|
|
|
export DOCKER_GITCOMMIT="867b2a90c228f62cdcd44907ceef279a2d8f1ac5"
|
2014-01-24 13:39:43 +00:00
|
|
|
./hack/make.sh dynbinary
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 ./bundles/${version}/dynbinary/docker-${version} $out/bin/docker
|
2014-04-07 06:33:34 +01:00
|
|
|
install -Dm755 ./bundles/${version}/dynbinary/dockerinit-${version} $out/bin/dockerinit
|
|
|
|
wrapProgram $out/bin/docker --prefix PATH : "${iproute}/sbin:sbin:${lxc}/bin:${iptables}/sbin"
|
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;
|
|
|
|
maintainers = with maintainers; [ offline ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|