Merge pull request #107238 from Ericson2314/no-static-overlay

treewide: Start to break up static overlay
This commit is contained in:
John Ericson 2021-01-03 15:15:49 -05:00 committed by GitHub
commit b3f29f3817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 179 additions and 197 deletions

View File

@ -7,7 +7,12 @@
, profiledCompiler ? false
, langJit ? false
, staticCompiler ? false
, enableShared ? true
, # N.B. the defult is intentionally not from an `isStatic`. See
# https://gcc.gnu.org/install/configure.html - this is about target
# platform libraries not host platform ones unlike normal. But since
# we can't rebuild those without also rebuilding the compiler itself,
# we opt to always build everything unlike our usual policy.
enableShared ? true
, enableLTO ? true
, texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man)
@ -137,10 +142,10 @@ stdenv.mkDerivation ({
)
else "")
+ stdenv.lib.optionalString targetPlatform.isAvr ''
makeFlagsArray+=(
'LIMITS_H_TEST=false'
)
'';
makeFlagsArray+=(
'LIMITS_H_TEST=false'
)
'';
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw;

View File

@ -7,7 +7,12 @@
, profiledCompiler ? false
, langJit ? false
, staticCompiler ? false
, enableShared ? true
, # N.B. the defult is intentionally not from an `isStatic`. See
# https://gcc.gnu.org/install/configure.html - this is about target
# platform libraries not host platform ones unlike normal. But since
# we can't rebuild those without also rebuilding the compiler itself,
# we opt to always build everything unlike our usual policy.
enableShared ? true
, enableLTO ? true
, texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java

View File

@ -7,7 +7,12 @@
, profiledCompiler ? false
, langJit ? false
, staticCompiler ? false
, enableShared ? true
, # N.B. the defult is intentionally not from an `isStatic`. See
# https://gcc.gnu.org/install/configure.html - this is about target
# platform libraries not host platform ones unlike normal. But since
# we can't rebuild those without also rebuilding the compiler itself,
# we opt to always build everything unlike our usual policy.
enableShared ? true
, enableLTO ? true
, texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java

View File

@ -8,7 +8,12 @@
, profiledCompiler ? false
, langJit ? false
, staticCompiler ? false
, enableShared ? true
, # N.B. the defult is intentionally not from an `isStatic`. See
# https://gcc.gnu.org/install/configure.html - this is about target
# platform libraries not host platform ones unlike normal. But since
# we can't rebuild those without also rebuilding the compiler itself,
# we opt to always build everything unlike our usual policy.
enableShared ? true
, enableLTO ? true
, texinfo ? null
, flex

View File

@ -6,7 +6,12 @@
, profiledCompiler ? false
, langJit ? false
, staticCompiler ? false
, enableShared ? true
, # N.B. the defult is intentionally not from an `isStatic`. See
# https://gcc.gnu.org/install/configure.html - this is about target
# platform libraries not host platform ones unlike normal. But since
# we can't rebuild those without also rebuilding the compiler itself,
# we opt to always build everything unlike our usual policy.
enableShared ? true
, enableLTO ? true
, texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man)

View File

@ -6,7 +6,12 @@
, profiledCompiler ? false
, langJit ? false
, staticCompiler ? false
, enableShared ? true
, # N.B. the defult is intentionally not from an `isStatic`. See
# https://gcc.gnu.org/install/configure.html - this is about target
# platform libraries not host platform ones unlike normal. But since
# we can't rebuild those without also rebuilding the compiler itself,
# we opt to always build everything unlike our usual policy.
enableShared ? true
, enableLTO ? true
, texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man)
@ -134,10 +139,10 @@ stdenv.mkDerivation ({
)
else "")
+ stdenv.lib.optionalString targetPlatform.isAvr ''
makeFlagsArray+=(
'LIMITS_H_TEST=false'
)
'';
makeFlagsArray+=(
'LIMITS_H_TEST=false'
)
'';
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw;

View File

@ -8,7 +8,12 @@
, profiledCompiler ? false
, langJit ? false
, staticCompiler ? false
, enableShared ? true
, # N.B. the defult is intentionally not from an `isStatic`. See
# https://gcc.gnu.org/install/configure.html - this is about target
# platform libraries not host platform ones unlike normal. But since
# we can't rebuild those without also rebuilding the compiler itself,
# we opt to always build everything unlike our usual policy.
enableShared ? true
, enableLTO ? true
, texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man)

View File

@ -1,5 +1,6 @@
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
, enableShared ? true }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++";

View File

@ -1,5 +1,6 @@
{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version
, enableShared ? true }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++abi";

View File

@ -1,4 +1,6 @@
{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
{ stdenv, version, fetch, cmake, fetchpatch
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "libunwind";

View File

@ -1,5 +1,6 @@
{ lib, stdenv, fetch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
, enableShared ? true }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++";

View File

@ -1,5 +1,6 @@
{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version
, enableShared ? true }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++abi";

View File

@ -1,4 +1,6 @@
{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
{ stdenv, version, fetch, cmake, fetchpatch
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "libunwind";

View File

@ -1,5 +1,6 @@
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
, enableShared ? ! stdenv.hostPlatform.isMusl }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++";

View File

@ -1,7 +1,8 @@
{ stdenv, cmake, fetch, libcxx, llvm, version
, standalone ? false
# on musl the shared objects don't build
, enableShared ? ! stdenv.hostPlatform.isMusl }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++abi";

View File

@ -1,5 +1,6 @@
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
, enableShared ? true }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++";

View File

@ -1,5 +1,6 @@
{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version
, enableShared ? true }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++abi";

View File

@ -1,4 +1,6 @@
{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
{ stdenv, version, fetch, cmake, fetchpatch
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libunwind";

View File

@ -1,5 +1,6 @@
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
, enableShared ? true }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++";

View File

@ -1,5 +1,6 @@
{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version
, enableShared ? true }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++abi";

View File

@ -1,4 +1,6 @@
{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
{ stdenv, version, fetch, cmake, fetchpatch
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "libunwind";

View File

@ -1,7 +1,8 @@
{ stdenv, lib, fetchurl, fetchFromGitHub, fetchpatch, fixDarwinDylibNames
, autoconf, boost, brotli, cmake, flatbuffers, gflags, glog, gtest, lz4
, perl, python3, rapidjson, snappy, thrift, utf8proc, which, zlib, zstd
, enableShared ? true }:
, enableShared ? !stdenv.hostPlatform.isStatic
}:
let
arrow-testing = fetchFromGitHub {

View File

@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
#
# There might be a more sensible way to do this with autotools, but I am not
# smart enough to discover it.
preBuild = lib.optionalString stdenv.targetPlatform.isStatic ''
preBuild = lib.optionalString stdenv.hostPlatform.isStatic ''
make -C libaudiofile $makeFlags
sed -i "s/dependency_libs=.*/dependency_libs=' -lstdc++'/" libaudiofile/libaudiofile.la
'';

View File

@ -8,7 +8,7 @@
, enableDebug ? false
, enableSingleThreaded ? false
, enableMultiThreaded ? true
, enableShared ? !(stdenv.hostPlatform.libc == "msvcrt") # problems for now
, enableShared ? !(with stdenv.hostPlatform; isStatic || libc == "msvcrt") # problems for now
, enableStatic ? !enableShared
, enablePython ? false
, enableNumpy ? false

View File

@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, fetchpatch, cmake, enableShared ? true }:
{ stdenv, fetchFromGitHub, fetchpatch, cmake
, enableShared ? !stdenv.hostPlatform.isStatic
}:
let
generic = { version, sha256, patches ? [ ] }:

View File

@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, cmake, enableShared ? true}:
{ stdenv, fetchFromGitHub, cmake
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "gflags";

View File

@ -1,4 +1,7 @@
{ stdenv, fetchurl, m4, cxx ? true, withStatic ? true }:
{ stdenv, fetchurl, m4
, cxx ? true
, withStatic ? stdenv.hostPlatform.isStatic
}:
let inherit (stdenv.lib) optional; in

View File

@ -1,7 +1,8 @@
{ stdenv, fetchurl, m4
, cxx ? !stdenv.hostPlatform.useAndroidPrebuilt && !stdenv.hostPlatform.isWasm
, buildPackages
, withStatic ? false }:
, withStatic ? stdenv.hostPlatform.isStatic
}:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or

View File

@ -1,4 +1,7 @@
{ stdenv, callPackage, fetchFromGitHub, enableStatic ? false, enableShared ? true }:
{ stdenv, callPackage, fetchFromGitHub
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !stdenv.hostPlatform.isStatic
}:
let
yesno = b: if b then "yes" else "no";
in stdenv.mkDerivation rec {

View File

@ -1,4 +1,7 @@
{ stdenv, fetchurl, fetchpatch, enableStatic ? true, enableShared ? true }:
{ stdenv, fetchurl, fetchpatch
, enableStatic ? true
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "libexecinfo";

View File

@ -1,4 +1,6 @@
{ stdenv, buildPackages, staticBuild ? false }:
{ stdenv, buildPackages
, staticBuild ? stdenv.hostPlatform.isStatic
}:
let inherit (buildPackages.buildPackages) gcc; in

View File

@ -1,6 +1,6 @@
{ fetchurl, stdenv, lib
, enableStatic ? stdenv.hostPlatform.useAndroidPrebuilt
, enableShared ? !stdenv.hostPlatform.useAndroidPrebuilt
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !stdenv.hostPlatform.isStatic
}:
# assert !stdenv.hostPlatform.isLinux || stdenv.hostPlatform != stdenv.buildPlatform; # TODO: improve on cross

View File

@ -1,4 +1,7 @@
{ stdenv, fetchFromGitHub, cmake, nasm, enableStatic ? false, enableShared ? true }:
{ stdenv, fetchFromGitHub, cmake, nasm
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, enableShared ? true }:
{ stdenv, fetchurl
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation (rec {
version = "4.11.0";

View File

@ -1,6 +1,6 @@
{ stdenv, lib, fetchurl, fetchpatch
, zlib, xz, libintl, python, gettext, ncurses, findXMLCatalogs
, pythonSupport ? stdenv.buildPlatform == stdenv.hostPlatform
, pythonSupport ? enableShared && stdenv.buildPlatform == stdenv.hostPlatform
, icuSupport ? false, icu ? null
, enableShared ? stdenv.hostPlatform.libc != "msvcrt"
, enableStatic ? !enableShared,

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, coreutils, gfortran, gnused
, python3, util-linux, which
, enableStatic ? false
, enableStatic ? stdenv.hostPlatform.isStatic
}:
let

View File

@ -3,7 +3,7 @@
, abiVersion ? "6"
, mouseSupport ? false
, unicode ? true
, enableStatic ? stdenv.hostPlatform.useAndroidPrebuilt
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !enableStatic
, withCxx ? !stdenv.hostPlatform.useAndroidPrebuilt

View File

@ -1,8 +1,8 @@
{ stdenv, fetchurl, libxml2, pkgconfig, perl
, compressionSupport ? true, zlib ? null
, sslSupport ? true, openssl ? null
, static ? false
, shared ? true
, static ? stdenv.hostPlatform.isStatic
, shared ? !stdenv.hostPlatform.isStatic
}:
assert compressionSupport -> zlib != null;

View File

@ -2,7 +2,7 @@
, withCryptodev ? false, cryptodev
, enableSSL2 ? false
, enableSSL3 ? false
, static ? false
, static ? stdenv.hostPlatform.isStatic
}:
# Note: this package is used for bootstrapping fetchurl, and thus

View File

@ -10,7 +10,7 @@
, zstd
, enableJemalloc ? false, jemalloc
, enableLite ? false
, enableShared ? true
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {

View File

@ -1,11 +1,12 @@
{ callPackage
{ stdenv
, callPackage
, stdenvNoCC
, fetchurl
, rpmextract
, undmg
, darwin
, validatePkgConfig
, enableStatic ? false
, enableStatic ? stdenv.hostPlatform.isStatic
}:
/*

View File

@ -15,8 +15,8 @@
# Select a specific optimization target (other than the default)
# See https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt
, target ? null
, enableStatic ? false
, enableShared ? true
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !stdenv.hostPlatform.isStatic
}:
with stdenv.lib;

View File

@ -1,5 +1,7 @@
{ stdenv, fetchurl, fetchpatch, boost, zlib, libevent, openssl, python, cmake, pkgconfig
, bison, flex, twisted, static ? false }:
, bison, flex, twisted
, static ? stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "thrift";

View File

@ -1,17 +1,19 @@
{ stdenv
, fetchurl
# Note: If `{ static = false; shared = false; }`, upstream's default is used
# (which is building both static and shared as of zlib 1.2.11).
, shared ? true
, shared ? !stdenv.hostPlatform.isStatic
, static ? true
# If true, a separate .static ouput is created and the .a is moved there.
# In this case `pkg-config` auto detection does not currently work if the
# .static output is given as `buildInputs` to another package (#66461), because
# the `.pc` file lists only the main output's lib dir.
# If false, and if `{ static = true; }`, the .a stays in the main output.
, splitStaticOutput ? static
, splitStaticOutput ? shared && static
}:
# Without either the build will actually still succeed because the build
# system makes an arbitrary choice, but we shouldn't be so indecisive.
assert shared || static;
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
# cgit) that are needed here should be included directly in Nixpkgs as

View File

@ -2,7 +2,7 @@
, fetchFromGitHub, fetchurl, zlib, autoreconfHook, gettext
# Enabling all targets increases output size to a multiple.
, withAllTargets ? false, libbfd, libopcodes
, enableShared ? true
, enableShared ? !stdenv.hostPlatform.isStatic
, noSysDirs
, gold ? !stdenv.buildPlatform.isDarwin || stdenv.hostPlatform == stdenv.targetPlatform
, bison ? null

View File

@ -5,8 +5,8 @@
, Security
, callPackage
, enableShared ? true
, enableStatic ? false
, enableShared ? !stdenv.hostPlatform.isStatic
, enableStatic ? stdenv.hostPlatform.isStatic
, webUISupport ? false
}:

View File

@ -1,6 +1,6 @@
{ stdenv, appleDerivation, lib
, enableStatic ? stdenv.targetPlatform.isiOS
, enableShared ? !stdenv.targetPlatform.isiOS
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !stdenv.hostPlatform.isStatic
}:
appleDerivation {

View File

@ -1,5 +1,5 @@
{ stdenv, lib, buildPackages, fetchurl, fetchFromGitLab
, enableStatic ? false
, enableStatic ? stdenv.hostPlatform.isStatic
, enableMinimal ? false
# Allow forcing musl without switching stdenv itself, e.g. for our bootstrapping:
# nix build -f pkgs/top-level/release.nix stdenvBootstrapTools.x86_64-linux.dist

View File

@ -1,5 +1,9 @@
{ stdenv, lib, buildPackages, fetchurl, attr, perl, pam
, static ? stdenv.targetPlatform.isStatic }:
{ stdenv, lib, buildPackages, fetchurl, attr, perl
, usePam ? !isStatic, pam ? null
, isStatic ? stdenv.hostPlatform.isStatic
}:
assert usePam -> pam != null;
stdenv.mkDerivation rec {
pname = "libcap";
@ -10,21 +14,21 @@ stdenv.mkDerivation rec {
sha256 = "1qf80lifygbnxwvqjf8jz5j24n6fqqx4ixnkbf76xs2vrmcq664j";
};
patches = lib.optional static ./no-shared-lib.patch;
patches = lib.optional isStatic ./no-shared-lib.patch;
outputs = [ "out" "dev" "lib" "man" "doc" ]
++ lib.optional (pam != null) "pam";
++ lib.optional usePam "pam";
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl ];
buildInputs = [ pam ];
buildInputs = lib.optional usePam pam;
propagatedBuildInputs = [ attr ];
makeFlags = [
"lib=lib"
"PAM_CAP=${if pam == null then "no" else "yes"}"
"PAM_CAP=${if usePam then "yes" else "no"}"
"BUILD_CC=$(CC_FOR_BUILD)"
"CC:=$(CC)"
];
@ -48,10 +52,10 @@ stdenv.mkDerivation rec {
installFlags = [ "RAISE_SETFCAP=no" ];
postInstall = ''
${lib.optionalString (!static) ''rm "$lib"/lib/*.a''}
${lib.optionalString (!isStatic) ''rm "$lib"/lib/*.a''}
mkdir -p "$doc/share/doc/${pname}-${version}"
cp License "$doc/share/doc/${pname}-${version}/"
'' + stdenv.lib.optionalString (pam != null) ''
'' + stdenv.lib.optionalString usePam ''
mkdir -p "$pam/lib/security"
mv "$lib"/lib/security "$pam/lib"
'';

View File

@ -1,4 +1,6 @@
{ buildGoModule, fetchFromGitHub, lib, enableStatic ? false }:
{ stdenv, buildGoModule, fetchFromGitHub, lib
, enableStatic ? stdenv.hostPlatform.isStatic
}:
buildGoModule rec {
pname = "gobetween";

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl
, linkStatic ? (stdenv.hostPlatform.system == "i686-cygwin")
, linkStatic ? with stdenv.hostPlatform; isStatic || isCygwin
, autoreconfHook
}:

View File

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, valgrind, fetchpatch
, enableStatic ? false, enableShared ? true
, enableStatic ? stdenv.hostPlatform.isStatic
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, enableStatic ? false }:
{ stdenv, fetchurl
, enableStatic ? stdenv.hostPlatform.isStatic
}:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or

View File

@ -1,5 +1,7 @@
{ stdenv, fetchurl, fetchpatch, lvm2, libuuid, gettext, readline
, util-linux, check, enableStatic ? false }:
, util-linux, check
, enableStatic ? stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
name = "parted-3.1";

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, libpng, static ? false
{ stdenv, fetchurl, libpng
, static ? stdenv.hostPlatform.isStatic
}:
# This package comes with its own copy of zlib, libpng and pngxtern

View File

@ -6,7 +6,7 @@
, zlib ? null
, szip ? null
, mpi ? null
, enableShared ? true
, enableShared ? !stdenv.hostPlatform.isStatic
}:
# cpp and mpi options are mutually exclusive

View File

@ -11,7 +11,7 @@
, python3
, util-linux
, check
, enableStatic ? false
, enableStatic ? stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {

View File

@ -1,7 +1,7 @@
{
stdenv, lib, fetchFromGitHub, which,
buildPackages,
enableStatic ? false,
enableStatic ? stdenv.hostPlatform.isStatic,
enableMinimal ? false,
extraConfig ? ""
}:

View File

@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, glibc, zlib
, enableStatic ? false
, enableStatic ? stdenv.hostPlatform.isStatic
, sftpPath ? "/run/current-system/sw/libexec/sftp-server"
}:

View File

@ -22,7 +22,7 @@ common =
, confDir
, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp
, withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp
, enableStatic ? false
, enableStatic ? stdenv.hostPlatform.isStatic
, name, suffix ? "", src, patches ? []
}:

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, openssl, fetchpatch, static ? false }:
{ stdenv, lib, fetchurl, openssl, fetchpatch, static ? stdenv.hostPlatform.isStatic }:
let
pkgname = "ipmitool";

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, zlib, kmod, which
, static ? stdenv.targetPlatform.isStatic
, static ? stdenv.hostPlatform.isStatic
, darwin ? null
}:

View File

@ -112,87 +112,23 @@ in {
enableApp = false;
};
ncurses = super.ncurses.override {
enableStatic = true;
};
libxml2 = super.libxml2.override ({
enableShared = false;
enableStatic = true;
} // optionalAttrs super.stdenv.hostPlatform.isDarwin {
pythonSupport = false;
});
zlib = super.zlib.override {
static = true;
shared = false;
splitStaticOutput = false;
# Dont use new stdenv zlib because
# it doesnt like the --disable-shared flag
stdenv = super.stdenv;
};
xz = super.xz.override {
enableStatic = true;
};
busybox = super.busybox.override {
enableStatic = true;
};
libiberty = super.libiberty.override {
staticBuild = true;
};
libpfm = super.libpfm.override {
enableShared = false;
};
ipmitool = super.ipmitool.override {
static = true;
};
neon = super.neon.override {
static = true;
shared = false;
};
fmt = super.fmt.override {
enableShared = false;
};
gifsicle = super.gifsicle.override {
static = true;
};
bzip2 = super.bzip2.override {
linkStatic = true;
};
optipng = super.optipng.override {
static = true;
};
openblas = super.openblas.override {
enableStatic = true;
enableShared = false;
};
mkl = super.mkl.override { enableStatic = true; };
nix = super.nix.override { enableStatic = true; };
nixUnstable = super.nixUnstable.override { enableStatic = true; };
openssl = (super.openssl_1_1.override { static = true; }).overrideAttrs (o: {
openssl = super.openssl_1_1.overrideAttrs (o: {
# OpenSSL doesn't like the `--enable-static` / `--disable-shared` flags.
configureFlags = (removeUnknownConfigureFlags o.configureFlags);
});
arrow-cpp = super.arrow-cpp.override {
enableShared = false;
};
boost = super.boost.override {
enableStatic = true;
enableShared = false;
# Dont use new stdenv for boost because it doesnt like the
# --disable-shared flag
stdenv = super.stdenv;
};
thrift = super.thrift.override {
static = true;
twisted = null;
};
gmp = super.gmp.override {
withStatic = true;
};
gflags = super.gflags.override {
enableShared = false;
};
cdo = super.cdo.override {
enable_all_static = true;
};
@ -202,13 +138,6 @@ in {
crc32c = super.crc32c.override {
staticOnly = true;
};
parted = super.parted.override {
enableStatic = true;
};
libiconvReal = super.libiconvReal.override {
enableShared = false;
enableStatic = true;
};
perl = super.perl.override {
# Dont use new stdenv zlib because
# it doesnt like the --disable-shared flag
@ -220,24 +149,9 @@ in {
snappy = super.snappy.override {
static = true;
};
lz4 = super.lz4.override {
enableShared = false;
enableStatic = true;
};
libressl = super.libressl.override {
buildShared = false;
};
libjpeg_turbo = super.libjpeg_turbo.override {
enableStatic = true;
enableShared = false;
};
darwin = super.darwin // {
libiconv = super.darwin.libiconv.override {
enableShared = false;
enableStatic = true;
};
};
kmod = super.kmod.override {
withStatic = true;
@ -260,21 +174,6 @@ in {
static = true;
};
llvmPackages_8 = super.llvmPackages_8 // {
libraries = super.llvmPackages_8.libraries // rec {
libcxxabi = super.llvmPackages_8.libraries.libcxxabi.override {
enableShared = false;
};
libcxx = super.llvmPackages_8.libraries.libcxx.override {
enableShared = false;
inherit libcxxabi;
};
libunwind = super.llvmPackages_8.libraries.libunwind.override {
enableShared = false;
};
};
};
ocaml-ng = self.lib.mapAttrs (_: set:
if set ? overrideScope' then set.overrideScope' ocamlStaticAdapter else set
) super.ocaml-ng;
@ -289,13 +188,6 @@ in {
# Note: -static doesnt work on darwin
libev = super.libev.override { static = !super.stdenv.hostPlatform.isDarwin; };
libexecinfo = super.libexecinfo.override { enableShared = false; };
tree-sitter = super.tree-sitter.override {
enableShared = false;
enableStatic = true;
};
xorg = super.xorg.overrideScope' (xorgself: xorgsuper: {
libX11 = xorgsuper.libX11.overrideAttrs (attrs: {
depsBuildBuild = attrs.depsBuildBuild ++ [ (self.buildPackages.stdenv.cc.libc.static or null) ];
@ -319,6 +211,4 @@ in {
configureFlags = attrs.configureFlags ++ [ "--disable-shared" ];
});
});
libcap = super.libcap.override { pam = null; };
}