diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix index eb17e9fc60c3..0fd7062ac6cd 100644 --- a/pkgs/tools/filesystems/e2fsprogs/default.nix +++ b/pkgs/tools/filesystems/e2fsprogs/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, fetchurl, fetchpatch, pkgconfig, libuuid, gettext, texinfo }: +{ stdenv, buildPackages, fetchurl, fetchpatch, pkgconfig, libuuid, gettext, texinfo, shared ? true }: stdenv.mkDerivation rec { pname = "e2fsprogs"; @@ -36,7 +36,9 @@ stdenv.mkDerivation rec { configureFlags = if stdenv.isLinux then [ - "--enable-elf-shlibs" + # It seems that the e2fsprogs is one of the few packages that cannot be + # build with shared and static libs. + (if shared then "--enable-elf-shlibs" else "--disable-elf-shlibs") "--enable-symlink-install" "--enable-relative-symlinks" "--with-crond-dir=no" diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 98a75e2df879..687086b6ed3b 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -115,14 +115,15 @@ in { } // optionalAttrs super.stdenv.hostPlatform.isDarwin { pythonSupport = false; }); - zlib = (super.zlib.override { + zlib = super.zlib.override { static = true; shared = false; + splitStaticOutput = false; # Don’t use new stdenv zlib because # it doesn’t like the --disable-shared flag stdenv = super.stdenv; - }).static; + }; xz = super.xz.override { enableStatic = true; }; @@ -214,6 +215,10 @@ in { gssSupport = false; }; + e2fsprogs = super.e2fsprogs.override { + shared = false; + }; + brotli = super.brotli.override { staticOnly = true; };