Merge pull request #173909 from Artturin/strictdeps2

This commit is contained in:
Artturi 2022-05-23 16:19:35 +03:00 committed by GitHub
commit b82c7826da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 58 additions and 15 deletions

View file

@ -3,6 +3,7 @@
stdenv.mkDerivation {
name = "expand-response-params";
src = ./expand-response-params.c;
strictDeps = true;
# Work around "stdenv-darwin-boot-2 is not allowed to refer to path
# /nix/store/...-expand-response-params.c"
unpackPhase = ''

View file

@ -14,6 +14,7 @@ let
mirrorsFile =
buildPackages.stdenvNoCC.mkDerivation ({
name = "mirrors-list";
strictDeps = true;
builder = ./write-mirror-list.sh;
preferLocalBuild = true;
} // mirrors);

View file

@ -14,6 +14,7 @@ in
stdenvNoCC.mkDerivation {
name = "nuke-references";
strictDeps = true;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;

View file

@ -44,6 +44,7 @@ stdenv.mkDerivation {
inherit pkg-config;
};
strictDeps = true;
dontBuild = true;
dontConfigure = true;
@ -80,8 +81,6 @@ stdenv.mkDerivation {
ln -s ${pkg-config}/share $out/share
'';
strictDeps = true;
wrapperName = "PKG_CONFIG_WRAPPER";
setupHooks = [

View file

@ -68,6 +68,7 @@ rec {
# extra arguments to pass to stdenv.mkDerivation
, name
# name of the resulting derivation
# TODO(@Artturin): enable strictDeps always
}: buildCommand:
stdenv.mkDerivation ({
inherit buildCommand name;
@ -527,6 +528,7 @@ rec {
runCommand name
(substitutions // {
inherit meta;
strictDeps = true;
})
(''
mkdir -p $out/nix-support

View file

@ -27,6 +27,7 @@ let
inherit sha256;
};
strictDeps = true;
# TODO: Add a "dev" output containing the header files.
outputs = [ "out" "man" "devdoc" ] ++
optional crossCompiling "mini";

View file

@ -104,8 +104,6 @@ let
version = with sourceVersion; "${major}.${minor}.${patch}${suffix}";
strictDeps = true;
nativeBuildInputs = optionals (!stdenv.isDarwin) [
autoreconfHook
pkg-config
@ -186,7 +184,8 @@ in with passthru; stdenv.mkDerivation {
pname = "python3";
inherit version;
inherit buildInputs nativeBuildInputs;
inherit nativeBuildInputs;
buildInputs = [ bash ] ++ buildInputs; # bash is only for patchShebangs
src = fetchurl {
url = with sourceVersion; "https://www.python.org/ftp/python/${major}.${minor}.${patch}/Python-${version}.tar.xz";
@ -465,7 +464,7 @@ in with passthru; stdenv.mkDerivation {
preFixup = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
# Ensure patch-shebangs uses shebangs of host interpreter.
export PATH=${lib.makeBinPath [ "$out" bash ]}:$PATH
export PATH=${lib.makeBinPath [ "$out" ]}:$PATH
'';
# Add CPython specific setup-hook that configures distutils.sysconfig to

View file

@ -231,6 +231,8 @@ in {
enableLTO = false;
mimetypesSupport = false;
} // sources.python39)).overrideAttrs(old: {
# TODO(@Artturin): Add this to the main cpython expr
strictDeps = true;
pname = "python3-minimal";
meta = old.meta // {
maintainers = [];

View file

@ -5,6 +5,7 @@ sitePackages:
let
hook = ./setup-hook.sh;
in runCommand "python-setup-hook.sh" {
strictDeps = true;
inherit sitePackages;
} ''
cp ${hook} hook.sh

View file

@ -23,6 +23,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-95uPkEt0nj4NIK/q3s+CScVbLjLU67CJrjeN9HncryU=";
};
strictDeps = true;
outputs = [ "out" "dev" ]; # TODO: fix referrers
outputBin = "dev";

View file

@ -203,6 +203,7 @@ stdenv.mkDerivation ({
outputs = [ "out" "bin" "dev" "static" ];
strictDeps = true;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ bison python3Minimal ] ++ extraNativeBuildInputs;
buildInputs = [ linuxHeaders ] ++ lib.optionals withGd [ gd libpng ] ++ extraBuildInputs;

View file

@ -7,7 +7,7 @@ callPackage ./common.nix {} {
configureFlags = [ "--enable-add-ons" ];
buildInputs = [ texinfo perl ];
extraNativeBuildInputs = [ texinfo perl ];
buildPhase = "make info";

View file

@ -8,7 +8,7 @@
# `glibc` needs to be overridden here because it's still needed to `./configure` the source in order
# to have a build environment where we can call the needed make target.
glibc.overrideAttrs ({ meta ? {}, ... }: {
glibc.overrideAttrs (oldAttrs: {
pname = "glibc-mtrace";
buildPhase = ''
@ -25,14 +25,16 @@ glibc.overrideAttrs ({ meta ? {}, ... }: {
mv malloc/mtrace $out/bin/
'';
# Perl interpreter used for `mtrace`.
buildInputs = [ perl ];
# Perl checked during configure
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ perl ];
# Perl shebang used for `mtrace`.
buildInputs = oldAttrs.buildInputs ++ [ perl ];
# Reset a few things declared by `pkgs.glibc`.
outputs = [ "out" ];
separateDebugInfo = false;
meta = meta // {
meta = oldAttrs.meta // {
description = "Perl script used to interpret and provide human readable output of the trace log contained in the file mtracedata, whose contents were produced by mtrace(3).";
};
})

View file

@ -28,6 +28,7 @@ let self = stdenv.mkDerivation rec {
outputs = [ "out" "dev" "info" ];
passthru.static = self.out;
strictDeps = true;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ m4 ];

View file

@ -18,6 +18,7 @@ stdenv.mkDerivation {
inherit patches;
strictDeps = true;
buildInputs = [ gmp ];
inherit configureFlags;

View file

@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
# on Darwin, so disable NLS for now.
++ lib.optional stdenv.hostPlatform.isDarwin "--disable-nls";
strictDeps = true;
nativeBuildInputs =
if stdenv.hostPlatform.isNetBSD then [ netbsd.gencat ] else [ gettext ]
# Need to regenerate configure script with newer version in order to pass

View file

@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
patches = [];
strictDeps = true;
outputs = [ "out" "dev" "man" "info" ];
configureFlags = [

View file

@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-dpQM1Od46Ak1eanRlbJf/16Tbp3GJCBoUotDenZ2T5E=";
};
strictDeps = true;
outputs = [ "bin" "dev" "out" "info" "devdoc" ];
patches = optional stdenv.isDarwin ./fix-error-darwin.patch;

View file

@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
sha256 = "0n846hqfqvmsmim7qdlms0qr86f1hck19p12nq3g3z2x74n3sl0p";
};
strictDeps = true;
buildInputs = [ gmp mpfr ];
doCheck = true; # not cross;

View file

@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "info" "doc" ];
strictDeps = true;
propagatedBuildInputs = lib.optional (!stdenv.isLinux) libiconv;
configureFlags = [

View file

@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "doc" "info" ];
strictDeps = true;
# mpfr.h requires gmp.h
propagatedBuildInputs = [ gmp ];

View file

@ -44,6 +44,7 @@ stdenv.mkDerivation (rec {
./fix-configure-issue-cross.patch
];
strictDeps = true;
outputs = [ "out" "dev" ]
++ lib.optional splitStaticOutput "static";
setOutputFlags = false;

View file

@ -9,6 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-6KbrnSjdy6j/7z+iEWUyOem/I5q6agGmt8/Hzq7GnL0=";
};
strictDeps = true;
buildInputs = [ xz ];
meta = with lib; {

View file

@ -20,6 +20,7 @@ stdenv.mkDerivation rec {
./2.71-fix-race.patch
];
strictDeps = true;
nativeBuildInputs = [ m4 perl texinfo ];
buildInputs = [ m4 ];
postBuild = "

View file

@ -9,6 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0sdl32qxdy7m06iggmkkvf7j520rmmgbsjzbm7fgnxwxdp6mh7gh";
};
strictDeps = true;
nativeBuildInputs = [ autoconf perl ];
buildInputs = [ autoconf ];

View file

@ -109,6 +109,7 @@ stdenv.mkDerivation {
outputs = [ "out" "info" "man" ];
strictDeps = true;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
bison

View file

@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-swapHA/ZO8QoDPwumMt6s5gf91oYe+oyk4EfRSyJqMg=";
};
strictDeps = true;
doCheck = false;
configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ]

View file

@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
substituteInPlace build-aux/ltmain.in --replace '#! /usr/bin/env sh' '#!${runtimeShell}'
'';
strictDeps = true;
nativeBuildInputs = [ autoconf automake help2man m4 perl ];
propagatedBuildInputs = [ m4 file ];

View file

@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-uaRvKYkyLrifpPYjfiCDbFe0VapDoyVF6gk7Qx2YL1w=";
};
strictDeps = true;
setupHook = [ ./setup-hook.sh ];
# fails 8 out of 24 tests, problems when loading libc.so.6

View file

@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
};
outputs = [ "out" "man" "doc" ];
strictDeps = true;
# Process Requires.private properly, see
# http://bugs.freedesktop.org/show_bug.cgi?id=4738, migrated to

View file

@ -1,6 +1,6 @@
{ version, sha256, patches ? [] }:
{ lib, stdenv, buildPackages, fetchurl, perl, xz, gettext
{ lib, stdenv, buildPackages, fetchurl, perl, xz, libintl, bash
# we are a dependency of gcc, this simplifies bootstraping
, interactive ? false, ncurses, procps
@ -33,13 +33,13 @@ stdenv.mkDerivation {
NATIVE_TOOLS_CFLAGS = if crossBuildTools then "-I${getDev buildPackages.ncurses}/include" else null;
NATIVE_TOOLS_LDFLAGS = if crossBuildTools then "-L${getLib buildPackages.ncurses}/lib" else null;
strictDeps = true;
# We need a native compiler to build perl XS extensions
# when cross-compiling.
depsBuildBuild = [ buildPackages.stdenv.cc perl ];
buildInputs = [ xz.bin ]
buildInputs = [ xz.bin bash libintl ]
++ optionals stdenv.isSunOS [ libiconv gawk ]
++ optionals stdenv.isDarwin [ gettext ]
++ optional interactive ncurses;
configureFlags = [ "PERL=${buildPackages.perl}/bin/perl" ]

View file

@ -18,6 +18,11 @@ stdenv.mkDerivation rec {
# Otherwise tests fail due to incorrect unicode symbol oconversion.
configurePlatforms = [ "build" "host" ];
# there's a /bin/sh shebang in bin/yacc which when no strictDeps is patched with the build stdenv shell
# however when cross-compiling it would still be patched with the build stdenv shell which would be wrong
# cannot add bash to buildInputs due to infinite recursion
strictDeps = stdenv.hostPlatform != stdenv.buildPlatform;
nativeBuildInputs = [ m4 perl ] ++ lib.optional stdenv.isSunOS help2man;
propagatedBuildInputs = [ m4 ];

View file

@ -14,6 +14,7 @@ let
ARCH = stdenvNoCC.hostPlatform.linuxArch;
strictDeps = true;
# It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.
# We do this so we have a build->build, not build->host, C compiler.
depsBuildBuild = [ buildPackages.stdenv.cc ];

View file

@ -162,6 +162,7 @@ in
# stage1.
${localSystem.libc} = self.stdenv.mkDerivation {
pname = "bootstrap-stage0-${localSystem.libc}";
strictDeps = true;
version = "bootstrap";
buildCommand = ''
mkdir -p $out
@ -269,6 +270,7 @@ in
inherit (prevStage.bintools.bintools) name;
dontUnpack = true;
dontBuild = true;
strictDeps = true;
# We wouldn't need to *copy* all, but it's easier and the result is temporary anyway.
installPhase = ''
mkdir -p "$out"/bin

View file

@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-FnhwNy4OHe8d5M6iYCClkxzcB/EHXg0veXwv43ZlxbA=";
};
strictDeps = true;
nativeBuildInputs = [ autoreconfHook ];
patches = [

View file

@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
sha256 = "1ps2i8i212n0f4xpq6clp7h13q7m1y8slqvxha9i8d0bj0qgj5si";
};
strictDeps = true;
outputs = [ "bin" "dev" "out" "man" "doc" ];
configureFlags = lib.optional enableStatic "--disable-shared";

View file

@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-E+Uyx7Nk99V+I9/uoxRxAxUMuQWTpXr4bBDk9uQRYD8=";
};
strictDeps = true;
nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file;
buildInputs = [ zlib ]
++ lib.optional stdenv.hostPlatform.isWindows libgnurx;

View file

@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "1bgafvy3ypbhhfznwjv1lxmd6mci3x1byilnnkc7gcr486wlb8pl";
};
strictDeps = true;
meta = with lib; {
homepage = "https://www.gnu.org/software/which/";
description = "Shows the full path of (shell) commands";

View file

@ -18803,7 +18803,7 @@ with pkgs;
glibcIconv = libc: let
inherit (libc) pname version;
libcDev = lib.getDev libc;
in runCommand "${pname}-iconv-${version}" {} ''
in runCommand "${pname}-iconv-${version}" { strictDeps = true; } ''
mkdir -p $out/include
ln -sv ${libcDev}/include/iconv.h $out/include
'';

View file

@ -12373,6 +12373,7 @@ let
LocaleGettext = buildPerlPackage {
pname = "gettext";
version = "1.07";
strictDeps = true;
buildInputs = [ pkgs.gettext ];
src = fetchurl {
url = "mirror://cpan/authors/id/P/PV/PVANDRY/gettext-1.07.tar.gz";