Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-07-16 06:01:04 +00:00 committed by GitHub
commit 7959589ea0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 53 additions and 29 deletions

View file

@ -21,7 +21,7 @@ formats commits for you.
*/ */
{ lib, stdenv, texinfo, writeText }: { lib, stdenv, texinfo, writeText, gcc }:
self: let self: let
@ -32,7 +32,7 @@ self: let
}; };
elpaBuild = import ../../../../build-support/emacs/elpa.nix { elpaBuild = import ../../../../build-support/emacs/elpa.nix {
inherit lib stdenv texinfo writeText; inherit lib stdenv texinfo writeText gcc;
inherit (self) emacs; inherit (self) emacs;
}; };

View file

@ -1,6 +1,6 @@
# builder for Emacs packages built for packages.el # builder for Emacs packages built for packages.el
{ lib, stdenv, emacs, texinfo, writeText }: { lib, stdenv, emacs, texinfo, writeText, gcc }:
with lib; with lib;
@ -19,7 +19,7 @@ let
in in
import ./generic.nix { inherit lib stdenv emacs texinfo writeText; } ({ import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({
phases = "installPhase fixupPhase distPhase"; phases = "installPhase fixupPhase distPhase";

View file

@ -1,6 +1,6 @@
# generic builder for Emacs packages # generic builder for Emacs packages
{ lib, stdenv, emacs, texinfo, writeText, ... }: { lib, stdenv, emacs, texinfo, writeText, gcc, ... }:
with lib; with lib;
@ -72,6 +72,8 @@ stdenv.mkDerivation ({
LIBRARY_PATH = "${lib.getLib stdenv.cc.libc}/lib"; LIBRARY_PATH = "${lib.getLib stdenv.cc.libc}/lib";
nativeBuildInputs = [ gcc ];
addEmacsNativeLoadPath = true; addEmacsNativeLoadPath = true;
postInstall = '' postInstall = ''

View file

@ -1,7 +1,7 @@
# builder for Emacs packages built for packages.el # builder for Emacs packages built for packages.el
# using MELPA package-build.el # using MELPA package-build.el
{ lib, stdenv, fetchFromGitHub, emacs, texinfo, writeText }: { lib, stdenv, fetchFromGitHub, emacs, texinfo, writeText, gcc }:
with lib; with lib;
@ -28,7 +28,7 @@ let
in in
import ./generic.nix { inherit lib stdenv emacs texinfo writeText; } ({ import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({
ename = ename =
if ename == null if ename == null

View file

@ -32,7 +32,7 @@ in customEmacsPackages.emacs.pkgs.withPackages (epkgs: [ epkgs.evil epkgs.magit
*/ */
{ lib, lndir, makeWrapper, runCommand }: self: { lib, lndir, makeWrapper, runCommand, gcc }: self:
with lib; with lib;
@ -65,7 +65,10 @@ runCommand
# Store all paths we want to add to emacs here, so that we only need to add # Store all paths we want to add to emacs here, so that we only need to add
# one path to the load lists # one path to the load lists
deps = runCommand "emacs-packages-deps" deps = runCommand "emacs-packages-deps"
{ inherit explicitRequires lndir emacs; } {
inherit explicitRequires lndir emacs;
nativeBuildInputs = lib.optional nativeComp gcc;
}
'' ''
findInputsOld() { findInputsOld() {
local pkg="$1"; shift local pkg="$1"; shift

View file

@ -48,7 +48,8 @@ stdenv.mkDerivation rec {
postInstall = let postInstall = let
includedLibs = [ "base" "contrib" "network" "prelude" ]; includedLibs = [ "base" "contrib" "network" "prelude" ];
name = "${pname}-${version}"; name = "${pname}-${version}";
packagePaths = builtins.map (l: "$out/${name}/" + l) includedLibs; packagePaths =
builtins.map (l: "$out/${name}/${l}-${version}") includedLibs;
additionalIdris2Paths = builtins.concatStringsSep ":" packagePaths; additionalIdris2Paths = builtins.concatStringsSep ":" packagePaths;
in '' in ''
# Remove existing idris2 wrapper that sets incorrect LD_LIBRARY_PATH # Remove existing idris2 wrapper that sets incorrect LD_LIBRARY_PATH

View file

@ -19,6 +19,7 @@ my $autoModules = $ENV{'AUTO_MODULES'};
my $preferBuiltin = $ENV{'PREFER_BUILTIN'}; my $preferBuiltin = $ENV{'PREFER_BUILTIN'};
my $ignoreConfigErrors = $ENV{'ignoreConfigErrors'}; my $ignoreConfigErrors = $ENV{'ignoreConfigErrors'};
my $buildRoot = $ENV{'BUILD_ROOT'}; my $buildRoot = $ENV{'BUILD_ROOT'};
my $makeFlags = $ENV{'MAKE_FLAGS'};
$SIG{PIPE} = 'IGNORE'; $SIG{PIPE} = 'IGNORE';
# Read the answers. # Read the answers.
@ -40,7 +41,7 @@ close ANSWERS;
sub runConfig { sub runConfig {
# Run `make config'. # Run `make config'.
my $pid = open2(\*IN, \*OUT, "make -C $ENV{SRC} O=$buildRoot config SHELL=bash ARCH=$ENV{ARCH} CC=$ENV{CC} HOSTCC=$ENV{HOSTCC} HOSTCXX=$ENV{HOSTCXX}"); my $pid = open2(\*IN, \*OUT, "make -C $ENV{SRC} O=$buildRoot config SHELL=bash ARCH=$ENV{ARCH} CC=$ENV{CC} HOSTCC=$ENV{HOSTCC} HOSTCXX=$ENV{HOSTCXX} $makeFlags");
# Parse the output, look for questions and then send an # Parse the output, look for questions and then send an
# appropriate answer. # appropriate answer.

View file

@ -21,6 +21,9 @@
, # Legacy overrides to the intermediate kernel config, as string , # Legacy overrides to the intermediate kernel config, as string
extraConfig ? "" extraConfig ? ""
# Additional make flags passed to kbuild
, extraMakeFlags ? []
, # kernel intermediate config overrides, as a set , # kernel intermediate config overrides, as a set
structuredExtraConfig ? {} structuredExtraConfig ? {}
@ -97,7 +100,7 @@ let
in lib.concatStringsSep "\n" ([baseConfigStr] ++ configFromPatches); in lib.concatStringsSep "\n" ([baseConfigStr] ++ configFromPatches);
configfile = stdenv.mkDerivation { configfile = stdenv.mkDerivation {
inherit ignoreConfigErrors autoModules preferBuiltin kernelArch; inherit ignoreConfigErrors autoModules preferBuiltin kernelArch extraMakeFlags;
pname = "linux-config"; pname = "linux-config";
inherit version; inherit version;
@ -116,6 +119,9 @@ let
# e.g. "bzImage" # e.g. "bzImage"
kernelTarget = stdenv.hostPlatform.linux-kernel.target; kernelTarget = stdenv.hostPlatform.linux-kernel.target;
makeFlags = lib.optionals (stdenv.hostPlatform.linux-kernel ? makeFlags) stdenv.hostPlatform.linux-kernel.makeFlags
++ extraMakeFlags;
prePatch = kernel.prePatch + '' prePatch = kernel.prePatch + ''
# Patch kconfig to print "###" after every question so that # Patch kconfig to print "###" after every question so that
# generate-config.pl from the generic builder can answer them. # generate-config.pl from the generic builder can answer them.
@ -134,16 +140,19 @@ let
export HOSTLD=$LD_FOR_BUILD export HOSTLD=$LD_FOR_BUILD
# Get a basic config file for later refinement with $generateConfig. # Get a basic config file for later refinement with $generateConfig.
make -C . O="$buildRoot" $kernelBaseConfig \ make $makeFlags \
-C . O="$buildRoot" $kernelBaseConfig \
ARCH=$kernelArch \ ARCH=$kernelArch \
HOSTCC=$HOSTCC HOSTCXX=$HOSTCXX HOSTAR=$HOSTAR HOSTLD=$HOSTLD \ HOSTCC=$HOSTCC HOSTCXX=$HOSTCXX HOSTAR=$HOSTAR HOSTLD=$HOSTLD \
CC=$CC OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP READELF=$READELF CC=$CC OBJCOPY=$OBJCOPY OBJDUMP=$OBJDUMP READELF=$READELF \
$makeFlags
# Create the config file. # Create the config file.
echo "generating kernel configuration..." echo "generating kernel configuration..."
ln -s "$kernelConfigPath" "$buildRoot/kernel-config" ln -s "$kernelConfigPath" "$buildRoot/kernel-config"
DEBUG=1 ARCH=$kernelArch KERNEL_CONFIG="$buildRoot/kernel-config" AUTO_MODULES=$autoModules \ DEBUG=1 ARCH=$kernelArch KERNEL_CONFIG="$buildRoot/kernel-config" AUTO_MODULES=$autoModules \
PREFER_BUILTIN=$preferBuiltin BUILD_ROOT="$buildRoot" SRC=. perl -w $generateConfig PREFER_BUILTIN=$preferBuiltin BUILD_ROOT="$buildRoot" SRC=. MAKE_FLAGS="$makeFlags" \
perl -w $generateConfig
''; '';
installPhase = "mv $buildRoot/.config $out"; installPhase = "mv $buildRoot/.config $out";
@ -151,7 +160,6 @@ let
enableParallelBuilding = true; enableParallelBuilding = true;
passthru = rec { passthru = rec {
module = import ../../../../nixos/modules/system/boot/kernel_config.nix; module = import ../../../../nixos/modules/system/boot/kernel_config.nix;
# used also in apache # used also in apache
# { modules = [ { options = res.options; config = svc.config or svc; } ]; # { modules = [ { options = res.options; config = svc.config or svc; } ];
@ -172,14 +180,14 @@ let
}; # end of configfile derivation }; # end of configfile derivation
kernel = (callPackage ./manual-config.nix {}) { kernel = (callPackage ./manual-config.nix {}) {
inherit version modDirVersion src kernelPatches randstructSeed lib stdenv extraMeta configfile; inherit version modDirVersion src kernelPatches randstructSeed lib stdenv extraMakeFlags extraMeta configfile;
config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; }; config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };
}; };
passthru = { passthru = {
features = kernelFeatures; features = kernelFeatures;
inherit commonStructuredConfig isZen isHardened isLibre modDirVersion; inherit commonStructuredConfig structuredExtraConfig extraMakeFlags isZen isHardened isLibre modDirVersion;
isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true; isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true;
kernelOlder = lib.versionOlder version; kernelOlder = lib.versionOlder version;
kernelAtLeast = lib.versionAtLeast version; kernelAtLeast = lib.versionAtLeast version;

View file

@ -1,5 +1,5 @@
{ lib, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl { lib, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
, libelf, cpio, elfutils, zstd, gawk , libelf, cpio, elfutils, zstd, gawk, python3Minimal
, writeTextFile , writeTextFile
}: }:
@ -19,6 +19,8 @@ in {
stdenv, stdenv,
# The kernel version # The kernel version
version, version,
# Additional kernel make flags
extraMakeFlags ? [],
# The version of the kernel module directory # The version of the kernel module directory
modDirVersion ? version, modDirVersion ? version,
# The kernel source (tarball, git checkout, etc.) # The kernel source (tarball, git checkout, etc.)
@ -121,7 +123,7 @@ let
# See also https://kernelnewbies.org/BuildId # See also https://kernelnewbies.org/BuildId
sed -i Makefile -e 's|--build-id=[^ ]*|--build-id=none|' sed -i Makefile -e 's|--build-id=[^ ]*|--build-id=none|'
patchShebangs scripts/ld-version.sh patchShebangs scripts
''; '';
postPatch = '' postPatch = ''
@ -173,7 +175,9 @@ let
"KBUILD_BUILD_VERSION=1-NixOS" "KBUILD_BUILD_VERSION=1-NixOS"
kernelConf.target kernelConf.target
"vmlinux" # for "perf" and things like that "vmlinux" # for "perf" and things like that
] ++ optional isModular "modules"; ]
++ optional isModular "modules"
++ extraMakeFlags;
installFlags = [ installFlags = [
"INSTALLKERNEL=${installkernel}" "INSTALLKERNEL=${installkernel}"
@ -307,7 +311,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat
enableParallelBuilding = true; enableParallelBuilding = true;
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk zstd ] nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk zstd python3Minimal ]
++ optional (stdenv.hostPlatform.linux-kernel.target == "uImage") buildPackages.ubootTools ++ optional (stdenv.hostPlatform.linux-kernel.target == "uImage") buildPackages.ubootTools
++ optional (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") libelf ++ optional (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") libelf
# Removed util-linuxMinimal since it should not be a dependency. # Removed util-linuxMinimal since it should not be a dependency.
@ -325,7 +329,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat
"ARCH=${stdenv.hostPlatform.linuxArch}" "ARCH=${stdenv.hostPlatform.linuxArch}"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}" "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
]; ] ++ extraMakeFlags;
karch = stdenv.hostPlatform.linuxArch; karch = stdenv.hostPlatform.linuxArch;
}) })

View file

@ -2,7 +2,7 @@
buildGoModule rec { buildGoModule rec {
pname = "consul"; pname = "consul";
version = "1.10.0"; version = "1.10.1";
rev = "v${version}"; rev = "v${version}";
# Note: Currently only release tags are supported, because they have the Consul UI # Note: Currently only release tags are supported, because they have the Consul UI
@ -17,7 +17,7 @@ buildGoModule rec {
owner = "hashicorp"; owner = "hashicorp";
repo = pname; repo = pname;
inherit rev; inherit rev;
sha256 = "sha256:0gc5shz1nbya7jdkggw2izbw1p4lwkbqgbc5ihlvnwrfdgksfqqd"; sha256 = "sha256-oap0pXqtIbT9wMfD/RuJ2tTRynSvfzsgL8TyY4nj3sM=";
}; };
passthru.tests.consul = nixosTests.consul; passthru.tests.consul = nixosTests.consul;
@ -26,7 +26,7 @@ buildGoModule rec {
# has a split module structure in one repo # has a split module structure in one repo
subPackages = ["." "connect/certgen"]; subPackages = ["." "connect/certgen"];
vendorSha256 = "sha256:0sxnnzzsp58ma42ylysdgxibqf65f4f9vbf8c20r44426vg75as7"; vendorSha256 = "sha256-DloQGxeooVhYWA5/ICkL2UEQvNPilb2F5pst78UzWPI=";
doCheck = false; doCheck = false;

View file

@ -17,7 +17,9 @@ stdenv.mkDerivation rec {
sha256 = "1afclc57b9017a73mfs9w7lbdvdipmf9q0xdk116f61gnvyix2np"; sha256 = "1afclc57b9017a73mfs9w7lbdvdipmf9q0xdk116f61gnvyix2np";
}; };
nativeBuildInputs = [ pkg-config ]; strictDeps = true;
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [ glib.dev ];
buildInputs = [ libX11 libXmu glib ]; buildInputs = [ libX11 libXmu glib ];
patches = [ ./64-bit-data.patch ]; patches = [ ./64-bit-data.patch ];

View file

@ -1,6 +1,7 @@
{ lib, stdenv, fetchurl, pam, xmlsec }: { lib, stdenv, fetchurl, pam, xmlsec }:
let let
# TODO: Switch to OpenPAM once https://gitlab.com/oath-toolkit/oath-toolkit/-/issues/26 is addressed upstream
securityDependency = securityDependency =
if stdenv.isDarwin then xmlsec if stdenv.isDarwin then xmlsec
else pam; else pam;
@ -16,6 +17,8 @@ in stdenv.mkDerivation rec {
buildInputs = [ securityDependency ]; buildInputs = [ securityDependency ];
configureFlags = lib.optionals stdenv.isDarwin [ "--disable-pam" ];
passthru.updateScript = ./update.sh; passthru.updateScript = ./update.sh;
meta = with lib; { meta = with lib; {

View file

@ -26,7 +26,7 @@
let let
mkElpaPackages = { pkgs, lib }: import ../applications/editors/emacs/elisp-packages/elpa-packages.nix { mkElpaPackages = { pkgs, lib }: import ../applications/editors/emacs/elisp-packages/elpa-packages.nix {
inherit (pkgs) stdenv texinfo writeText; inherit (pkgs) stdenv texinfo writeText gcc;
inherit lib; inherit lib;
}; };
@ -44,7 +44,7 @@ let
}; };
emacsWithPackages = { pkgs, lib }: import ../build-support/emacs/wrapper.nix { emacsWithPackages = { pkgs, lib }: import ../build-support/emacs/wrapper.nix {
inherit (pkgs) makeWrapper runCommand; inherit (pkgs) makeWrapper runCommand gcc;
inherit (pkgs.xorg) lndir; inherit (pkgs.xorg) lndir;
inherit lib; inherit lib;
}; };