Skip to content

Commit

Permalink
treewide: remove static packages
Browse files Browse the repository at this point in the history
Nixpkgs is meant to link everything dynamically. We don’t want to
expose static packages at the top level. If some package needs
statically built binaries, it should use a custom override.
  • Loading branch information
matthewbauer committed Dec 5, 2018
1 parent a3a6ad7 commit b966d3c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 24 deletions.
9 changes: 2 additions & 7 deletions pkgs/tools/system/proot/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ stdenv, fetchFromGitHub, fetchpatch
, talloc, docutils
, enableStatic ? true }:
, talloc, docutils }:

({ version, rev, sha256, patches }: stdenv.mkDerivation {
name = "proot-${version}";
Expand All @@ -12,17 +11,13 @@
owner = "cedric-vincent";
};

buildInputs = [ talloc ] ++ stdenv.lib.optional enableStatic stdenv.cc.libc.static;
buildInputs = [ talloc ];
nativeBuildInputs = [ docutils ];

enableParallelBuilding = true;

inherit patches;

preBuild = stdenv.lib.optionalString enableStatic ''
export LDFLAGS="-static"
'';

makeFlags = [ "-C src" ];

postBuild = ''
Expand Down
34 changes: 17 additions & 17 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3488,9 +3488,7 @@ in
buildGoPackage = buildGo110Package;
};

ipmitool = callPackage ../tools/system/ipmitool {
static = false;
};
ipmitool = callPackage ../tools/system/ipmitool { };

ipmiutil = callPackage ../tools/system/ipmiutil {};

Expand Down Expand Up @@ -3983,8 +3981,6 @@ in

libiberty = callPackage ../development/libraries/libiberty { };

libiberty_static = libiberty.override { staticBuild = true; };

libxc = callPackage ../development/libraries/libxc { };

libxcomp = callPackage ../development/libraries/libxcomp { };
Expand Down Expand Up @@ -4902,7 +4898,9 @@ in
plowshare = callPackage ../tools/misc/plowshare { };

pngcheck = callPackage ../tools/graphics/pngcheck {
zlib = zlibStatic;
zlib = zlib.override {
static = true;
};
};

pngcrush = callPackage ../tools/graphics/pngcrush { };
Expand Down Expand Up @@ -5210,7 +5208,7 @@ in
routino = callPackage ../tools/misc/routino { };

rq = callPackage ../development/tools/rq {
v8 = v8_static;
v8 = v8.override { static = true; };
};

rsnapshot = callPackage ../tools/backup/rsnapshot { };
Expand Down Expand Up @@ -8028,7 +8026,9 @@ in
tcl-8_5 = callPackage ../development/interpreters/tcl/8.5.nix { };
tcl-8_6 = callPackage ../development/interpreters/tcl/8.6.nix { };

proglodyte-wasm = callPackage ../development/interpreters/proglodyte-wasm { };
proglodyte-wasm = callPackage ../development/interpreters/proglodyte-wasm {
v8_static = v8.override { static = true; };
};

wasm-gc = callPackage ../development/interpreters/wasm-gc { };

Expand Down Expand Up @@ -8450,7 +8450,9 @@ in

lattice-diamond = callPackage ../development/tools/lattice-diamond { };

distcc = callPackage ../development/tools/misc/distcc { };
distcc = callPackage ../development/tools/misc/distcc {
libiberty_static = libiberty.override { staticBuild = true; };
};

# distccWrapper: wrapper that works as gcc or g++
# It can be used by setting in nixpkgs config like this, for example:
Expand Down Expand Up @@ -8811,7 +8813,9 @@ in

openocd = callPackage ../development/tools/misc/openocd { };

oprofile = callPackage ../development/tools/profiling/oprofile { };
oprofile = callPackage ../development/tools/profiling/oprofile {
libiberty_static = libiberty.override { staticBuild = true; };
};

pahole = callPackage ../development/tools/misc/pahole {};

Expand Down Expand Up @@ -12712,8 +12716,6 @@ in
stdenv = overrideCC stdenv gcc6;
});

v8_static = lowPrio (res.v8.override { static = true; });

vaapiIntel = callPackage ../development/libraries/vaapi-intel { };

vaapi-intel-hybrid = callPackage ../development/libraries/vaapi-intel-hybrid { };
Expand Down Expand Up @@ -12948,10 +12950,6 @@ in

zlog = callPackage ../development/libraries/zlog { };

zlibStatic = lowPrio (appendToName "static" (zlib.override {
static = true;
}));

zeromq3 = callPackage ../development/libraries/zeromq/3.x.nix {};
zeromq4 = callPackage ../development/libraries/zeromq/4.x.nix {};
zeromq = zeromq4;
Expand Down Expand Up @@ -20610,7 +20608,9 @@ in
openspades = callPackage ../games/openspades { };

openttd = callPackage ../games/openttd {
zlib = zlibStatic;
zlib = zlib.override {
static = true;
};
};

opentyrian = callPackage ../games/opentyrian { };
Expand Down

0 comments on commit b966d3c

Please sign in to comment.