nixpkgs/pkgs/applications/virtualization/docker/default.nix
Paul Colomiets 9bc1676e5a Upgrade docker to 1.1.2 and add docker module
This version of module has disabled socketActivation, because until
nixos upgrade systemd to at least 214, systemd does not support
SocketGroup. So socket is created with "root" group when
socketActivation enabled. Should be fixed as soon as systemd upgraded.

Includes changes from #3015 and supersedes #3028
2014-07-28 21:45:49 +02:00

44 lines
1.5 KiB
Nix

{ stdenv, fetchurl, makeWrapper, go, lxc, sqlite, iproute, bridge_utils, devicemapper,
btrfsProgs, iptables, bash}:
stdenv.mkDerivation rec {
name = "docker-${version}";
version = "1.1.2";
src = fetchurl {
url = "https://github.com/dotcloud/docker/archive/v${version}.tar.gz";
sha256 = "1pa6k3gx940ap3r96xdry6apzkm0ymqra92b2mrp25b25264cqcy";
};
buildInputs = [ makeWrapper go sqlite lxc iproute bridge_utils devicemapper btrfsProgs iptables ];
dontStrip = true;
buildPhase = ''
patchShebangs ./hack
export AUTO_GOPATH=1
export DOCKER_GITCOMMIT="d84a070"
./hack/make.sh dynbinary
'';
installPhase = ''
install -Dm755 ./bundles/${version}/dynbinary/docker-${version} $out/bin/docker
install -Dm755 ./bundles/${version}/dynbinary/dockerinit-${version} $out/bin/dockerinit
wrapProgram $out/bin/docker --prefix PATH : "${iproute}/sbin:sbin:${lxc}/bin:${iptables}/sbin"
# 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 tailhook ];
platforms = platforms.linux;
};
}