docker: 1.10.3 -> 1.12.1
This commit is contained in:
parent
e927620885
commit
0a518618a2
@ -1,32 +1,34 @@
|
||||
{ stdenv, fetchFromGitHub, makeWrapper
|
||||
, go, sqlite, iproute, bridge-utils, devicemapper
|
||||
, btrfs-progs, iptables, e2fsprogs, xz, utillinux
|
||||
, systemd, pkgconfig
|
||||
{ stdenv, lib, fetchFromGitHub, makeWrapper, pkgconfig, go-md2man
|
||||
, go, containerd, runc
|
||||
, sqlite, iproute, bridge-utils, devicemapper, systemd
|
||||
, btrfs-progs, iptables, e2fsprogs, xz, utillinux, xfsprogs
|
||||
, procps
|
||||
}:
|
||||
|
||||
# https://github.com/docker/docker/blob/master/project/PACKAGERS.md
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "docker-${version}";
|
||||
version = "1.10.3";
|
||||
version = "1.12.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "docker";
|
||||
repo = "docker";
|
||||
rev = "v${version}";
|
||||
sha256 = "0bmrafi0p3fm681y165ps97jki0a8ihl9f0bmpvi22nmc1v0sv6l";
|
||||
sha256 = "079786dyydjfc8vb6djxh140pc7v16fjl5x2h2q420qc3mrfz5zd";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
makeWrapper go sqlite iproute bridge-utils devicemapper btrfs-progs
|
||||
iptables e2fsprogs systemd pkgconfig stdenv.glibc stdenv.glibc.static
|
||||
makeWrapper pkgconfig go-md2man go
|
||||
sqlite devicemapper btrfs-progs systemd
|
||||
];
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
DOCKER_BUILDTAGS = [ "journald" ]
|
||||
DOCKER_BUILDTAGS = []
|
||||
++ optional (systemd != null) [ "journald" ]
|
||||
++ optional (btrfs-progs == null) "exclude_graphdriver_btrfs"
|
||||
++ optional (devicemapper == null) "exclude_graphdriver_devicemapper";
|
||||
|
||||
@ -39,15 +41,27 @@ stdenv.mkDerivation rec {
|
||||
buildPhase = ''
|
||||
patchShebangs .
|
||||
export AUTO_GOPATH=1
|
||||
export DOCKER_GITCOMMIT="20f81dde"
|
||||
export DOCKER_GITCOMMIT="23cf638"
|
||||
./hack/make.sh dynbinary
|
||||
'';
|
||||
|
||||
outputs = ["out" "man"];
|
||||
|
||||
extraPath = makeBinPath [ iproute iptables e2fsprogs xz xfsprogs procps utillinux ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 ./bundles/${version}/dynbinary/docker-${version} $out/libexec/docker/docker
|
||||
install -Dm755 ./bundles/${version}/dynbinary/dockerinit-${version} $out/libexec/docker/dockerinit
|
||||
install -Dm755 ./bundles/${version}/dynbinary-client/docker-${version} $out/libexec/docker/docker
|
||||
install -Dm755 ./bundles/${version}/dynbinary-daemon/dockerd-${version} $out/libexec/docker/dockerd
|
||||
install -Dm755 ./bundles/${version}/dynbinary-daemon/docker-proxy-${version} $out/libexec/docker/docker-proxy
|
||||
makeWrapper $out/libexec/docker/docker $out/bin/docker \
|
||||
--prefix PATH : "${stdenv.lib.makeBinPath [ iproute iptables e2fsprogs xz utillinux ]}"
|
||||
--prefix PATH : "$out/libexec/docker:$extraPath"
|
||||
makeWrapper $out/libexec/docker/dockerd $out/bin/dockerd \
|
||||
--prefix PATH : "$out/libexec/docker:$extraPath"
|
||||
|
||||
# docker uses containerd now
|
||||
ln -s ${containerd}/bin/containerd $out/libexec/docker/docker-containerd
|
||||
ln -s ${containerd}/bin/containerd-shim $out/libexec/docker/docker-containerd-shim
|
||||
ln -s ${runc}/bin/runc $out/libexec/docker/docker-runc
|
||||
|
||||
# systemd
|
||||
install -Dm644 ./contrib/init/systemd/docker.service $out/etc/systemd/system/docker.service
|
||||
@ -56,9 +70,31 @@ stdenv.mkDerivation rec {
|
||||
install -Dm644 ./contrib/completion/bash/docker $out/share/bash-completion/completions/docker
|
||||
install -Dm644 ./contrib/completion/fish/docker.fish $out/share/fish/vendor_completions.d/docker.fish
|
||||
install -Dm644 ./contrib/completion/zsh/_docker $out/share/zsh/site-functions/_docker
|
||||
|
||||
# Include contributed man pages
|
||||
man/md2man-all.sh -q
|
||||
manRoot="$man/share/man"
|
||||
mkdir -p "$manRoot"
|
||||
for manDir in man/man?; do
|
||||
manBase="$(basename "$manDir")" # "man1"
|
||||
for manFile in "$manDir"/*; do
|
||||
manName="$(basename "$manFile")" # "docker-build.1"
|
||||
mkdir -p "$manRoot/$manBase"
|
||||
gzip -c "$manFile" > "$manRoot/$manBase/$manName.gz"
|
||||
done
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
preFixup = ''
|
||||
# remove references to go compiler, gcc and glibc
|
||||
while read file; do
|
||||
sed -ri "s,${go},$(echo "${go}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" $file
|
||||
sed -ri "s,${stdenv.cc.cc},$(echo "${stdenv.cc.cc}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" $file
|
||||
sed -ri "s,${stdenv.glibc.dev},$(echo "${stdenv.glibc.dev}" | sed "s,$NIX_STORE/[^-]*,$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee,"),g" $file
|
||||
done < <(find $out -type f 2>/dev/null)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://www.docker.com/;
|
||||
description = "An open source project to pack, ship and run any application as a lightweight container";
|
||||
license = licenses.asl20;
|
||||
|
@ -12770,9 +12770,7 @@ in
|
||||
|
||||
dmtx-utils = callPackage ../tools/graphics/dmtx-utils { };
|
||||
|
||||
docker = callPackage ../applications/virtualization/docker {
|
||||
btrfs-progs = btrfs-progs_4_4_1;
|
||||
};
|
||||
docker = callPackage ../applications/virtualization/docker { };
|
||||
|
||||
docker-gc = callPackage ../applications/virtualization/docker/gc.nix { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user