Skip to content

Commit

Permalink
Merge pull request #96280 from NixOS/staging-next
Browse files Browse the repository at this point in the history
Staging next
  • Loading branch information
FRidh committed Aug 27, 2020
2 parents 02ee825 + 52095e1 commit 22c23f4
Show file tree
Hide file tree
Showing 364 changed files with 1,165 additions and 860 deletions.
2 changes: 1 addition & 1 deletion pkgs/applications/networking/cluster/cni/default.nix
Expand Up @@ -18,6 +18,6 @@ buildGoPackage rec {
license = licenses.asl20;
homepage = "https://github.com/containernetworking/cni";
maintainers = with maintainers; [ offline vdemeester ];
platforms = [ "x86_64-linux" ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
};
}
33 changes: 23 additions & 10 deletions pkgs/applications/virtualization/docker/default.nix
@@ -1,4 +1,5 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper, removeReferencesTo, installShellFiles, pkgconfig
{ stdenv, lib, fetchFromGitHub, fetchpatch, buildGoPackage
, makeWrapper, removeReferencesTo, installShellFiles, pkgconfig
, go-md2man, go, containerd, runc, docker-proxy, tini, libtool
, sqlite, iproute, lvm2, systemd
, btrfs-progs, iptables, e2fsprogs, xz, utillinux, xfsprogs, git
Expand Down Expand Up @@ -56,7 +57,7 @@ rec {
NIX_CFLAGS_COMPILE = "-DMINIMAL=ON";
});
in
stdenv.mkDerivation ((optionalAttrs (stdenv.isLinux) {
buildGoPackage ((optionalAttrs (stdenv.isLinux) {

inherit docker-runc docker-containerd docker-proxy docker-tini;

Expand All @@ -66,7 +67,7 @@ rec {
++ optional (lvm2 == null) "exclude_graphdriver_devicemapper"
++ optional (libseccomp != null) "seccomp";

}) // {
}) // rec {
inherit version rev;

name = "docker-${version}";
Expand All @@ -78,9 +79,19 @@ rec {
sha256 = sha256;
};

nativeBuildInputs = [ installShellFiles pkgconfig ];
patches = [
# Replace hard-coded cross-compiler with $CC
(fetchpatch {
url = https://github.com/docker/docker-ce/commit/2fdfb4404ab811cb00227a3de111437b829e55cf.patch;
sha256 = "1af20bzakhpfhaixc29qnl9iml9255xdinxdnaqp4an0n1xa686a";
})
];

goPackagePath = "github.com/docker/docker-ce";

nativeBuildInputs = [ pkgconfig go-md2man go libtool removeReferencesTo installShellFiles ];
buildInputs = [
makeWrapper removeReferencesTo go-md2man go libtool
makeWrapper
] ++ optionals (stdenv.isLinux) [
sqlite lvm2 btrfs-progs systemd libseccomp
];
Expand All @@ -91,15 +102,15 @@ rec {
export GOCACHE="$TMPDIR/go-cache"
'' + (optionalString (stdenv.isLinux) ''
# build engine
cd ./components/engine
cd ./go/src/${goPackagePath}/components/engine
export AUTO_GOPATH=1
export DOCKER_GITCOMMIT="${rev}"
export VERSION="${version}"
./hack/make.sh dynbinary
cd -
'') + ''
# build cli
cd ./components/cli
cd ./go/src/${goPackagePath}/components/cli
# Mimic AUTO_GOPATH
mkdir -p .gopath/src/github.com/docker/
ln -sf $PWD .gopath/src/github.com/docker/cli
Expand All @@ -113,7 +124,7 @@ rec {
'';

# systemd 230 no longer has libsystemd-journal as a separate entity from libsystemd
patchPhase = ''
postPatch = ''
substituteInPlace ./components/cli/scripts/build/.variables --replace "set -eu" ""
'' + optionalString (stdenv.isLinux) ''
patchShebangs .
Expand All @@ -126,6 +137,7 @@ rec {
extraPath = optionals (stdenv.isLinux) (makeBinPath [ iproute iptables e2fsprogs xz xfsprogs procps utillinux git ]);

installPhase = optionalString (stdenv.isLinux) ''
cd ./go/src/${goPackagePath}
install -Dm755 ./components/engine/bundles/dynbinary-daemon/dockerd $out/libexec/docker/dockerd
makeWrapper $out/libexec/docker/dockerd $out/bin/dockerd \
Expand All @@ -152,13 +164,14 @@ rec {
installShellCompletion --zsh ./components/cli/contrib/completion/zsh/_docker
# Include contributed man pages (cli)
cd ./components/cli
'' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
# Generate man pages from cobra commands
echo "Generate man pages from cobra"
cd ./components/cli
mkdir -p ./man/man1
go build -o ./gen-manpages github.com/docker/cli/man
./gen-manpages --root . --target ./man/man1
'' + ''
# Generate legacy pages from markdown
echo "Generate legacy manpages"
./man/md2man-all.sh -q
Expand Down
3 changes: 2 additions & 1 deletion pkgs/applications/virtualization/tini/default.nix
Expand Up @@ -15,7 +15,8 @@ stdenv.mkDerivation rec {

NIX_CFLAGS_COMPILE = "-DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37";

buildInputs = [ cmake glibc glibc.static ];
nativeBuildInputs = [ cmake ];
buildInputs = [ glibc glibc.static ];

meta = with stdenv.lib; {
description = "A tiny but valid init for containers";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/build-support/rust/default.nix
Expand Up @@ -181,7 +181,7 @@ stdenv.mkDerivation (args // {
"CXX_${rust.toRustTarget stdenv.buildPlatform}"="${cxxForBuild}" \
"CC_${rust.toRustTarget stdenv.hostPlatform}"="${ccForHost}" \
"CXX_${rust.toRustTarget stdenv.hostPlatform}"="${cxxForHost}" \
cargo build \
cargo build -j $NIX_BUILD_CORES \
${stdenv.lib.optionalString (buildType == "release") "--release"} \
--target ${rustTarget} \
--frozen ${concatStringsSep " " cargoBuildFlags}
Expand All @@ -208,7 +208,7 @@ stdenv.mkDerivation (args // {
${stdenv.lib.optionalString (buildAndTestSubdir != null) "pushd ${buildAndTestSubdir}"}
runHook preCheck
echo "Running cargo test ${argstr} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
cargo test ${argstr} -- ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"}
cargo test -j $NIX_BUILD_CORES ${argstr} -- --test-threads=$NIX_BUILD_CORES ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"}
runHook postCheck
${stdenv.lib.optionalString (buildAndTestSubdir != null) "popd"}
'');
Expand Down
11 changes: 7 additions & 4 deletions pkgs/development/compilers/ghc/8.10.1.nix
Expand Up @@ -55,7 +55,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";

buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
Expand All @@ -68,6 +68,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
Expand Down Expand Up @@ -127,7 +129,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
Expand Down Expand Up @@ -240,8 +242,9 @@ stdenv.mkDerivation (rec {
inherit (ghc.meta) license platforms;
};

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
dontPatchELF = true;
noAuditTmpdir = true;
})
11 changes: 7 additions & 4 deletions pkgs/development/compilers/ghc/8.8.2.nix
Expand Up @@ -52,7 +52,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";

buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
Expand All @@ -65,6 +65,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
GhcLibHcOpts += -fPIC
GhcRtsHcOpts += -fPIC
Expand Down Expand Up @@ -122,7 +124,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
Expand Down Expand Up @@ -235,8 +237,9 @@ stdenv.mkDerivation (rec {
inherit (ghc.meta) license platforms;
};

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
dontPatchELF = true;
noAuditTmpdir = true;
})
11 changes: 7 additions & 4 deletions pkgs/development/compilers/ghc/8.8.3.nix
Expand Up @@ -55,7 +55,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";

buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
Expand All @@ -68,6 +68,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
Expand Down Expand Up @@ -127,7 +129,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
Expand Down Expand Up @@ -240,8 +242,9 @@ stdenv.mkDerivation (rec {
inherit (ghc.meta) license platforms;
};

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
dontPatchELF = true;
noAuditTmpdir = true;
})
11 changes: 7 additions & 4 deletions pkgs/development/compilers/ghc/8.8.4.nix
Expand Up @@ -55,7 +55,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";

buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
Expand All @@ -68,6 +68,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
Expand Down Expand Up @@ -127,7 +129,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
Expand Down Expand Up @@ -240,8 +242,9 @@ stdenv.mkDerivation (rec {
inherit (ghc.meta) license platforms;
};

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
dontPatchELF = true;
noAuditTmpdir = true;
})
11 changes: 7 additions & 4 deletions pkgs/development/compilers/ghc/head.nix
Expand Up @@ -61,7 +61,7 @@ let
(targetPlatform != hostPlatform)
"${targetPlatform.config}-";

buildMK = ''
buildMK = dontStrip: ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
Expand All @@ -74,6 +74,8 @@ let
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
'' + stdenv.lib.optionalString dontStrip ''
STRIP_CMD = :
'' + stdenv.lib.optionalString (!enableProfiledLibs) ''
GhcLibWays = "v dyn"
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
Expand Down Expand Up @@ -137,7 +139,7 @@ stdenv.mkDerivation (rec {
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
echo -n "${buildMK dontStrip}" > mk/build.mk
echo ${version} > VERSION
echo ${src.rev} > GIT_COMMIT_ID
./boot
Expand Down Expand Up @@ -256,8 +258,9 @@ stdenv.mkDerivation (rec {
inherit (ghc.meta) license platforms;
};

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
dontStrip = true;
dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);

} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
dontPatchELF = true;
noAuditTmpdir = true;
})
1 change: 1 addition & 0 deletions pkgs/development/go-packages/generic/default.nix
Expand Up @@ -212,6 +212,7 @@ let

preFixup = preFixup + ''
find $out/bin -type f -exec ${removeExpr removeReferences} '{}' + || true
find $out/libexec -type f -exec ${removeExpr removeReferences} '{}' + || true
'';

strictDeps = true;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/haskell-modules/generic-builder.nix
Expand Up @@ -35,7 +35,7 @@ in
, enableSharedExecutables ? false
, enableSharedLibraries ? (ghc.enableShared or false)
, enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin
, enableStaticLibraries ? !stdenv.hostPlatform.isWindows
, enableStaticLibraries ? !(stdenv.hostPlatform.isWindows or stdenv.hostPlatform.isWasm)
, enableHsc2hsViaAsm ? stdenv.hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4"
, extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? []
# On macOS, statically linking against system frameworks is not supported;
Expand Down Expand Up @@ -90,6 +90,7 @@ assert editedCabalFile != null -> revision != null;
# --enable-static does not work on windows. This is a bug in GHC.
# --enable-static will pass -staticlib to ghc, which only works for mach-o and elf.
assert stdenv.hostPlatform.isWindows -> enableStaticLibraries == false;
assert stdenv.hostPlatform.isWasm -> enableStaticLibraries == false;

let

Expand Down
9 changes: 5 additions & 4 deletions pkgs/development/libraries/gdal/default.nix
Expand Up @@ -7,13 +7,14 @@ with stdenv.lib;

stdenv.mkDerivation rec {
pname = "gdal";
version = "3.0.4";
# broken with poppler 20.08, however, can't fetch patches cleanly
version = "3.1.2.post2020-08-26";

src = fetchFromGitHub {
owner = "OSGeo";
repo = "gdal";
rev = "v${version}";
sha256 = "00a7q9wv8s1bmdhqxvixkq2afr8aibg3pkc76gg50r8lavf6j84c";
rev = "9a8df672204a8b3b33c36e09a32f747e21166fe9";
sha256 = "1n25jma4x1l7slwxk702q77r84vxr90fyn4c3zpkr07q1b8wqql9";
};

sourceRoot = "source/gdal";
Expand Down Expand Up @@ -57,7 +58,7 @@ stdenv.mkDerivation rec {
"--with-proj=${proj.dev}" # optional
"--with-geos=${geos}/bin/geos-config" # optional
"--with-hdf4=${hdf4.dev}" # optional
"--with-xml2=${libxml2.dev}/bin/xml2-config" # optional
"--with-xml2=yes" # optional
(if netcdfSupport then "--with-netcdf=${netcdf}" else "")
];

Expand Down

0 comments on commit 22c23f4

Please sign in to comment.