nixpkgs/pkgs/build-support
Alyssa Ross 8aa8e0ce7f
nixos/udev: compress all firmware if supported
This should be a significant disk space saving for most NixOS
installations.  This method is a bit more complicated than doing it in
the postInstall for the firmware derivations, but this way it's
automatic, so each firmware package doesn't have to separately
implement its compression.

Currently, only xz compression is supported, but it's likely that
future versions of Linux will additionally support zstd, so I've
written the code in such a way that it would be very easy to implement
zstd compression for those kernels when they arrive, falling back to
xz for older (current) kernels.

I chose the highest possible level of compression (xz -9) because even
at this level, decompression time is negligible.  Here's how long it took
to decompress every firmware file my laptop uses:

	i915/kbl_dmc_ver1_04.bin                  	2ms
	regulatory.db                             	4ms
	regulatory.db.p7s                         	3ms
	iwlwifi-7265D-29.ucode                    	62ms
	9d71-GOOGLE-EVEMAX-0-tplg.bin             	22ms
	intel/dsp_fw_kbl.bin                      	65ms
	dsp_lib_dsm_core_spt_release.bin          	6ms
	intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq	7ms

And since booting NixOS is a parallel process, it's unlikely (but
difficult to measure) that the time to user interaction was held up at
all by most of these.

Fixes (partially?) #148197
2022-05-13 14:36:34 +00:00
..
add-opengl-runpath
agda Merge pull request #98214 from turion/dev_test_all_agda_packages 2021-10-19 09:56:50 +02:00
alternatives lapack,blas: allow for more flexible use of ILP64 interface 2022-02-11 17:51:35 +01:00
appimage Merge pull request #161739 from Artturin/gsettingsfhsenv 2022-03-15 00:03:56 +02:00
bintools-wrapper Check link type based on expanded parameters 2022-01-01 20:30:56 +08:00
build-bazel-package buildBazelPackage: Pass --curses=no for terse logs 2021-12-04 23:36:40 +00:00
build-fhs-userenv buildFHSUserEnv: append graphics share to XDG_DATA_DIR 2022-03-24 12:53:39 -07:00
build-fhs-userenv-bubblewrap Merge pull request #164825 from ilya-fedin/fhs-less-copy 2022-04-11 16:37:01 +03:00
build-graalvm-native-image buildGraalvmNativeImage: mark as broken if Native Image is not available 2022-04-15 23:20:52 +01:00
build-setupcfg
buildenv lib: make extendDerivation lighter on eval 2021-10-15 16:39:10 +02:00
cc-wrapper cc-wrapper: change cflags order from cc/crt1/libc to crt1/libc/cc 2022-02-20 10:45:45 +00:00
coq coqPackages: etc 2022-05-12 06:11:43 +02:00
dhall dhallDirectoryToNix: add this utility function 2021-12-07 13:36:21 +09:00
docker testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
dotnet nuget-to-nix: include required dependencies 2022-04-30 18:24:48 -07:00
emacs emacsWrapper: add missing variable substitutions to Darwin app 2022-04-22 04:20:00 +00:00
expand-response-params
fake-nss fakeNss: move to toplevel 2022-03-24 18:47:30 +01:00
fetchbitbucket
fetchbower
fetchbzr
fetchcvs
fetchdarcs
fetchdocker
fetchfirefoxaddon testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
fetchfossil
fetchgit testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
fetchgitea
fetchgithub fetchFromGitHub: perserve originating position 2022-02-10 10:18:16 -08:00
fetchgitiles
fetchgitlab fetchgitlab: fix unexpected argument 2021-11-18 21:53:46 +03:00
fetchgitlocal
fetchgx
fetchhg
fetchipfs treewide: clean up obsolete version checks 2022-03-22 10:54:11 +00:00
fetchmavenartifact
fetchmtn misc: Replace tab indentation with spaces 2021-11-14 16:04:46 +13:00
fetchnextcloudapp treewide: remove nativeBuildInputs that are in stdenv 2022-04-16 21:46:46 +03:00
fetchpatch testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
fetchrepoorcz
fetchrepoproject
fetchs3
fetchsavannah
fetchsourcehut fetchFromSourcehut: allow recursive fetching 2022-01-03 16:37:16 +07:00
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchurl Merge pull request #169005 from SuperSandro2000/devilutionX 2022-04-20 22:00:07 +02:00
fetchzip fetchzip: remove need for overrideAttrs 2022-02-26 08:58:08 -08:00
flutter flutter.mkFlutterApp: fix installing .desktop 2022-02-23 15:10:59 +01:00
go garble: 20200107 -> 0.5.1, switch to go_1_17 2022-01-30 07:42:46 +10:00
icon-conv-tools
install-shell-files
java canonicalize-jars-hook: add 2021-10-27 13:21:27 +03:00
kernel nixos/udev: compress all firmware if supported 2022-05-13 14:36:34 +00:00
libredirect Merge remote-tracking branch 'nixpkgs/staging-next' into staging 2022-01-24 15:39:34 +00:00
make-darwin-bundle Merge pull request #165111 from toonn/darwin-bundle-outputBin 2022-04-22 12:04:09 +01:00
make-desktopitem build-support/makeDesktopItem: remove workaround, fix quoting 2022-03-10 13:30:45 +03:00
make-startupitem
make-symlinks
mkshell mkShell: make it buildable (#153194) 2022-01-08 01:54:04 +01:00
mono-dll-fixer mono-dll-fixer: remove builder.sh 2021-11-20 18:01:00 +01:00
nix-gitignore treewide: clean up obsolete version checks 2022-03-22 10:54:11 +00:00
node/fetch-yarn-deps testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
nuke-references
ocaml treewide: Simplify negated uses of versionAtLeast, versionOlder 2022-04-25 13:35:24 -07:00
oci-tools
pkg-config-wrapper pkg-config: make comment clearer for non-natives 2021-12-02 16:11:43 -08:00
prefer-remote-fetch
references-by-popularity
release releaseTools.antBuild: remove 2021-10-27 13:21:27 +03:00
remove-references-to
replace-secret
rust buildRustCrate: set meta.mainProgram to crateName 2022-05-05 14:25:27 +00:00
setup-hooks makeBinaryWrapper: really unset NIX_CFLAGS 2022-05-06 17:03:52 +02:00
singularity-tools singularity: enable setting vm mem in buildImage 2022-03-03 17:09:48 -05:00
skaware skawarePackages.buildPackage: fix typo in comment 2022-05-09 15:52:56 +00:00
snap
src-only
substitute
substitute-files
templaterpm
testers testers.nixosTest: Remove redundant system.stateVersion = lib.trivial.release; 2022-05-09 14:33:49 +02:00
trivial-builders treewide: nixosTest -> testers.nixosTest 2022-05-09 14:16:06 +02:00
vm vmTools/test: fix pcmanfm instead of pan 2021-12-31 16:47:22 +01:00
wrapper-common Quote variable references (#144838) 2021-11-09 19:55:40 +09:00
writers treewide: remove nativeBuildInputs that are in stdenv 2022-04-16 21:46:46 +03:00
build-maven.nix
build-pecl.nix
closure-info.nix
plugins.nix
replace-dependency.nix
setup-systemd-units.nix
source-from-head-fun.nix
trivial-builders.nix testers.testVersion: move from trivial-builders.nix 2022-04-22 16:22:40 +03:00