···23232424 postInstall = "rm $out/sbin/insmod.static"; # don't need it
25252626- # We don't want bash (and therefore glibc) in the closure of the
2727- # output, since we want to put this in a initrd.
2828- dontPatchShebangs = stdenv ? isDietLibC;
2929-3026 meta = {
3127 homepage = http://www.kernel.org/pub/linux/utils/kernel/module-init-tools/;
3228 description = "Tools for loading and managing Linux kernel modules";
-30
pkgs/stdenv/adapters.nix
···2929 overrideSetup = stdenv: setupScript: stdenv.override { inherit setupScript; };
303031313232- # Return a modified stdenv that uses dietlibc to create small
3333- # statically linked binaries.
3434- useDietLibC = stdenv: stdenv //
3535- { mkDerivation = args: stdenv.mkDerivation (args // {
3636- NIX_CFLAGS_LINK = "-static";
3737-3838- # libcompat.a contains some commonly used functions.
3939- NIX_LDFLAGS = "-lcompat";
4040-4141- # These are added *after* the command-line flags, so we'll
4242- # always optimise for size.
4343- NIX_CFLAGS_COMPILE =
4444- args.NIX_CFLAGS_COMPILE or ""
4545- + " -Os -s -D_BSD_SOURCE=1";
4646-4747- configureFlags =
4848- args.configureFlags or ""
4949- + " --disable-shared"; # brrr...
5050-5151- NIX_GCC = import ../build-support/gcc-wrapper {
5252- inherit stdenv;
5353- libc = pkgs.dietlibc;
5454- inherit (stdenv.gcc) gcc binutils nativeTools nativePrefix;
5555- nativeLibc = false;
5656- };
5757- });
5858- isDietLibC = true;
5959- };
6060-6161-6232 # Return a modified stdenv that uses klibc to create small
6333 # statically linked binaries.
6434 useKlibc = stdenv: klibc: stdenv //