nixpkgs/pkgs/applications/virtualization/docker/default.nix

45 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, go, lxc, sqlite, iproute, bridge-utils, devicemapper,
btrfsProgs, iptables, bash, e2fsprogs, xz}:
2014-01-24 14:39:43 +01:00
stdenv.mkDerivation rec {
name = "docker-${version}";
2015-04-25 15:46:35 +02:00
version = "1.6.0";
2014-01-24 14:39:43 +01:00
src = fetchurl {
url = "https://github.com/dotcloud/docker/archive/v${version}.tar.gz";
2015-04-25 15:46:35 +02:00
sha256 = "03nzhikxp60falshzyk6ip8g9fhrczhvnvgmzqr8bny6w8x1v84b";
2014-01-24 14:39:43 +01:00
};
buildInputs = [ makeWrapper go sqlite lxc iproute bridge-utils devicemapper btrfsProgs iptables e2fsprogs ];
2014-01-24 14:39:43 +01:00
dontStrip = true;
2014-01-24 14:39:43 +01:00
buildPhase = ''
2015-05-10 12:26:53 +02:00
patchShebangs .
export AUTO_GOPATH=1
2015-04-25 15:46:35 +02:00
export DOCKER_GITCOMMIT="03nzhikx"
./hack/make.sh dynbinary
2014-01-24 14:39:43 +01:00
'';
installPhase = ''
install -Dm755 ./bundles/${version}/dynbinary/docker-${version} $out/libexec/docker/docker
install -Dm755 ./bundles/${version}/dynbinary/dockerinit-${version} $out/libexec/docker/dockerinit
makeWrapper $out/libexec/docker/docker $out/bin/docker --prefix PATH : "${iproute}/sbin:sbin:${lxc}/bin:${iptables}/sbin:${e2fsprogs}/sbin:${xz}/bin"
2014-01-24 14:39:43 +01: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 tailhook ];
2014-01-24 14:39:43 +01:00
platforms = platforms.linux;
};
}