Merge pull request #20641 from mayflower/fix/installer-closure-size

Reduce closure size of installer images
This commit is contained in:
Eelco Dolstra 2016-11-23 12:49:46 +01:00 committed by GitHub
commit d97a379510
7 changed files with 36 additions and 14 deletions

View File

@ -25,6 +25,6 @@ stdenv.mkDerivation {
# Generate the squashfs image. # Generate the squashfs image.
mksquashfs nix-path-registration $storePaths $out \ mksquashfs nix-path-registration $storePaths $out \
-keep-as-directory -all-root -keep-as-directory -all-root -comp xz
''; '';
} }

View File

@ -7,7 +7,7 @@
# Include some utilities that are useful for installing or repairing # Include some utilities that are useful for installing or repairing
# the system. # the system.
environment.systemPackages = [ environment.systemPackages = [
pkgs.w3m # needed for the manual anyway pkgs.w3m-nox # needed for the manual anyway
pkgs.testdisk # useful for repairing boot problems pkgs.testdisk # useful for repairing boot problems
pkgs.mssys # for writing Microsoft boot sectors / MBRs pkgs.mssys # for writing Microsoft boot sectors / MBRs
pkgs.efibootmgr pkgs.efibootmgr
@ -42,8 +42,6 @@
# Some compression/archiver tools. # Some compression/archiver tools.
pkgs.unzip pkgs.unzip
pkgs.zip pkgs.zip
pkgs.dar # disk archiver
pkgs.cabextract
]; ];
# Include support for various filesystems. # Include support for various filesystems.

View File

@ -14,4 +14,6 @@ with lib;
programs.man.enable = mkDefault false; programs.man.enable = mkDefault false;
programs.info.enable = mkDefault false; programs.info.enable = mkDefault false;
sound.enable = mkDefault false;
} }

View File

@ -2,16 +2,19 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "giblib-1.2.4"; name = "giblib-1.2.4";
src = fetchurl { src = fetchurl {
url = "http://linuxbrit.co.uk/downloads/${name}.tar.gz"; url = "http://linuxbrit.co.uk/downloads/${name}.tar.gz";
sha256 = "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"; sha256 = "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp";
}; };
buildInputs = [xlibsWrapper imlib2]; buildInputs = [ xlibsWrapper ];
propagatedBuildInputs = [ imlib2 ];
meta = { meta = {
homepage = http://linuxbrit.co.uk/giblib/; homepage = http://linuxbrit.co.uk/giblib/;
description = "wrapper library for imlib2, and other stuff";
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
license = stdenv.lib.licenses.mit;
}; };
} }

View File

@ -1,4 +1,8 @@
{ stdenv, fetchurl, xlibsWrapper, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig }: { stdenv, fetchurl, libjpeg, libtiff, giflib, libpng, bzip2, pkgconfig
, freetype
, x11Support ? true, xlibsWrapper ? null }:
with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "imlib2-1.4.9"; name = "imlib2-1.4.9";
@ -8,7 +12,8 @@ stdenv.mkDerivation rec {
sha256 = "08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x"; sha256 = "08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x";
}; };
buildInputs = [ xlibsWrapper libjpeg libtiff giflib libpng bzip2 ]; buildInputs = [ libjpeg libtiff giflib libpng bzip2 freetype ]
++ optional x11Support xlibsWrapper;
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
@ -21,7 +26,14 @@ stdenv.mkDerivation rec {
# Do not build amd64 assembly code on Darwin, because it fails to compile # Do not build amd64 assembly code on Darwin, because it fails to compile
# with unknow directive errors # with unknow directive errors
configureFlags = if stdenv.isDarwin then [ "--enable-amd64=no" ] else null; configureFlags = optional stdenv.isDarwin "--enable-amd64=no"
++ optional (!x11Support) "--without-x";
outputs = [ "out" "bin" "dev" ];
postInstall = ''
moveToOutput bin/imlib2-config "$dev"
'';
meta = { meta = {
description = "Image manipulation library"; description = "Image manipulation library";
@ -34,8 +46,8 @@ stdenv.mkDerivation rec {
easily, without sacrificing speed. easily, without sacrificing speed.
''; '';
license = stdenv.lib.licenses.free; license = licenses.free;
platforms = stdenv.lib.platforms.unix; platforms = platforms.unix;
maintainers = with stdenv.lib.maintainers; [ spwhitt ]; maintainers = with maintainers; [ spwhitt ];
}; };
} }

View File

@ -27,6 +27,8 @@ with stdenv.lib;
MODULE_COMPRESS_XZ y MODULE_COMPRESS_XZ y
''} ''}
KERNEL_XZ y
# Debugging. # Debugging.
DEBUG_KERNEL y DEBUG_KERNEL y
TIMER_STATS y TIMER_STATS y

View File

@ -7452,6 +7452,9 @@ in
iml = callPackage ../development/libraries/iml { }; iml = callPackage ../development/libraries/iml { };
imlib2 = callPackage ../development/libraries/imlib2 { }; imlib2 = callPackage ../development/libraries/imlib2 { };
imlib2-nox = imlib2.override {
x11Support = false;
};
imlibsetroot = callPackage ../applications/graphics/imlibsetroot { libXinerama = xorg.libXinerama; } ; imlibsetroot = callPackage ../applications/graphics/imlibsetroot { libXinerama = xorg.libXinerama; } ;
@ -15103,13 +15106,15 @@ in
# Version without X11 # Version without X11
w3m-nox = w3m.override { w3m-nox = w3m.override {
x11Support = false; x11Support = false;
imlib2 = imlib2-nox;
}; };
# Version for batch text processing, not a good browser # Version for batch text processing, not a good browser
w3m-batch = w3m.override { w3m-batch = w3m.override {
graphicsSupport = false; graphicsSupport = false;
x11Support = false;
mouseSupport = false; mouseSupport = false;
x11Support = false;
imlib2 = imlib2-nox;
}; };
weechat = callPackage ../applications/networking/irc/weechat { weechat = callPackage ../applications/networking/irc/weechat {