diff --git a/pkgs/development/compilers/llvm/7/llvm/default.nix b/pkgs/development/compilers/llvm/7/llvm/default.nix index cfa4fdf7ac337..bc4accb43eaa7 100644 --- a/pkgs/development/compilers/llvm/7/llvm/default.nix +++ b/pkgs/development/compilers/llvm/7/llvm/default.nix @@ -49,7 +49,7 @@ in stdenv.mkDerivation ({ outputs = [ "out" "lib" "dev" "python" ]; - nativeBuildInputs = [ cmake python3 ] + nativeBuildInputs = [ cmake python3 python3.pkgs.psutil ] ++ optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 libffi ] diff --git a/pkgs/development/tools/misc/autoconf/default.nix b/pkgs/development/tools/misc/autoconf/default.nix index ac342086f6c51..b8b82a5929070 100644 --- a/pkgs/development/tools/misc/autoconf/default.nix +++ b/pkgs/development/tools/misc/autoconf/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { # fix stale autom4te cache race condition: # https://savannah.gnu.org/support/index.php?110521 ./2.71-fix-race.patch + + ./uutils-mkdirp.patch ]; nativeBuildInputs = [ m4 perl ]; @@ -35,14 +37,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; # Make the Autotest test suite run in parallel. - preCheck ='' + preCheck = '' export TESTSUITEFLAGS="-j$NIX_BUILD_CORES" ''; - meta = { + meta = with lib; { homepage = "https://www.gnu.org/software/autoconf/"; description = "Part of the GNU Build System"; - longDescription = '' GNU Autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code @@ -52,9 +53,8 @@ stdenv.mkDerivation rec { file that lists the operating system features that the package can use, in the form of M4 macro calls. ''; - - license = lib.licenses.gpl3Plus; - - platforms = lib.platforms.all; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ SuperSandro2000 ]; }; } diff --git a/pkgs/development/tools/misc/autoconf/uutils-mkdirp.patch b/pkgs/development/tools/misc/autoconf/uutils-mkdirp.patch new file mode 100644 index 0000000000000..2d2d966a8568d --- /dev/null +++ b/pkgs/development/tools/misc/autoconf/uutils-mkdirp.patch @@ -0,0 +1,12 @@ +--- a/lib/autoconf/programs.m4 ++++ b/lib/autoconf/programs.m4 +@@ -672,7 +672,8 @@ + case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir ('*'coreutils) '* | \ + 'BusyBox '* | \ +- 'mkdir (fileutils) '4.1*) ++ 'mkdir (fileutils) '4.1* | \ ++ 'mkdir 0.0.'*) + ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + break 3;; + esac diff --git a/pkgs/tools/misc/uutils-coreutils/default.nix b/pkgs/tools/misc/uutils-coreutils/default.nix index 2fb3196b1f4fc..6aaffdae50e6d 100644 --- a/pkgs/tools/misc/uutils-coreutils/default.nix +++ b/pkgs/tools/misc/uutils-coreutils/default.nix @@ -1,15 +1,20 @@ { lib , stdenv , fetchFromGitHub +, unstableGitUpdater , rustPlatform , cargo -, sphinx , Security , libiconv -, prefix ? "uutils-" +, withDocs ? true +, sphinx +, withPrefix ? false , buildMulticallBinary ? true }: +let + prefix = "uutils-"; +in stdenv.mkDerivation rec { pname = "uutils-coreutils"; version = "0.0.12"; @@ -18,16 +23,24 @@ stdenv.mkDerivation rec { owner = "uutils"; repo = "coreutils"; rev = version; - sha256 = "01zwvadfd570vbsy52svp0vi5r2p873c33vn2h4mr7868myl6q9g"; + name = "${pname}-${version}"; + sha256 = "sha256-N2CuMkhYFKsvshHXDVqe0itYuS+a9njathBjj3N/RGI="; }; + postPatch = '' + # don't enforce the building of the man page + substituteInPlace GNUmakefile \ + --replace 'install: build' 'install:' + ''; + cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256:19li3gmb5dmrmiiiy9ihr1rl68lz14j2gsgqpjcsn52rkcy17dzh"; + hash = "sha256-zuJAVxt3mfw5JBjaulyXNK0Q+geItPF7+JKMZhcT3TU="; }; - nativeBuildInputs = [ rustPlatform.cargoSetupHook sphinx ]; + nativeBuildInputs = [ rustPlatform.cargoSetupHook ] + ++ lib.optional withDocs sphinx; buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ]; @@ -36,12 +49,17 @@ stdenv.mkDerivation rec { "PREFIX=${placeholder "out"}" "PROFILE=release" "INSTALLDIR_MAN=${placeholder "out"}/share/man/man1" - ] ++ lib.optionals (prefix != null) [ "PROG_PREFIX=${prefix}" ] - ++ lib.optionals buildMulticallBinary [ "MULTICALL=y" ]; + ] ++ lib.optionals withPrefix [ "PROG_PREFIX=${prefix}" ] + ++ lib.optionals buildMulticallBinary [ "MULTICALL=y" ] + ++ lib.optionals (!withDocs) [ "build-coreutils" "build-pkgs" ]; # too many impure/platform-dependent tests doCheck = false; + passthru.updateScript = unstableGitUpdater { + url = "https://github.com/uutils/coreutils.git"; + }; + meta = with lib; { description = "Cross-platform Rust rewrite of the GNU coreutils"; longDescription = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e15190d837dd..2762ccdcd640e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -66,6 +66,30 @@ with pkgs; gccStdenvNoLibs = mkStdenvNoLibs gccStdenv; clangStdenvNoLibs = mkStdenvNoLibs clangStdenv; + stdenvUutilsCoreutils = let + uutils-coreutils = pkgs.uutils-coreutils-minimal; + bintools = wrapBintoolsWith { + bintools = stdenv.cc.bintools.bintools; + coreutils = uutils-coreutils; + }; + in stdenv.override { + cc = stdenv.cc.override { + coreutils = uutils-coreutils; + inherit bintools; + }; + + initialPath = (lib.remove coreutils stdenv.initialPath) ++ [ uutils-coreutils ]; + allowedRequisites = lib.mapNullable (rs: (lib.remove [ + bintools + bintools.expand-response-params + coreutils + ] rs) ++ [ + bintools + bintools.expand-response-params + uutils-coreutils + ]) (stdenv.allowedRequisites or null); + }; + # For convenience, allow callers to get the path to Nixpkgs. path = config.path; @@ -4408,9 +4432,11 @@ with pkgs; cpcfs = callPackage ../tools/filesystems/cpcfs { }; - coreutils = callPackage ../tools/misc/coreutils { }; - coreutils-full = coreutils.override { minimal = false; }; - coreutils-prefixed = coreutils.override { withPrefix = true; singleBinary = false; }; + # By declaring coreutils explicitly we can overwrite it globally without causing infinite loops + coreutils = if stdenv.hostPlatform.useUutilsCoreutils or false then uutils-coreutils else gnu-coreutils; + gnu-coreutils = callPackage ../tools/misc/coreutils { }; + coreutils-full = gnu-coreutils.override { minimal = false; }; + coreutils-prefixed = gnu-coreutils.override { withPrefix = true; singleBinary = false; }; corkscrew = callPackage ../tools/networking/corkscrew { }; @@ -4965,6 +4991,10 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + uutils-coreutils-prefixed = pkgs.uutils-coreutils.override { withPrefix = true; }; + + uutils-coreutils-minimal = pkgs.uutils-coreutils.override { withDocs = false; }; + volctl = callPackage ../tools/audio/volctl { }; volk = callPackage ../development/libraries/volk { }; @@ -5311,7 +5341,9 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; - findutils = callPackage ../tools/misc/findutils { }; + findutils = callPackage ../tools/misc/findutils { + coreutils = if stdenv.hostPlatform.useUutilsCoreutils or false then uutils-coreutils-minimal else gnu-coreutils; + }; finger_bsd = callPackage ../tools/networking/bsd-finger { }; diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 9d34ddb3685fb..7adc79fd8fae4 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -179,6 +179,19 @@ let }; }; + pkgsUutils = if stdenv.hostPlatform.isLinux then nixpkgsFun { + overlays = [ + (self': super': { + pkgsUutils = super'; + }) + ] ++ overlays; + # due to the increased size of the stdenv we need to cheat a bit + crossSystem = stdenv.hostPlatform // { + useUutilsCoreutils = true; + config = "${stdenv.hostPlatform.linuxArch}-pc-linux-gnu"; + }; + } else throw "Musl libc only supports Linux systems."; + # All packages built with the Musl libc. This will override the # default GNU libc on Linux systems. Non-Linux systems are not # supported.