Skip to content

Commit

Permalink
Merge pull request #118312 from NixOS/staging-next
Browse files Browse the repository at this point in the history
Staging next
  • Loading branch information
FRidh authored Apr 9, 2021
2 parents 842f900 + c876eb9 commit 0656d54
Show file tree
Hide file tree
Showing 210 changed files with 836 additions and 590 deletions.
6 changes: 2 additions & 4 deletions nixos/modules/config/users-groups.nix
Original file line number Diff line number Diff line change
Expand Up @@ -556,10 +556,8 @@ in {
install -m 0700 -d /root
install -m 0755 -d /home
${pkgs.perl}/bin/perl -w \
-I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix} \
-I${pkgs.perlPackages.JSON}/${pkgs.perl.libPrefix} \
${./update-users-groups.pl} ${spec}
${pkgs.perl.withPackages (p: [ p.FileSlurp p.JSON ])}/bin/perl \
-w ${./update-users-groups.pl} ${spec}
'';

# for backwards compatibility
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/installer/tools/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let
name = "nixos-generate-config";
src = ./nixos-generate-config.pl;
path = lib.optionals (lib.elem "btrfs" config.boot.supportedFilesystems) [ pkgs.btrfs-progs ];
perl = "${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix}";
perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl";
inherit (config.system.nixos-generate-config) configuration desktopConfiguration;
xserverEnabled = config.services.xserver.enable;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ let
dir = "bin";
src = ./command-not-found.pl;
isExecutable = true;
inherit (pkgs) perl;
inherit (cfg) dbPath;
perlFlags = concatStrings (map (path: "-I ${path}/${pkgs.perl.libPrefix} ")
[ pkgs.perlPackages.DBI pkgs.perlPackages.DBDSQLite pkgs.perlPackages.StringShellQuote ]);
perl = pkgs.perl.withPackages (p: [ p.DBDSQLite p.StringShellQuote ]);
};

in
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! @perl@/bin/perl -w @perlFlags@
#! @perl@/bin/perl -w

use strict;
use DBI;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/system/activation/switch-to-configuration.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! @perl@
#! @perl@/bin/perl

use strict;
use warnings;
Expand Down
3 changes: 1 addition & 2 deletions nixos/modules/system/activation/top-level.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ let
configurationName = config.boot.loader.grub.configurationName;

# Needed by switch-to-configuration.

perl = "${pkgs.perl}/bin/perl " + (concatMapStringsSep " " (lib: "-I${lib}/${pkgs.perl.libPrefix}") (with pkgs.perlPackages; [ FileSlurp NetDBus XMLParser XMLTwig ]));
perl = pkgs.perl.withPackages (p: with p; [ FileSlurp NetDBus XMLParser XMLTwig ]);
};

# Handle assertions and warnings
Expand Down
8 changes: 6 additions & 2 deletions nixos/modules/system/boot/loader/grub/grub.nix
Original file line number Diff line number Diff line change
Expand Up @@ -728,13 +728,17 @@ in
utillinux = pkgs.util-linux;
btrfsprogs = pkgs.btrfs-progs;
};
perl = pkgs.perl.withPackages (p: with p; [
FileSlurp FileCopyRecursive
XMLLibXML XMLSAX XMLSAXBase
ListCompare JSON
]);
in pkgs.writeScript "install-grub.sh" (''
#!${pkgs.runtimeShell}
set -e
export PERL5LIB=${with pkgs.perlPackages; makePerlPath [ FileSlurp FileCopyRecursive XMLLibXML XMLSAX XMLSAXBase ListCompare JSON ]}
${optionalString cfg.enableCryptodisk "export GRUB_ENABLE_CRYPTODISK=y"}
'' + flip concatMapStrings cfg.mirroredBoots (args: ''
${pkgs.perl}/bin/perl ${install-grub-pl} ${grubConfig args} $@
${perl}/bin/perl ${install-grub-pl} ${grubConfig args} $@
'') + cfg.extraInstallCommands);

system.build.grub = grub;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/system/etc/etc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ in
''
# Set up the statically computed bits of /etc.
echo "setting up /etc..."
${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix} ${./setup-etc.pl} ${etc}/etc
${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl ${./setup-etc.pl} ${etc}/etc
'';

};
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/testing/service-runner.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let

makeScript = name: service: pkgs.writeScript "${name}-runner"
''
#! ${pkgs.perl}/bin/perl -w -I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix}
#! ${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl -w
use File::Slurp;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/mpg123/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
}:

stdenv.mkDerivation rec {
name = "mpg123-1.26.4";
name = "mpg123-1.26.5";

src = fetchurl {
url = "mirror://sourceforge/mpg123/${name}.tar.bz2";
sha256 = "sha256-CBmRVA33pmaykEmthw8pPPoohjs2SIq01Yzqp7WEZFQ=";
sha256 = "sha256-UCqX4Nk1vn432YczgCHY8wG641wohPKoPVnEtSRm7wY=";
};

outputs = [ "out" "conplay" ];
Expand Down
16 changes: 4 additions & 12 deletions pkgs/applications/graphics/ImageMagick/7.0.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,19 @@ let
else if stdenv.hostPlatform.system == "aarch64-linux" then "aarch64"
else if stdenv.hostPlatform.system == "powerpc64le-linux" then "ppc64le"
else throw "ImageMagick is not supported on this platform.";

cfg = {
version = "7.0.11-3";
sha256 = "sha256-y937OxAHNTbWa96oQmTpp/ivxtPVL16hr4SvzZWugQo=";
patches = [];
};
in

stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "imagemagick";
inherit (cfg) version;
version = "7.0.11-5";

src = fetchFromGitHub {
owner = "ImageMagick";
repo = "ImageMagick";
rev = cfg.version;
inherit (cfg) sha256;
rev = version;
sha256 = "sha256-HJUC8lUHORZMHvSv1/EYM+JOsd89quFaU1Fz08AckG8=";
};

patches = cfg.patches;

outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big
outputMan = "out"; # it's tiny

Expand Down
11 changes: 2 additions & 9 deletions pkgs/applications/graphics/feh/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, makeWrapper
, xorg, imlib2, libjpeg, libpng
, curl, libexif, jpegexiforient, perlPackages
, curl, libexif, jpegexiforient, perl
, enableAutoreload ? !stdenv.hostPlatform.isDarwin }:

with lib;
Expand Down Expand Up @@ -31,14 +31,7 @@ stdenv.mkDerivation rec {
--add-flags '--theme=feh'
'';

checkInputs = [ perlPackages.perl perlPackages.TestCommand ];
preCheck = ''
export PERL5LIB="${perlPackages.TestCommand}/${perlPackages.perl.libPrefix}"
'';
postCheck = ''
unset PERL5LIB
'';

checkInputs = lib.singleton (perl.withPackages (p: [ p.TestCommand ]));
doCheck = true;

meta = {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/gnome-usage/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

stdenv.mkDerivation rec {
pname = "gnome-usage";
version = "3.38.0";
version = "3.38.1";

src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0mqs39yi2cqwkzlmmgzrszsva5hbdpws6zk4lbi4w2cjzl185mcl";
sha256 = "mMdm4X4VZXEfx0uaJP0u0NX618y0VRlhLdTiFHaO05M=";
};

nativeBuildInputs = [
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/networking/cluster/istioctl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

buildGoModule rec {
pname = "istioctl";
version = "1.9.1";
version = "1.9.2";

src = fetchFromGitHub {
owner = "istio";
repo = "istio";
rev = version;
sha256 = "sha256-WcIcI+y8tTY0YfyuR/DUCjN1xbGpCOBWvEHBo+q2EV8=";
sha256 = "sha256-co/0ogI48FxrwVGwIuMqeFPFYtQF4/rv9V6b225TZc4=";
};
vendorSha256 = "sha256-pSiJfQTvJ6OisdrWTH6mOcAn/wBA1OcVaGtOwBe1qvQ=";
vendorSha256 = "sha256-yJHYyRPl1V1WNV0nJoR3bRTTGRTQaT/tG4TSQeL5U88=";

doCheck = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ assert sendEmailSupport -> perlSupport;
assert svnSupport -> perlSupport;

let
version = "2.31.0";
version = "2.31.1";
svn = subversionClient.override { perlBindings = perlSupport; };

gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
Expand All @@ -36,7 +36,7 @@ stdenv.mkDerivation {

src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "0h4sg3xqa9pd2agrd7m18sqg319ls978d39qswyf30rjvg5n5wg8";
sha256 = "10367n5sv4nsgaxy486pbp7nscx34vjk8vrb06jm9ffm8ix42qcz";
};

outputs = [ "out" ] ++ lib.optional withManual "doc";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/fetchgit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
inherit (lib) removeSuffix splitString last;
base = last (splitString ":" (baseNameOf (removeSuffix "/" url)));

matched = builtins.match "(.*).git" base;
matched = builtins.match "(.*)\\.git" base;

short = builtins.substring 0 7 rev;

Expand Down
15 changes: 3 additions & 12 deletions pkgs/build-support/writers/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,9 @@ rec {
# print "Howdy!\n" if true;
# ''
writePerl = name: { libraries ? [] }:
let
perl-env = pkgs.buildEnv {
name = "perl-environment";
paths = libraries;
pathsToLink = [
"/${pkgs.perl.libPrefix}"
];
};
in
makeScriptWriter {
interpreter = "${pkgs.perl}/bin/perl -I ${perl-env}/${pkgs.perl.libPrefix}";
} name;
makeScriptWriter {
interpreter = "${pkgs.perl.withPackages (p: libraries)}/bin/perl";
} name;

# writePerlBin takes the same arguments as writePerl but outputs a directory (like writeScriptBin)
writePerlBin = name:
Expand Down
5 changes: 3 additions & 2 deletions pkgs/data/misc/cacert/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
with lib;

let
version = "3.60";
version = "3.63";

underscoreVersion = builtins.replaceStrings ["."] ["_"] version;
in

Expand All @@ -19,7 +20,7 @@ stdenv.mkDerivation {

src = fetchurl {
url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/nss-${version}.tar.gz";
sha256 = "hKvVV1q4dMU65RG9Rh5dCGjRobOE7kB1MVTN0dWQ/j0=";
sha256 = "0892xbjcaw6g4rd2rs4qa37nbda248cjrgxa4faaw0licbpjyb8q";
};

certdata2pem = fetchurl {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];

patches = [
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
./find-darwin-sdk-version.patch # don't test for macOS being >= 10.15
]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
++ lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;
++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;


# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
Expand Down
12 changes: 6 additions & 6 deletions pkgs/development/compilers/llvm/10/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let
'';
in {

llvm = callPackage ./llvm.nix { };
llvm = callPackage ./llvm { };

clang-unwrapped = callPackage ./clang {
inherit (tools) lld;
Expand Down Expand Up @@ -77,9 +77,9 @@ let
extraBuildCommands = mkExtraBuildCommands cc;
};

lld = callPackage ./lld.nix {};
lld = callPackage ./lld {};

lldb = callPackage ./lldb.nix {};
lldb = callPackage ./lldb {};

# Below, is the LLVM bootstrapping logic. It handles building a
# fully LLVM toolchain from scratch. No GCC toolchain should be
Expand Down Expand Up @@ -163,7 +163,7 @@ let
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
in {

compiler-rt = callPackage ./compiler-rt.nix ({} //
compiler-rt = callPackage ./compiler-rt ({} //
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
}));
Expand All @@ -177,15 +177,15 @@ let
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
}));

libcxxabi = callPackage ./libc++abi.nix ({} //
libcxxabi = callPackage ./libc++abi ({} //
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
libunwind = libraries.libunwind;
}));

openmp = callPackage ./openmp.nix {};

libunwind = callPackage ./libunwind.nix ({} //
libunwind = callPackage ./libunwind ({} //
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stdenv.mkDerivation {
"-DLIBCXXABI_ENABLE_SHARED=OFF"
];

patches = [ ./libcxxabi-no-threads.patch ];
patches = [ ./no-threads.patch ];

postUnpack = ''
unpackFile ${libcxx.src}
Expand All @@ -32,7 +32,7 @@ stdenv.mkDerivation {
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
'' + lib.optionalString stdenv.hostPlatform.isWasm ''
patch -p1 -d $(ls -d llvm-*) -i ${./libcxxabi-wasm.patch}
patch -p1 -d $(ls -d llvm-*) -i ${./wasm.patch}
'';

installPhase = if stdenv.isDarwin
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ stdenv.mkDerivation (rec {

src = fetch pname "051p5b04y6z3g730rmc2n2v71lipbw7k69riww3a6sl74myfiaq7";

patches = [ ./lldb-procfs.patch ];
patches = [ ./procfs.patch ];

nativeBuildInputs = [ cmake python3 which swig lit ]
++ lib.optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ in stdenv.mkDerivation (rec {
''
# Patch llvm-config to return correct library path based on --link-{shared,static}.
+ optionalString (enableSharedLibraries) ''
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
patch -p1 < ./llvm-outputs.patch
substitute '${./outputs.patch}' ./outputs.patch --subst-var lib
patch -p1 < ./outputs.patch
'' + ''
# FileSystem permissions tests fail with various special bits
substituteInPlace unittests/Support/CMakeLists.txt \
--replace "Path.cpp" ""
rm unittests/Support/Path.cpp
'' + optionalString stdenv.hostPlatform.isMusl ''
patch -p1 -i ${../TLI-musl.patch}
patch -p1 -i ${../../TLI-musl.patch}
substituteInPlace unittests/Support/CMakeLists.txt \
--replace "add_subdirectory(DynamicLibrary)" ""
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];

patches = [
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
./compiler-rt-X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
++ lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;
++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;


# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
Expand Down
Loading

0 comments on commit 0656d54

Please sign in to comment.