summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-03-14 19:12:53 +0100
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-04-04 19:49:52 +0200
commit3453b89f4bba270e2d82f6248b09b9595bb47f4b (patch)
tree4b2b84a0ae5d4ba15360e8317b5dfaefbe7ab340
parentd24e2d1b0ba77da1ea5b91fcf6cf869d42880dc5 (diff)
downloadnixpkgs-3453b89f4bba270e2d82f6248b09b9595bb47f4b.tar
nixpkgs-3453b89f4bba270e2d82f6248b09b9595bb47f4b.tar.gz
nixpkgs-3453b89f4bba270e2d82f6248b09b9595bb47f4b.tar.bz2
nixpkgs-3453b89f4bba270e2d82f6248b09b9595bb47f4b.tar.lz
nixpkgs-3453b89f4bba270e2d82f6248b09b9595bb47f4b.tar.xz
nixpkgs-3453b89f4bba270e2d82f6248b09b9595bb47f4b.tar.zst
nixpkgs-3453b89f4bba270e2d82f6248b09b9595bb47f4b.zip
lzma: deprecate alias
-rw-r--r--pkgs/applications/gis/saga/default.nix4
-rw-r--r--pkgs/applications/graphics/hydrus/default.nix4
-rw-r--r--pkgs/applications/graphics/opentoonz/default.nix4
-rw-r--r--pkgs/applications/kde/akonadi/default.nix4
-rw-r--r--pkgs/applications/networking/browsers/elinks/default.nix4
-rw-r--r--pkgs/applications/networking/compactor/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix4
-rw-r--r--pkgs/applications/office/wpsoffice/default.nix4
-rw-r--r--pkgs/applications/science/biology/bcftools/default.nix4
-rw-r--r--pkgs/applications/science/biology/bedtools/default.nix5
-rw-r--r--pkgs/applications/science/biology/delly/default.nix4
-rw-r--r--pkgs/applications/science/biology/freebayes/default.nix4
-rw-r--r--pkgs/applications/science/biology/kent/default.nix4
-rw-r--r--pkgs/applications/science/biology/octopus/default.nix4
-rw-r--r--pkgs/applications/science/biology/svaba/default.nix4
-rw-r--r--pkgs/applications/science/machine-learning/shogun/default.nix4
-rw-r--r--pkgs/applications/science/misc/root/5.nix4
-rw-r--r--pkgs/applications/science/misc/root/default.nix4
-rw-r--r--pkgs/applications/video/handbrake/default.nix4
-rw-r--r--pkgs/applications/video/kodi-packages/vfs-libarchive/default.nix4
-rw-r--r--pkgs/applications/video/kodi/packages.nix560
-rw-r--r--pkgs/build-support/vm/default.nix2
-rw-r--r--pkgs/development/compilers/graalvm/default.nix4
-rw-r--r--pkgs/development/interpreters/python/cpython/default.nix4
-rw-r--r--pkgs/development/interpreters/python/pypy/default.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg-full/default.nix6
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix4
-rw-r--r--pkgs/development/libraries/flatpak/default.nix4
-rw-r--r--pkgs/development/libraries/folly/default.nix4
-rw-r--r--pkgs/development/libraries/kde-frameworks/karchive.nix4
-rw-r--r--pkgs/development/libraries/libticalcs2/default.nix4
-rw-r--r--pkgs/development/libraries/science/biology/htslib/default.nix4
-rw-r--r--pkgs/development/python-modules/backports_lzma/default.nix4
-rw-r--r--pkgs/development/python-modules/binwalk/default.nix3
-rw-r--r--pkgs/development/python-modules/deeptoolsintervals/default.nix4
-rw-r--r--pkgs/development/python-modules/pysam/default.nix4
-rw-r--r--pkgs/development/python-modules/rpy2/2.nix4
-rw-r--r--pkgs/development/python-modules/rpy2/default.nix4
-rw-r--r--pkgs/development/r-modules/default.nix10
-rw-r--r--pkgs/development/tools/misc/autoconf/2.13.nix4
-rw-r--r--pkgs/development/tools/misc/hydra/common.nix4
-rw-r--r--pkgs/development/tools/misc/texinfo/4.13a.nix4
-rw-r--r--pkgs/development/tools/vogl/default.nix4
-rw-r--r--pkgs/games/freeciv/default.nix4
-rw-r--r--pkgs/games/spring/default.nix4
-rw-r--r--pkgs/misc/emulators/cdemu/libmirage.nix4
-rw-r--r--pkgs/misc/lightspark/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix4
-rw-r--r--pkgs/os-specific/darwin/apple-source-releases/text_cmds/default.nix4
-rw-r--r--pkgs/os-specific/linux/firmware/firmware-manager/default.nix4
-rw-r--r--pkgs/os-specific/linux/firmware/system76-firmware/default.nix4
-rw-r--r--pkgs/os-specific/windows/cygwin-setup/default.nix4
-rw-r--r--pkgs/servers/http/apt-cacher-ng/default.nix4
-rw-r--r--pkgs/tools/archivers/fsarchiver/default.nix4
-rw-r--r--pkgs/tools/archivers/innoextract/default.nix4
-rw-r--r--pkgs/tools/backup/rdedup/default.nix4
-rw-r--r--pkgs/tools/compression/pbzx/default.nix4
-rw-r--r--pkgs/tools/compression/pixz/default.nix4
-rw-r--r--pkgs/tools/compression/pxz/default.nix4
-rw-r--r--pkgs/tools/compression/xar/default.nix4
-rw-r--r--pkgs/tools/filesystems/sasquatch/default.nix3
-rw-r--r--pkgs/tools/misc/fwup/default.nix4
-rw-r--r--pkgs/tools/misc/osinfo-db-tools/default.nix4
-rw-r--r--pkgs/tools/networking/wget2/default.nix4
-rw-r--r--pkgs/tools/package-management/apt/default.nix4
-rw-r--r--pkgs/tools/package-management/opkg/default.nix4
-rw-r--r--pkgs/tools/package-management/pacman/default.nix4
-rw-r--r--pkgs/tools/security/enpass/default.nix4
-rw-r--r--pkgs/tools/security/tor/default.nix4
-rw-r--r--pkgs/tools/system/thermald/default.nix4
-rw-r--r--pkgs/tools/system/vboot_reference/default.nix4
-rw-r--r--pkgs/tools/text/silver-searcher/default.nix4
-rw-r--r--pkgs/tools/text/zimwriterfs/default.nix4
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix1
-rw-r--r--pkgs/top-level/release-small.nix2
76 files changed, 708 insertions, 149 deletions
diff --git a/pkgs/applications/gis/saga/default.nix b/pkgs/applications/gis/saga/default.nix
index c67abe1a743..47defd44c64 100644
--- a/pkgs/applications/gis/saga/default.nix
+++ b/pkgs/applications/gis/saga/default.nix
@@ -12,7 +12,7 @@
 , dxflib
 , curl
 , libiodbc
-, lzma
+, xz
 , libharu
 , opencv
 , vigra
@@ -64,7 +64,7 @@ mkDerivation rec {
     vigra
     postgresql
     libiodbc
-    lzma
+    xz
     qhull
     giflib
   ]
diff --git a/pkgs/applications/graphics/hydrus/default.nix b/pkgs/applications/graphics/hydrus/default.nix
index 365dbb66b65..df1fcc9eb66 100644
--- a/pkgs/applications/graphics/hydrus/default.nix
+++ b/pkgs/applications/graphics/hydrus/default.nix
@@ -1,6 +1,6 @@
 { lib
 , fetchFromGitHub
-, lzma
+, xz
 , qt5
 , wrapQtAppsHook
 , miniupnpc_2
@@ -39,7 +39,7 @@ pythonPackages.buildPythonPackage rec {
     service-identity
     twisted
     lz4
-    lzma
+    xz
     pysocks
     matplotlib
     qtpy
diff --git a/pkgs/applications/graphics/opentoonz/default.nix b/pkgs/applications/graphics/opentoonz/default.nix
index da5aa7bf6ef..14a130d7f41 100644
--- a/pkgs/applications/graphics/opentoonz/default.nix
+++ b/pkgs/applications/graphics/opentoonz/default.nix
@@ -1,5 +1,5 @@
 { boost, cmake, fetchFromGitHub, freeglut, freetype, glew, libjpeg, libmypaint
-, libpng, libtiff, libusb1, lz4, lzma, lzo, openblas, pkg-config, qtbase
+, libpng, libtiff, libusb1, lz4, xz, lzo, openblas, pkg-config, qtbase
 , qtmultimedia, qtscript, lib, stdenv, superlu, wrapQtAppsHook, }:
 let source = import ./source.nix { inherit fetchFromGitHub; };
 in stdenv.mkDerivation rec {
@@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
     libtiff
     libusb1
     lz4
-    lzma
+    xz
     lzo
     openblas
     qtbase
diff --git a/pkgs/applications/kde/akonadi/default.nix b/pkgs/applications/kde/akonadi/default.nix
index 71f9f4f7721..fd662d7e992 100644
--- a/pkgs/applications/kde/akonadi/default.nix
+++ b/pkgs/applications/kde/akonadi/default.nix
@@ -3,7 +3,7 @@
   extra-cmake-modules, shared-mime-info, qtbase, accounts-qt,
   boost, kaccounts-integration, kcompletion, kconfigwidgets, kcrash, kdbusaddons,
   kdesignerplugin, ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mariadb, qttools,
-  signond, lzma,
+  signond, xz,
 }:
 
 mkDerivation {
@@ -21,7 +21,7 @@ mkDerivation {
   nativeBuildInputs = [ extra-cmake-modules shared-mime-info ];
   buildInputs = [
     kaccounts-integration kcompletion kconfigwidgets kcrash kdbusaddons kdesignerplugin
-    ki18n kiconthemes kio kwindowsystem lzma accounts-qt qttools signond
+    ki18n kiconthemes kio kwindowsystem xz accounts-qt qttools signond
   ];
   propagatedBuildInputs = [ boost kitemmodels ];
   outputs = [ "out" "dev" ];
diff --git a/pkgs/applications/networking/browsers/elinks/default.nix b/pkgs/applications/networking/browsers/elinks/default.nix
index e5282d79a28..9a7551a6fff 100644
--- a/pkgs/applications/networking/browsers/elinks/default.nix
+++ b/pkgs/applications/networking/browsers/elinks/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, xlibsWrapper, bzip2, zlib
-, brotli, zstd, lzma, openssl, autoreconfHook, gettext, pkg-config, libev
+, brotli, zstd, xz, openssl, autoreconfHook, gettext, pkg-config, libev
 , gpm, libidn, tre, expat
 , # Incompatible licenses, LGPLv3 - GPLv2
   enableGuile        ? false,                                         guile ? null
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    ncurses xlibsWrapper bzip2 zlib brotli zstd lzma
+    ncurses xlibsWrapper bzip2 zlib brotli zstd xz
     openssl libidn tre expat libev
   ]
     ++ lib.optional stdenv.isLinux gpm
diff --git a/pkgs/applications/networking/compactor/default.nix b/pkgs/applications/networking/compactor/default.nix
index d0db8cc10b9..f4535c9120c 100644
--- a/pkgs/applications/networking/compactor/default.nix
+++ b/pkgs/applications/networking/compactor/default.nix
@@ -1,5 +1,5 @@
 { autoconf, automake, boost, cbor-diag, cddl, fetchFromGitHub, file, libctemplate, libmaxminddb
-, libpcap, libtins, libtool, lzma, openssl, pkg-config, lib, stdenv, tcpdump, wireshark-cli
+, libpcap, libtins, libtool, xz, openssl, pkg-config, lib, stdenv, tcpdump, wireshark-cli
 }:
 
 stdenv.mkDerivation rec {
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
     libpcap
     openssl
     libtins
-    lzma
+    xz
     libctemplate
     libmaxminddb
   ];
diff --git a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix
index 676902d68ef..bfd4f28d0c0 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/default.nix
@@ -1,6 +1,6 @@
 { mkDerivation, lib, fetchFromGitHub, pkg-config, python3, cmake, ninja
 , qtbase, qtimageformats, libdbusmenu, hunspell, xdg-utils, ffmpeg_3, openalSoft
-, lzma, lz4, xxHash, zlib, minizip, openssl, libtgvoip, microsoft_gsl, tl-expected
+, xz, lz4, xxHash, zlib, minizip, openssl, libtgvoip, microsoft_gsl, tl-expected
 , range-v3
 }:
 
@@ -21,7 +21,7 @@ mkDerivation rec {
   nativeBuildInputs = [ pkg-config python3 cmake ninja ];
 
   buildInputs = [
-    qtbase qtimageformats ffmpeg_3 openalSoft lzma lz4 xxHash libdbusmenu
+    qtbase qtimageformats ffmpeg_3 openalSoft xz lz4 xxHash libdbusmenu
     zlib minizip openssl hunspell libtgvoip microsoft_gsl tl-expected range-v3
   ];
 
diff --git a/pkgs/applications/office/wpsoffice/default.nix b/pkgs/applications/office/wpsoffice/default.nix
index fad87d44912..b18f22b6c1d 100644
--- a/pkgs/applications/office/wpsoffice/default.nix
+++ b/pkgs/applications/office/wpsoffice/default.nix
@@ -23,7 +23,7 @@
 , libtool
 , libuuid
 , libxml2
-, lzma
+, xz
 , nspr
 , nss
 , openssl
@@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
     libuuid
     libxcb
     libxml2
-    lzma
+    xz
     nspr
     nss
     openssl
diff --git a/pkgs/applications/science/biology/bcftools/default.nix b/pkgs/applications/science/biology/bcftools/default.nix
index 80506bb79b6..46d39c1a7ba 100644
--- a/pkgs/applications/science/biology/bcftools/default.nix
+++ b/pkgs/applications/science/biology/bcftools/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, htslib, zlib, bzip2, lzma, curl, perl, python3, bash }:
+{ lib, stdenv, fetchurl, htslib, zlib, bzip2, xz, curl, perl, python3, bash }:
 
 stdenv.mkDerivation rec {
   pname = "bcftools";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
     python3
   ];
 
-  buildInputs = [ htslib zlib bzip2 lzma curl ];
+  buildInputs = [ htslib zlib bzip2 xz curl ];
 
   strictDeps = true;
 
diff --git a/pkgs/applications/science/biology/bedtools/default.nix b/pkgs/applications/science/biology/bedtools/default.nix
index f5aad5d0554..aac36d2af31 100644
--- a/pkgs/applications/science/biology/bedtools/default.nix
+++ b/pkgs/applications/science/biology/bedtools/default.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchFromGitHub, zlib, python3, bzip2, lzma}:
+{lib, stdenv, fetchFromGitHub, zlib, python3, bzip2, xz}:
 
 stdenv.mkDerivation rec {
   pname = "bedtools";
@@ -17,7 +17,8 @@ stdenv.mkDerivation rec {
     python3
   ];
 
-  buildInputs = [ zlib bzip2 lzma ];
+  buildInputs = [ zlib bzip2 xz ];
+
   cxx = if stdenv.cc.isClang then "clang++" else "g++";
   cc = if stdenv.cc.isClang then "clang" else "gcc";
   buildPhase = "make prefix=$out SHELL=${stdenv.shell} CXX=${cxx} CC=${cc} -j $NIX_BUILD_CORES";
diff --git a/pkgs/applications/science/biology/delly/default.nix b/pkgs/applications/science/biology/delly/default.nix
index efaa4403f41..fe81ff44d24 100644
--- a/pkgs/applications/science/biology/delly/default.nix
+++ b/pkgs/applications/science/biology/delly/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchpatch, fetchFromGitHub, htslib, zlib, bzip2, lzma, ncurses, boost }:
+{ lib, stdenv, fetchpatch, fetchFromGitHub, htslib, zlib, bzip2, xz, ncurses, boost }:
 
 stdenv.mkDerivation rec {
   pname = "delly";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
       sha256 = "sha256-DWwC35r8cQbePUzppkFQlev0YZdxk2+BSrNTW/DOY3M=";
   };
 
-  buildInputs = [ zlib htslib bzip2 lzma ncurses boost ];
+  buildInputs = [ zlib htslib bzip2 xz ncurses boost ];
 
   EBROOTHTSLIB = htslib;
 
diff --git a/pkgs/applications/science/biology/freebayes/default.nix b/pkgs/applications/science/biology/freebayes/default.nix
index 32ab614b968..8646b8ca54a 100644
--- a/pkgs/applications/science/biology/freebayes/default.nix
+++ b/pkgs/applications/science/biology/freebayes/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, zlib, bzip2, lzma }:
+{ lib, stdenv, fetchFromGitHub, zlib, bzip2, xz }:
 
 stdenv.mkDerivation rec {
   pname = "freebayes";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  buildInputs = [ zlib bzip2 lzma ];
+  buildInputs = [ zlib bzip2 xz ];
 
   installPhase = ''
     install -vD bin/freebayes bin/bamleftalign scripts/* -t $out/bin
diff --git a/pkgs/applications/science/biology/kent/default.nix b/pkgs/applications/science/biology/kent/default.nix
index 26c55d3dc38..12bbfa09c25 100644
--- a/pkgs/applications/science/biology/kent/default.nix
+++ b/pkgs/applications/science/biology/kent/default.nix
@@ -3,7 +3,7 @@
 , libuuid
 , zlib
 , bzip2
-, lzma
+, xz
 , openssl
 , curl
 , libmysqlclient
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     sha256 = "0l5lmqqc6sqkf4hyk3z4825ly0vdlj5xdfad6zd0708cb1v81nbx";
   };
 
-  buildInputs = [ libpng libuuid zlib bzip2 lzma openssl curl libmysqlclient ];
+  buildInputs = [ libpng libuuid zlib bzip2 xz openssl curl libmysqlclient ];
 
   patchPhase = ''
     substituteInPlace ./src/checkUmask.sh \
diff --git a/pkgs/applications/science/biology/octopus/default.nix b/pkgs/applications/science/biology/octopus/default.nix
index fa88e5c47b4..0ef48ec6413 100644
--- a/pkgs/applications/science/biology/octopus/default.nix
+++ b/pkgs/applications/science/biology/octopus/default.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchpatch, fetchFromGitHub, cmake, boost, gmp, htslib, zlib, lzma, pkg-config}:
+{lib, stdenv, fetchpatch, fetchFromGitHub, cmake, boost, gmp, htslib, zlib, xz, pkg-config}:
 
 stdenv.mkDerivation rec {
   pname = "octopus";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   ];
 
   nativeBuildInputs = [ cmake pkg-config ];
-  buildInputs = [ boost gmp htslib zlib lzma ];
+  buildInputs = [ boost gmp htslib zlib xz ];
 
   postInstall = ''
     mkdir $out/bin
diff --git a/pkgs/applications/science/biology/svaba/default.nix b/pkgs/applications/science/biology/svaba/default.nix
index 87b77f6ac04..1aed501919f 100644
--- a/pkgs/applications/science/biology/svaba/default.nix
+++ b/pkgs/applications/science/biology/svaba/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, zlib, bzip2, lzma, fetchFromGitHub } :
+{ lib, stdenv, zlib, bzip2, xz, fetchFromGitHub } :
 
 stdenv.mkDerivation rec {
   version = "1.1.0";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  buildInputs = [ zlib bzip2 lzma ];
+  buildInputs = [ zlib bzip2 xz ];
 
   installPhase = ''
     runHook preInstall
diff --git a/pkgs/applications/science/machine-learning/shogun/default.nix b/pkgs/applications/science/machine-learning/shogun/default.nix
index 7d052c6c5e9..47b826078f2 100644
--- a/pkgs/applications/science/machine-learning/shogun/default.nix
+++ b/pkgs/applications/science/machine-learning/shogun/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, fetchpatch, fetchurl, cmake, ctags, swig
 # data, compression
-, bzip2, curl, hdf5, json_c, lzma, lzo, protobuf, snappy
+, bzip2, curl, hdf5, json_c, xz, lzo, protobuf, snappy
 # maths
 , blas, lapack, eigen, nlopt, lp_solve, colpack, glpk
 # libraries
@@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake ];
   buildInputs = with lib; [
-      blas lapack bzip2 colpack curl ctags eigen hdf5 json_c lp_solve lzma lzo
+      blas lapack bzip2 colpack curl ctags eigen hdf5 json_c lp_solve xz lzo
       protobuf nlopt snappy swig (libarchive.dev) libxml2 lapack glpk
     ]
     ++ optionals (pythonSupport) (with pythonPackages; [ python ply numpy ])
diff --git a/pkgs/applications/science/misc/root/5.nix b/pkgs/applications/science/misc/root/5.nix
index 144827413b5..75607fdda34 100644
--- a/pkgs/applications/science/misc/root/5.nix
+++ b/pkgs/applications/science/misc/root/5.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, fetchpatch, cmake, pcre, pkg-config, python2
-, libX11, libXpm, libXft, libXext, libGLU, libGL, zlib, libxml2, lz4, lzma, gsl_1, xxHash
+, libX11, libXpm, libXft, libXext, libGLU, libGL, zlib, libxml2, lz4, xz, gsl_1, xxHash
 , Cocoa, OpenGL, noSplash ? false }:
 
 stdenv.mkDerivation rec {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
-  buildInputs = [ pcre python2 zlib libxml2 lz4 lzma gsl_1 xxHash ]
+  buildInputs = [ pcre python2 zlib libxml2 lz4 xz gsl_1 xxHash ]
     ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
     ++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
     ;
diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix
index 2f3d57c31e7..9df3b0020a0 100644
--- a/pkgs/applications/science/misc/root/default.nix
+++ b/pkgs/applications/science/misc/root/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchurl, makeWrapper, cmake, ftgl, gl2ps, glew, gsl, llvm_5
-, libX11, libXpm, libXft, libXext, libGLU, libGL, libxml2, lz4, lzma, pcre
+, libX11, libXpm, libXft, libXext, libGLU, libGL, libxml2, lz4, xz, pcre
 , pkg-config, python, xxHash, zlib, zstd
 , libAfterImage, giflib, libjpeg, libtiff, libpng
 , Cocoa, OpenGL, noSplash ? false }:
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ makeWrapper cmake pkg-config ];
-  buildInputs = [ ftgl gl2ps glew pcre zlib zstd llvm_5 libxml2 lz4 lzma gsl xxHash libAfterImage giflib libjpeg libtiff libpng python.pkgs.numpy ]
+  buildInputs = [ ftgl gl2ps glew pcre zlib zstd llvm_5 libxml2 lz4 xz gsl xxHash libAfterImage giflib libjpeg libtiff libpng python.pkgs.numpy ]
     ++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
     ++ lib.optionals (stdenv.isDarwin) [ Cocoa OpenGL ]
     ;
diff --git a/pkgs/applications/video/handbrake/default.nix b/pkgs/applications/video/handbrake/default.nix
index 6317d7b1ab3..e14d902681d 100644
--- a/pkgs/applications/video/handbrake/default.nix
+++ b/pkgs/applications/video/handbrake/default.nix
@@ -9,7 +9,7 @@
 
 { stdenv, lib, fetchFromGitHub,
   # Main build tools
-  pkg-config, autoconf, automake, libtool, m4, lzma, python3,
+  pkg-config, autoconf, automake, libtool, m4, xz, python3,
   numactl,
   # Processing, video codecs, containers
   ffmpeg-full, nv-codec-headers, libogg, x264, x265, libvpx, libtheora, dav1d,
@@ -100,7 +100,7 @@ _EOF
     ffmpeg-full libogg libtheora x264 x265 libvpx dav1d
     libopus lame libvorbis a52dec speex libsamplerate
     libiconv fribidi fontconfig freetype libass jansson libxml2 harfbuzz
-    libdvdread libdvdnav libdvdcss libbluray lzma
+    libdvdread libdvdnav libdvdcss libbluray xz
   ] ++ lib.optional (!stdenv.isDarwin) numactl
   ++ lib.optionals useGtk [
     glib gtk3 libappindicator-gtk3 libnotify
diff --git a/pkgs/applications/video/kodi-packages/vfs-libarchive/default.nix b/pkgs/applications/video/kodi-packages/vfs-libarchive/default.nix
index 6819f7bfdcb..2db17f17aba 100644
--- a/pkgs/applications/video/kodi-packages/vfs-libarchive/default.nix
+++ b/pkgs/applications/video/kodi-packages/vfs-libarchive/default.nix
@@ -1,4 +1,4 @@
-{ lib, rel, buildKodiBinaryAddon, fetchFromGitHub, libarchive, lzma, bzip2, zlib, lz4, lzo, openssl }:
+{ lib, rel, buildKodiBinaryAddon, fetchFromGitHub, libarchive, xz, bzip2, zlib, lz4, lzo, openssl }:
 buildKodiBinaryAddon rec {
   pname = namespace;
   namespace = "vfs.libarchive";
@@ -11,7 +11,7 @@ buildKodiBinaryAddon rec {
     sha256 = "1q62p1i6rvqk2zv6f1cpffkh95lgclys2xl4dwyhj3acmqdxd9i5";
   };
 
-  extraBuildInputs = [ libarchive lzma bzip2 zlib lz4 lzo openssl ];
+  extraBuildInputs = [ libarchive xz bzip2 zlib lz4 lzo openssl ];
 
   meta = with lib; {
     description = "LibArchive Virtual Filesystem add-on for Kodi";
diff --git a/pkgs/applications/video/kodi/packages.nix b/pkgs/applications/video/kodi/packages.nix
new file mode 100644
index 00000000000..e6ce955e055
--- /dev/null
+++ b/pkgs/applications/video/kodi/packages.nix
@@ -0,0 +1,560 @@
+{ lib, stdenv, callPackage, fetchFromGitHub
+, cmake, kodi, libcec_platform, tinyxml, pugixml
+, steam, udev, libusb1, jsoncpp, libhdhomerun, zlib
+, python3Packages, expat, glib, nspr, nss, openssl
+, libssh, libarchive, xz, bzip2, lz4, lzo }:
+
+with lib;
+
+let self = rec {
+
+  addonDir = "/share/kodi/addons";
+  rel = "Matrix";
+
+  inherit kodi;
+
+  # Convert derivation to a kodi module. Stolen from ../../../top-level/python-packages.nix
+  toKodiAddon = drv: drv.overrideAttrs(oldAttrs: {
+    # Use passthru in order to prevent rebuilds when possible.
+    passthru = (oldAttrs.passthru or {})// {
+      kodiAddonFor = kodi;
+      requiredKodiAddons = requiredKodiAddons drv.propagatedBuildInputs;
+    };
+  });
+
+  # Check whether a derivation provides a Kodi addon.
+  hasKodiAddon = drv: drv ? kodiAddonFor && drv.kodiAddonFor == kodi;
+
+  # Get list of required Kodi addons given a list of derivations.
+  requiredKodiAddons = drvs: let
+      modules = filter hasKodiAddon drvs;
+    in unique (modules ++ concatLists (catAttrs "requiredKodiAddons" modules));
+
+  kodi-platform = stdenv.mkDerivation rec {
+    project = "kodi-platform";
+    version = "17.1";
+    name = "${project}-${version}";
+
+    src = fetchFromGitHub {
+      owner = "xbmc";
+      repo = project;
+      rev = "c8188d82678fec6b784597db69a68e74ff4986b5";
+      sha256 = "1r3gs3c6zczmm66qcxh9mr306clwb3p7ykzb70r3jv5jqggiz199";
+    };
+
+    nativeBuildInputs = [ cmake ];
+    buildInputs = [ kodi libcec_platform tinyxml ];
+  };
+
+  buildKodiAddon =
+    { name ? "${attrs.pname}-${attrs.version}"
+    , namespace
+    , sourceDir ? ""
+    , ... } @ attrs:
+  toKodiAddon (stdenv.mkDerivation ({
+    name = "kodi-" + name;
+
+    dontStrip = true;
+
+    extraRuntimeDependencies = [ ];
+
+    installPhase = ''
+      cd $src/$sourceDir
+      d=$out${addonDir}/${namespace}
+      mkdir -p $d
+      sauce="."
+      [ -d ${namespace} ] && sauce=${namespace}
+      cp -R "$sauce/"* $d
+    '';
+  } // attrs));
+
+  buildKodiBinaryAddon =
+    { name ? "${attrs.pname}-${attrs.version}"
+    , namespace
+    , version
+    , extraBuildInputs ? []
+    , extraRuntimeDependencies ? []
+    , extraInstallPhase ? "", ... } @ attrs:
+  toKodiAddon (stdenv.mkDerivation ({
+    name = "kodi-" + name;
+
+    dontStrip = true;
+
+    nativeBuildInputs = [ cmake ];
+    buildInputs = [ kodi kodi-platform libcec_platform ] ++ extraBuildInputs;
+
+    inherit extraRuntimeDependencies;
+
+    # disables check ensuring install prefix is that of kodi
+    cmakeFlags = [
+      "-DOVERRIDE_PATHS=1"
+    ];
+
+    # kodi checks for addon .so libs existance in the addon folder (share/...)
+    # and the non-wrapped kodi lib/... folder before even trying to dlopen
+    # them. Symlinking .so, as setting LD_LIBRARY_PATH is of no use
+    installPhase = let n = namespace; in ''
+      make install
+      ln -s $out/lib/addons/${n}/${n}.so.${version} $out${addonDir}/${n}/${n}.so.${version}
+      ${extraInstallPhase}
+    '';
+  } // attrs));
+
+  advanced-launcher = buildKodiAddon rec {
+
+    pname = "advanced-launcher";
+    namespace = "plugin.program.advanced.launcher";
+    version = "2.5.8";
+
+    src = fetchFromGitHub {
+      owner = "edwtjo";
+      repo = pname;
+      rev = version;
+      sha256 = "142vvgs37asq5m54xqhjzqvgmb0xlirvm0kz6lxaqynp0vvgrkx2";
+    };
+
+    meta = {
+      homepage = "https://forum.kodi.tv/showthread.php?tid=85724";
+      description = "A program launcher for Kodi";
+      longDescription = ''
+        Advanced Launcher allows you to start any Linux, Windows and
+        macOS external applications (with command line support or not)
+        directly from the Kodi GUI. Advanced Launcher also give you
+        the possibility to edit, download (from Internet resources)
+        and manage all the meta-data (informations and images) related
+        to these applications.
+      '';
+      platforms = platforms.all;
+      maintainers = with maintainers; [ edwtjo ];
+      broken = true; # requires port to python3
+    };
+
+  };
+
+  advanced-emulator-launcher = buildKodiAddon rec {
+
+    pname = "advanced-emulator-launcher";
+    namespace = "plugin.program.advanced.emulator.launcher";
+    version = "0.9.6";
+
+    src = fetchFromGitHub {
+      owner = "Wintermute0110";
+      repo = namespace;
+      rev = version;
+      sha256 = "1sv9z77jj6bam6llcnd9b3dgkbvhwad2m1v541rv3acrackms2z2";
+    };
+
+    meta = {
+      homepage = "https://forum.kodi.tv/showthread.php?tid=287826";
+      description = "A program launcher for Kodi";
+      longDescription = ''
+        Advanced Emulator Launcher is a multi-emulator front-end for Kodi
+        scalable to collections of thousands of ROMs. Includes offline scrapers
+        for MAME and No-Intro ROM sets and also supports scrapping ROM metadata
+        and artwork online. ROM auditing for No-Intro ROMs using No-Intro XML
+        DATs. Launching of games and standalone applications is also available.
+      '';
+      platforms = platforms.all;
+      maintainers = with maintainers; [ edwtjo ];
+      broken = true; # requires port to python3
+    };
+
+  };
+
+  controllers = let
+    pname = "game-controller";
+    version = "1.0.3";
+
+    src = fetchFromGitHub {
+      owner = "kodi-game";
+      repo = "kodi-game-controllers";
+      rev = "01acb5b6e8b85392b3cb298b034aadb1b24ccf18";
+      sha256 = "0sbc0w0fwbp7rbmbgb6a1kglhnn5g85hijcbbvf5x6jdq9v3f1qb";
+    };
+
+    meta = {
+      description = "Add support for different gaming controllers.";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ edwtjo ];
+    };
+
+    mkController = controller: {
+        ${controller} = buildKodiAddon rec {
+          pname = pname + "-" + controller;
+          namespace = "game.controller." + controller;
+          sourceDir = "addons/" + namespace;
+          inherit version src meta;
+        };
+      };
+    in (mkController "default")
+    // (mkController "dreamcast")
+    // (mkController "gba")
+    // (mkController "genesis")
+    // (mkController "mouse")
+    // (mkController "n64")
+    // (mkController "nes")
+    // (mkController "ps")
+    // (mkController "snes");
+
+  hyper-launcher = let
+    pname = "hyper-launcher";
+    version = "1.5.2";
+    src = fetchFromGitHub rec {
+      name = pname + "-" + version + ".tar.gz";
+      owner = "teeedubb";
+      repo = owner + "-xbmc-repo";
+      rev = "f958ba93fe85b9c9025b1745d89c2db2e7dd9bf6";
+      sha256 = "1dvff24fbas25k5kvca4ssks9l1g5rfa3hl8lqxczkaqi3pp41j5";
+    };
+    meta = {
+      homepage = "https://forum.kodi.tv/showthread.php?tid=258159";
+      description = "A ROM launcher for Kodi that uses HyperSpin assets.";
+      maintainers = with maintainers; [ edwtjo ];
+      broken = true; # requires port to python3
+    };
+  in {
+    service = buildKodiAddon {
+      pname = pname + "-service";
+      version = "1.2.1";
+      namespace = "service.hyper.launcher";
+      inherit src meta;
+    };
+    plugin = buildKodiAddon {
+      namespace = "plugin.hyper.launcher";
+      inherit pname version src meta;
+    };
+  };
+
+  joystick = buildKodiBinaryAddon rec {
+    pname = namespace;
+    namespace = "peripheral.joystick";
+    version = "1.7.1";
+
+    src = fetchFromGitHub {
+      owner = "xbmc";
+      repo = namespace;
+      rev = "${version}-${rel}";
+      sha256 = "1dhj4afr9kj938xx70fq5r409mz6lbw4n581ljvdjj9lq7akc914";
+    };
+
+    meta = {
+      description = "Binary addon for raw joystick input.";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ edwtjo ];
+    };
+
+    extraBuildInputs = [ tinyxml udev ];
+  };
+
+  simpleplugin = buildKodiAddon rec {
+    pname = "simpleplugin";
+    namespace = "script.module.simpleplugin";
+    version = "2.3.2";
+
+    src = fetchFromGitHub {
+      owner = "romanvm";
+      repo = namespace;
+      rev = "v.${version}";
+      sha256 = "0myar8dqjigb75pcc8zx3i5z79p1ifgphgb82s5syqywk0zaxm3j";
+    };
+
+    meta = {
+      homepage = src.meta.homepage;
+      description = "Simpleplugin API";
+      license = licenses.gpl3;
+      broken = true; # requires port to python3
+    };
+  };
+
+  svtplay = buildKodiAddon rec {
+
+    pname = "svtplay";
+    namespace = "plugin.video.svtplay";
+    version = "5.1.12";
+
+    src = fetchFromGitHub {
+      name = pname + "-" + version + ".tar.gz";
+      owner = "nilzen";
+      repo = "xbmc-" + pname;
+      rev = "v${version}";
+      sha256 = "04j1nhm7mh9chs995lz6bv1vsq5xzk7a7c0lmk4bnfv8jrfpj0w6";
+    };
+
+    meta = {
+      homepage = "https://forum.kodi.tv/showthread.php?tid=67110";
+      description = "Watch content from SVT Play";
+      longDescription = ''
+        With this addon you can stream content from SVT Play
+        (svtplay.se). The plugin fetches the video URL from the SVT
+        Play website and feeds it to the Kodi video player. HLS (m3u8)
+        is the preferred video format by the plugin.
+      '';
+      platforms = platforms.all;
+      maintainers = with maintainers; [ edwtjo ];
+    };
+
+  };
+
+  steam-controller = buildKodiBinaryAddon rec {
+    pname = namespace;
+    namespace = "peripheral.steamcontroller";
+    version = "0.11.0";
+
+    src = fetchFromGitHub {
+      owner = "kodi-game";
+      repo = namespace;
+      rev = "f68140ca44f163a03d3a625d1f2005a6edef96cb";
+      sha256 = "09lm8i119xlsxxk0c64rnp8iw0crr90v7m8iwi9r31qdmxrdxpmg";
+    };
+
+    extraBuildInputs = [ libusb1 ];
+
+    meta = {
+      description = "Binary addon for steam controller.";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ edwtjo ];
+    };
+
+  };
+
+  steam-launcher = buildKodiAddon {
+
+    pname = "steam-launcher";
+    namespace = "script.steam.launcher";
+    version = "3.5.1";
+
+    src = fetchFromGitHub rec {
+      owner = "teeedubb";
+      repo = owner + "-xbmc-repo";
+      rev = "8260bf9b464846a1f1965da495d2f2b7ceb81d55";
+      sha256 = "1fj3ry5s44nf1jzxk4bmnpa4b9p23nrpmpj2a4i6xf94h7jl7p5k";
+    };
+
+    propagatedBuildInputs = [ steam ];
+
+    meta = {
+      homepage = "https://forum.kodi.tv/showthread.php?tid=157499";
+      description = "Launch Steam in Big Picture Mode from Kodi";
+      longDescription = ''
+        This add-on will close/minimise Kodi, launch Steam in Big
+        Picture Mode and when Steam BPM is exited (either by quitting
+        Steam or returning to the desktop) Kodi will
+        restart/maximise. Running pre/post Steam scripts can be
+        configured via the addon.
+      '';
+      maintainers = with maintainers; [ edwtjo ];
+    };
+  };
+
+  pdfreader = buildKodiAddon rec {
+    pname = "pdfreader";
+    namespace = "plugin.image.pdf";
+    version = "2.0.2";
+
+    src = fetchFromGitHub {
+      owner = "i96751414";
+      repo = "plugin.image.pdfreader";
+      rev = "v${version}";
+      sha256 = "0nkqhlm1gyagq6xpdgqvd5qxyr2ngpml9smdmzfabc8b972mwjml";
+    };
+
+    meta = {
+      homepage = "https://forum.kodi.tv/showthread.php?tid=187421";
+      description = "A comic book reader";
+      maintainers = with maintainers; [ edwtjo ];
+    };
+  };
+
+  pvr-hts = buildKodiBinaryAddon rec {
+
+    pname = "pvr-hts";
+    namespace = "pvr.hts";
+    version = "8.2.2";
+
+    src = fetchFromGitHub {
+      owner = "kodi-pvr";
+      repo = "pvr.hts";
+      rev = "${version}-${rel}";
+      sha256 = "0jnn9gfjl556acqjf92wzzn371gxymhbbi665nqgg2gjcan0a49q";
+    };
+
+    meta = {
+      homepage = "https://github.com/kodi-pvr/pvr.hts";
+      description = "Kodi's Tvheadend HTSP client addon";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ cpages ];
+    };
+
+  };
+
+  pvr-hdhomerun = buildKodiBinaryAddon rec {
+
+    pname = "pvr-hdhomerun";
+    namespace = "pvr.hdhomerun";
+    version = "7.1.0";
+
+    src = fetchFromGitHub {
+      owner = "kodi-pvr";
+      repo = "pvr.hdhomerun";
+      rev = "${version}-${rel}";
+      sha256 = "0gbwjssnd319csq2kwlyjj1rskg19m1dxac5dl2dymvx5hn3zrgm";
+    };
+
+    meta = {
+      homepage = "https://github.com/kodi-pvr/pvr.hdhomerun";
+      description = "Kodi's HDHomeRun PVR client addon";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ titanous ];
+    };
+
+    extraBuildInputs = [ jsoncpp libhdhomerun ];
+
+  };
+
+  pvr-iptvsimple = buildKodiBinaryAddon rec {
+
+    pname = "pvr-iptvsimple";
+    namespace = "pvr.iptvsimple";
+    version = "7.4.2";
+
+    src = fetchFromGitHub {
+      owner = "kodi-pvr";
+      repo = "pvr.iptvsimple";
+      rev = "${version}-${rel}";
+      sha256 = "062i922qi0izkvn7v47yhyy2cf3fa7xc3k95b1gm9abfdwkk8ywr";
+    };
+
+    meta = {
+      homepage = "https://github.com/kodi-pvr/pvr.iptvsimple";
+      description = "Kodi's IPTV Simple client addon";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ ];
+      license = licenses.gpl2Plus;
+    };
+
+    extraBuildInputs = [ zlib pugixml ];
+  };
+
+  osmc-skin = buildKodiAddon rec {
+
+    pname = "osmc-skin";
+    namespace = "skin.osmc";
+    version = "18.0.0";
+
+    src = fetchFromGitHub {
+      owner = "osmc";
+      repo = namespace;
+      rev = "40a6c318641e2cbeac58fb0e7dde9c2beac737a0";
+      sha256 = "1l7hyfj5zvjxjdm94y325bmy1naak455b9l8952sb0gllzrcwj6s";
+    };
+
+    meta = {
+      homepage = "https://github.com/osmc/skin.osmc";
+      description = "The default skin for OSMC";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ worldofpeace ];
+      license = licenses.cc-by-nc-sa-30;
+    };
+  };
+
+  yatp = python3Packages.toPythonModule (buildKodiAddon rec {
+    pname = "yatp";
+    namespace = "plugin.video.yatp";
+    version = "3.3.2";
+
+    src = fetchFromGitHub {
+      owner = "romanvm";
+      repo = "kodi.yatp";
+      rev = "v.${version}";
+      sha256 = "12g1f57sx7dy6wy7ljl7siz2qs1kxcmijcg7xx2xpvmq61x9qa2d";
+    };
+
+    patches = [ ./yatp/dont-monkey.patch ];
+
+    propagatedBuildInputs = [
+      simpleplugin
+      python3Packages.requests
+      python3Packages.libtorrent-rasterbar
+    ];
+
+    meta = {
+      homepage = src.meta.homepage;
+      description = "Yet Another Torrent Player: libtorrent-based torrent streaming for Kodi";
+      license = licenses.gpl3;
+      broken = true; # requires port to python3
+    };
+  });
+
+  inputstream-adaptive = buildKodiBinaryAddon rec {
+
+    pname = "inputstream-adaptive";
+    namespace = "inputstream.adaptive";
+    version = "2.6.7";
+
+    src = fetchFromGitHub {
+      owner = "peak3d";
+      repo = "inputstream.adaptive";
+      rev = "${version}-${rel}";
+      sha256 = "1pwqmbr78wp12jn6rwv63npdfc456adwz0amlxf6gvgg43li6p7s";
+    };
+
+    extraBuildInputs = [ expat ];
+
+    extraRuntimeDependencies = [ glib nspr nss stdenv.cc.cc.lib ];
+
+    extraInstallPhase = let n = namespace; in ''
+      ln -s $out/lib/addons/${n}/libssd_wv.so $out/${addonDir}/${n}/libssd_wv.so
+    '';
+
+    meta = {
+      homepage = "https://github.com/peak3d/inputstream.adaptive";
+      description = "Kodi inputstream addon for several manifest types";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ sephalon ];
+    };
+  };
+
+  vfs-sftp = buildKodiBinaryAddon rec {
+    pname = namespace;
+    namespace = "vfs.sftp";
+    version = "2.0.0";
+
+    src = fetchFromGitHub {
+      owner = "xbmc";
+      repo = namespace;
+      rev = "${version}-${rel}";
+      sha256 = "06w74sh8yagrrp7a7rjaz3xrh1j3wdqald9c4b72c33gpk5997dk";
+    };
+
+    meta = with lib; {
+      description = "SFTP Virtual Filesystem add-on for Kodi";
+      license = licenses.gpl2Plus;
+      platforms = platforms.all;
+      maintainers = with maintainers; [ minijackson ];
+    };
+
+    extraBuildInputs = [ openssl libssh zlib ];
+  };
+
+  vfs-libarchive = buildKodiBinaryAddon rec {
+    pname = namespace;
+    namespace = "vfs.libarchive";
+    version = "2.0.0";
+
+    src = fetchFromGitHub {
+      owner = "xbmc";
+      repo = namespace;
+      rev = "${version}-${rel}";
+      sha256 = "1q62p1i6rvqk2zv6f1cpffkh95lgclys2xl4dwyhj3acmqdxd9i5";
+    };
+
+    meta = with lib; {
+      description = "LibArchive Virtual Filesystem add-on for Kodi";
+      license = licenses.gpl2Plus;
+      platforms = platforms.all;
+      maintainers = with maintainers; [ minijackson ];
+    };
+
+    extraBuildInputs = [ libarchive xz bzip2 zlib lz4 lzo openssl ];
+  };
+}; in self
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix
index 759245aed1a..f6be1b299f6 100644
--- a/pkgs/build-support/vm/default.nix
+++ b/pkgs/build-support/vm/default.nix
@@ -573,7 +573,7 @@ rec {
       buildCommand = ''
         ${createRootFS}
 
-        PATH=$PATH:${lib.makeBinPath [ dpkg dpkg glibc lzma ]}
+        PATH=$PATH:${lib.makeBinPath [ dpkg dpkg glibc xz ]}
 
         # Unpack the .debs.  We do this to prevent pre-install scripts
         # (which have lots of circular dependencies) from barfing.
diff --git a/pkgs/development/compilers/graalvm/default.nix b/pkgs/development/compilers/graalvm/default.nix
index b54f57e9b64..ccfb4a18a12 100644
--- a/pkgs/development/compilers/graalvm/default.nix
+++ b/pkgs/development/compilers/graalvm/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, fetchurl, fetchzip, fetchgit, mercurial_4, python27, setJavaClassPath,
   which, zlib, makeWrapper, openjdk, unzip, git, clang, llvm, icu, ruby, glibc, bash, gcc, libobjc,
-  xcodebuild, gfortran, readline, bzip2, lzma, pcre, curl, ed, libresolv, libiconv, writeScriptBin,
+  xcodebuild, gfortran, readline, bzip2, xz, pcre, curl, ed, libresolv, libiconv, writeScriptBin,
   openssl, perl, CoreFoundation, Foundation, JavaNativeFoundation, JavaRuntimeSupport, JavaVM, Cocoa
 }:
 
@@ -372,7 +372,7 @@ in rec {
 
     buildInputs = [ mx zlib.dev mercurial jvmci8 git llvm clang
                     python27withPackages icu ruby bzip2 which
-                    readline bzip2 lzma pcre curl ed gfortran
+                    readline bzip2 xz pcre curl ed gfortran
                   ]  ++ lib.optional stdenv.isDarwin [
                     CoreFoundation gcc.cc.lib libiconv perl openssl
                   ];
diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix
index 72b47b7afd3..38ee086a88f 100644
--- a/pkgs/development/interpreters/python/cpython/default.nix
+++ b/pkgs/development/interpreters/python/cpython/default.nix
@@ -3,7 +3,7 @@
 , expat
 , libffi
 , gdbm
-, lzma
+, xz
 , mime-types ? null, mimetypesSupport ? true
 , ncurses
 , openssl
@@ -103,7 +103,7 @@ let
   ];
 
   buildInputs = filter (p: p != null) ([
-    zlib bzip2 expat lzma libffi gdbm sqlite readline ncurses openssl ]
+    zlib bzip2 expat xz libffi gdbm sqlite readline ncurses openssl ]
     ++ optionals x11Support [ tcl tk libX11 xorgproto ]
     ++ optionals (bluezSupport && stdenv.isLinux) [ bluez ]
     ++ optionals stdenv.isDarwin [ configd ])
diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix
index b4e9343b5d4..a5ba4983e43 100644
--- a/pkgs/development/interpreters/python/pypy/default.nix
+++ b/pkgs/development/interpreters/python/pypy/default.nix
@@ -1,7 +1,7 @@
 { lib, stdenv, substituteAll, fetchurl
 , zlib ? null, zlibSupport ? true, bzip2, pkg-config, libffi, libunwind, Security
 , sqlite, openssl, ncurses, python, expat, tcl, tk, tix, xlibsWrapper, libX11
-, self, gdbm, db, lzma
+, self, gdbm, db, xz
 , python-setup-hook
 # For the Python package set
 , packageOverrides ? (self: super: {})
@@ -53,7 +53,7 @@ in with passthru; stdenv.mkDerivation rec {
   buildInputs = [
     bzip2 openssl pythonForPypy libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 gdbm db
   ]  ++ optionals isPy3k [
-    lzma
+    xz
   ] ++ optionals (stdenv ? cc && stdenv.cc.libc != null) [
     stdenv.cc.libc
   ] ++ optionals zlibSupport [
diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix
index a09ad0e871e..d861d25e67a 100644
--- a/pkgs/development/libraries/ffmpeg-full/default.nix
+++ b/pkgs/development/libraries/ffmpeg-full/default.nix
@@ -99,7 +99,7 @@
 , libxcbshapeExtlib ? true # X11 grabbing shape rendering
 , libXv ? null # Xlib support
 , libXext ? null # Xlib support
-, lzma ? null # xz-utils
+, xz ? null # xz-utils
 , nvenc ? !stdenv.isDarwin && !stdenv.isAarch64, nv-codec-headers ? null # NVIDIA NVENC support
 , openal ? null # OpenAL 1.1 capture support
 #, opencl ? null # OpenCL code
@@ -381,7 +381,7 @@ stdenv.mkDerivation rec {
     (enableFeature libxcbshmExtlib "libxcb-shm")
     (enableFeature libxcbxfixesExtlib "libxcb-xfixes")
     (enableFeature libxcbshapeExtlib "libxcb-shape")
-    (enableFeature (lzma != null) "lzma")
+    (enableFeature (xz != null) "lzma")
     (enableFeature nvenc "nvenc")
     (enableFeature (openal != null) "openal")
     #(enableFeature opencl "opencl")
@@ -431,7 +431,7 @@ stdenv.mkDerivation rec {
     bzip2 celt dav1d fontconfig freetype frei0r fribidi game-music-emu gnutls gsm
     libjack2 ladspaH lame libaom libass libbluray libbs2b libcaca libdc1394 libmodplug libmysofa
     libogg libopus librsvg libssh libtheora libvdpau libvorbis libvpx libwebp libX11
-    libxcb libXv libXext lzma openal openjpeg libpulseaudio rav1e svt-av1 rtmpdump opencore-amr
+    libxcb libXv libXext xz openal openjpeg libpulseaudio rav1e svt-av1 rtmpdump opencore-amr
     samba SDL2 soxr speex srt vid-stab vo-amrwbenc wavpack x264 x265 xavs xvidcore
     zeromq4 zlib
   ] ++ optionals openglExtlib [ libGL libGLU ]
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index 99a08470396..82f1a8bf564 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, buildPackages, fetchurl, pkg-config, addOpenGLRunpath, perl, texinfo, yasm
 , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
-, libssh, libtheora, libva, libdrm, libvorbis, libvpx, lzma, libpulseaudio, soxr
+, libssh, libtheora, libva, libdrm, libvorbis, libvpx, xz, libpulseaudio, soxr
 , x264, x265, xvidcore, zlib, libopus, speex, nv-codec-headers, dav1d
 , openglSupport ? false, libGLU ? null, libGL ? null
 , libmfxSupport ? false, intel-media-sdk ? null
@@ -171,7 +171,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora
-    libvorbis lzma soxr x264 x265 xvidcore zlib libopus speex nv-codec-headers
+    libvorbis xz soxr x264 x265 xvidcore zlib libopus speex nv-codec-headers
   ] ++ optionals openglSupport [ libGL libGLU ]
     ++ optional libmfxSupport intel-media-sdk
     ++ optional libaomSupport libaom
diff --git a/pkgs/development/libraries/flatpak/default.nix b/pkgs/development/libraries/flatpak/default.nix
index b078417d44f..018ffd68fa7 100644
--- a/pkgs/development/libraries/flatpak/default.nix
+++ b/pkgs/development/libraries/flatpak/default.nix
@@ -35,7 +35,7 @@
 , fuse
 , nixosTests
 , libsoup
-, lzma
+, xz
 , zstd
 , ostree
 , polkit
@@ -129,7 +129,7 @@ stdenv.mkDerivation rec {
     libcap
     libseccomp
     libsoup
-    lzma
+    xz
     zstd
     polkit
     python3
diff --git a/pkgs/development/libraries/folly/default.nix b/pkgs/development/libraries/folly/default.nix
index 063678cbccc..212b656adda 100644
--- a/pkgs/development/libraries/folly/default.nix
+++ b/pkgs/development/libraries/folly/default.nix
@@ -8,7 +8,7 @@
 , gflags
 , libiberty
 , lz4
-, lzma
+, xz
 , zlib
 , jemalloc
 , openssl
@@ -43,7 +43,7 @@ stdenv.mkDerivation (rec {
     libiberty
     openssl
     lz4
-    lzma
+    xz
     zlib
     jemalloc
     libunwind
diff --git a/pkgs/development/libraries/kde-frameworks/karchive.nix b/pkgs/development/libraries/kde-frameworks/karchive.nix
index a5f499e6744..7a9ea86bbb5 100644
--- a/pkgs/development/libraries/kde-frameworks/karchive.nix
+++ b/pkgs/development/libraries/kde-frameworks/karchive.nix
@@ -1,7 +1,7 @@
 {
   mkDerivation, lib,
   extra-cmake-modules,
-  bzip2, lzma, qtbase, zlib,
+  bzip2, xz, qtbase, zlib,
 }:
 
 mkDerivation {
@@ -11,7 +11,7 @@ mkDerivation {
     broken = builtins.compareVersions qtbase.version "5.14.0" < 0;
   };
   nativeBuildInputs = [ extra-cmake-modules ];
-  buildInputs = [ bzip2 lzma zlib ];
+  buildInputs = [ bzip2 xz zlib ];
   propagatedBuildInputs = [ qtbase ];
   outputs = [ "out" "dev" ];
 }
diff --git a/pkgs/development/libraries/libticalcs2/default.nix b/pkgs/development/libraries/libticalcs2/default.nix
index 6eb013a7ffd..2488a5bbb0b 100644
--- a/pkgs/development/libraries/libticalcs2/default.nix
+++ b/pkgs/development/libraries/libticalcs2/default.nix
@@ -7,7 +7,7 @@
 , libticonv
 , libtifiles2
 , libticables2
-, lzma
+, xz
 , bzip2
 , acl
 , libobjc
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
     libticonv
     libtifiles2
     libticables2
-    lzma
+    xz
     bzip2
   ] ++ lib.optionals stdenv.isLinux [
     acl
diff --git a/pkgs/development/libraries/science/biology/htslib/default.nix b/pkgs/development/libraries/science/biology/htslib/default.nix
index cb3a543ad2a..3233a29449a 100644
--- a/pkgs/development/libraries/science/biology/htslib/default.nix
+++ b/pkgs/development/libraries/science/biology/htslib/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, zlib, bzip2, lzma, curl, perl }:
+{ lib, stdenv, fetchurl, zlib, bzip2, xz, curl, perl }:
 
 stdenv.mkDerivation rec {
   pname = "htslib";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   # perl is only used during the check phase.
   nativeBuildInputs = [ perl ];
 
-  buildInputs = [ zlib bzip2 lzma curl ];
+  buildInputs = [ zlib bzip2 xz curl ];
 
   configureFlags = [ "--enable-libcurl" ]; # optional but strongly recommended
 
diff --git a/pkgs/development/python-modules/backports_lzma/default.nix b/pkgs/development/python-modules/backports_lzma/default.nix
index 1ebae86dec9..bf346f3a3ca 100644
--- a/pkgs/development/python-modules/backports_lzma/default.nix
+++ b/pkgs/development/python-modules/backports_lzma/default.nix
@@ -2,7 +2,7 @@
 , buildPythonPackage
 , fetchPypi
 , isPy3k
-, lzma
+, xz
 , python
 , pythonOlder
 }:
@@ -18,7 +18,7 @@ if !(pythonOlder "3.3") then null else buildPythonPackage rec {
     sha256 = "16d8b68e4d3cd4e6c9ddb059850452946da3914c8a8e197a7f2b0954559f2df4";
   };
 
-  buildInputs = [ lzma ];
+  buildInputs = [ xz ];
 
   checkPhase = ''
     ${python.interpreter} test/test_lzma.py
diff --git a/pkgs/development/python-modules/binwalk/default.nix b/pkgs/development/python-modules/binwalk/default.nix
index b9120d412cb..a3e48d20c60 100644
--- a/pkgs/development/python-modules/binwalk/default.nix
+++ b/pkgs/development/python-modules/binwalk/default.nix
@@ -14,7 +14,6 @@
 , cramfsswap
 , sasquatch
 , squashfsTools
-, lzma
 , matplotlib
 , nose
 , pycrypto
@@ -32,7 +31,7 @@ buildPythonPackage rec {
     sha256 = "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc";
   };
 
-  propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract squashfsTools lzma pycrypto ]
+  propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract squashfsTools xz pycrypto ]
   ++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ]
   ++ lib.optionals (!stdenv.isDarwin) [ cramfsprogs cramfsswap sasquatch ];
 
diff --git a/pkgs/development/python-modules/deeptoolsintervals/default.nix b/pkgs/development/python-modules/deeptoolsintervals/default.nix
index eef8d51ae91..0dde3c51c3a 100644
--- a/pkgs/development/python-modules/deeptoolsintervals/default.nix
+++ b/pkgs/development/python-modules/deeptoolsintervals/default.nix
@@ -3,7 +3,7 @@
 , fetchPypi
 , pytest
 , zlib
-, lzma
+, xz
 }:
 
 buildPythonPackage rec {
@@ -15,7 +15,7 @@ buildPythonPackage rec {
     sha256 = "1xnl80nblysj6dylj4683wgrfa425rkx4dp5k65hvwdns9pw753x";
   };
 
-  buildInputs = [ zlib lzma ];
+  buildInputs = [ zlib xz ];
 
   checkInputs = [ pytest ];
 
diff --git a/pkgs/development/python-modules/pysam/default.nix b/pkgs/development/python-modules/pysam/default.nix
index 2f40a297333..31e01e83dbf 100644
--- a/pkgs/development/python-modules/pysam/default.nix
+++ b/pkgs/development/python-modules/pysam/default.nix
@@ -7,7 +7,7 @@
 , cython
 , htslib
 , libdeflate
-, lzma
+, xz
 , pytest
 , samtools
 , zlib
@@ -33,7 +33,7 @@ buildPythonPackage rec {
     curl
     cython
     libdeflate
-    lzma
+    xz
     zlib
   ];
 
diff --git a/pkgs/development/python-modules/rpy2/2.nix b/pkgs/development/python-modules/rpy2/2.nix
index e178d3c8211..3108861e9ce 100644
--- a/pkgs/development/python-modules/rpy2/2.nix
+++ b/pkgs/development/python-modules/rpy2/2.nix
@@ -9,7 +9,7 @@
 , rWrapper
 , rPackages
 , pcre
-, lzma
+, xz
 , bzip2
 , zlib
 , icu
@@ -35,7 +35,7 @@ buildPythonPackage rec {
       readline
       R
       pcre
-      lzma
+      xz
       bzip2
       zlib
       icu
diff --git a/pkgs/development/python-modules/rpy2/default.nix b/pkgs/development/python-modules/rpy2/default.nix
index c913ab53b28..c5443a37382 100644
--- a/pkgs/development/python-modules/rpy2/default.nix
+++ b/pkgs/development/python-modules/rpy2/default.nix
@@ -7,7 +7,7 @@
 , rWrapper
 , rPackages
 , pcre
-, lzma
+, xz
 , bzip2
 , zlib
 , icu
@@ -46,7 +46,7 @@ buildPythonPackage rec {
 
     buildInputs = [
       pcre
-      lzma
+      xz
       bzip2
       zlib
       icu
diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix
index 24f6e7ccfc4..ae23b32b71a 100644
--- a/pkgs/development/r-modules/default.nix
+++ b/pkgs/development/r-modules/default.nix
@@ -310,10 +310,10 @@ let
     RGtk2 = [ pkgs.gtk2.dev ];
     rhdf5 = [ pkgs.zlib ];
     Rhdf5lib = [ pkgs.zlib ];
-    Rhpc = [ pkgs.zlib pkgs.bzip2.dev pkgs.icu pkgs.lzma.dev pkgs.mpi pkgs.pcre.dev ];
-    Rhtslib = [ pkgs.zlib.dev pkgs.automake pkgs.autoconf pkgs.bzip2.dev pkgs.lzma.dev pkgs.curl.dev ];
+    Rhpc = [ pkgs.zlib pkgs.bzip2.dev pkgs.icu pkgs.xz.dev pkgs.mpi pkgs.pcre.dev ];
+    Rhtslib = [ pkgs.zlib.dev pkgs.automake pkgs.autoconf pkgs.bzip2.dev pkgs.xz.dev pkgs.curl.dev ];
     rjags = [ pkgs.jags ];
-    rJava = [ pkgs.zlib pkgs.bzip2.dev pkgs.icu pkgs.lzma.dev pkgs.pcre.dev pkgs.jdk pkgs.libzip ];
+    rJava = [ pkgs.zlib pkgs.bzip2.dev pkgs.icu pkgs.xz.dev pkgs.pcre.dev pkgs.jdk pkgs.libzip ];
     Rlibeemd = [ pkgs.gsl_1 ];
     rmatio = [ pkgs.zlib.dev ];
     Rmpfr = [ pkgs.gmp pkgs.mpfr.dev ];
@@ -334,7 +334,7 @@ let
     RVowpalWabbit = [ pkgs.zlib.dev pkgs.boost ];
     rzmq = [ pkgs.zeromq pkgs.pkg-config ];
     clustermq = [ pkgs.zeromq ];
-    SAVE = [ pkgs.zlib pkgs.bzip2 pkgs.icu pkgs.lzma pkgs.pcre ];
+    SAVE = [ pkgs.zlib pkgs.bzip2 pkgs.icu pkgs.xz pkgs.pcre ];
     sdcTable = [ pkgs.gmp pkgs.glpk ];
     seewave = [ pkgs.fftw.dev pkgs.libsndfile.dev ];
     seqinr = [ pkgs.zlib.dev ];
@@ -939,7 +939,7 @@ let
     });
 
     littler = old.littler.overrideAttrs (attrs: with pkgs; {
-      buildInputs = [ pcre lzma zlib bzip2 icu which ] ++ attrs.buildInputs;
+      buildInputs = [ pcre xz zlib bzip2 icu which ] ++ attrs.buildInputs;
       postInstall = ''
         install -d $out/bin $out/share/man/man1
         ln -s ../library/littler/bin/r $out/bin/r
diff --git a/pkgs/development/tools/misc/autoconf/2.13.nix b/pkgs/development/tools/misc/autoconf/2.13.nix
index e5280d46b59..26d6d9178ed 100644
--- a/pkgs/development/tools/misc/autoconf/2.13.nix
+++ b/pkgs/development/tools/misc/autoconf/2.13.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchurl, m4, perl, lzma}:
+{lib, stdenv, fetchurl, m4, perl, xz}:
 
 stdenv.mkDerivation rec {
   name = "autoconf-2.13";
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     sha256 = "07krzl4czczdsgzrrw9fiqx35xcf32naf751khg821g5pqv12qgh";
   };
 
-  nativebuildInputs = [ lzma ];
+  nativebuildInputs = [ xz ];
   buildInputs = [ m4 perl ];
 
   doCheck = true;
diff --git a/pkgs/development/tools/misc/hydra/common.nix b/pkgs/development/tools/misc/hydra/common.nix
index c557f9600c3..0cc7769d3c5 100644
--- a/pkgs/development/tools/misc/hydra/common.nix
+++ b/pkgs/development/tools/misc/hydra/common.nix
@@ -2,7 +2,7 @@
 , makeWrapper, autoconf, automake, libtool, unzip, pkg-config, sqlite, libpqxx
 , top-git, mercurial, darcs, subversion, breezy, openssl, bzip2, libxslt
 , perl, postgresql, nukeReferences, git, boehmgc, nlohmann_json
-, docbook_xsl, openssh, gnused, coreutils, findutils, gzip, lzma, gnutar
+, docbook_xsl, openssh, gnused, coreutils, findutils, gzip, xz, gnutar
 , rpm, dpkg, cdrkit, pixz, lib, boost, autoreconfHook, src ? null, version ? null
 , migration ? false, patches ? []
 , tests ? {}, mdbook
@@ -89,7 +89,7 @@ in stdenv.mkDerivation rec {
 
   hydraPath = lib.makeBinPath (
     [ sqlite subversion openssh nix coreutils findutils pixz
-      gzip bzip2 lzma gnutar unzip git top-git mercurial /*darcs*/ gnused breezy
+      gzip bzip2 xz gnutar unzip git top-git mercurial /*darcs*/ gnused breezy
     ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] );
 
   nativeBuildInputs = [ autoreconfHook pkg-config mdbook ];
diff --git a/pkgs/development/tools/misc/texinfo/4.13a.nix b/pkgs/development/tools/misc/texinfo/4.13a.nix
index 5f4478bd4fb..b8da38ace6f 100644
--- a/pkgs/development/tools/misc/texinfo/4.13a.nix
+++ b/pkgs/development/tools/misc/texinfo/4.13a.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, texinfo, ncurses, lzma }:
+{ stdenv, fetchurl, texinfo, ncurses, xz }:
 
 stdenv.mkDerivation rec {
   pname = "texinfo";
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ ncurses ];
-  nativeBuildInputs = [ lzma ];
+  nativeBuildInputs = [ xz ];
 
   # Disabled because we don't have zdiff in the stdenv bootstrap.
   #doCheck = true;
diff --git a/pkgs/development/tools/vogl/default.nix b/pkgs/development/tools/vogl/default.nix
index 315a896929d..2e9e8936ddb 100644
--- a/pkgs/development/tools/vogl/default.nix
+++ b/pkgs/development/tools/vogl/default.nix
@@ -1,7 +1,7 @@
 { mkDerivation, lib, fetchFromGitHub
 , cmake, git, pkg-config, wget, zip
 , qtbase, qtx11extras
-, libdwarf, libjpeg_turbo, libunwind, lzma, tinyxml, libX11
+, libdwarf, libjpeg_turbo, libunwind, xz, tinyxml, libX11
 , SDL2, SDL2_gfx, SDL2_image, SDL2_ttf
 , freeglut, libGLU
 , fetchpatch
@@ -31,7 +31,7 @@ mkDerivation {
   buildInputs = [
     git wget zip
     qtbase qtx11extras
-    libdwarf libjpeg_turbo libunwind lzma tinyxml libX11
+    libdwarf libjpeg_turbo libunwind xz tinyxml libX11
     SDL2 SDL2_gfx SDL2_image SDL2_ttf
     freeglut libGLU
   ];
diff --git a/pkgs/games/freeciv/default.nix b/pkgs/games/freeciv/default.nix
index dea159f53bf..3ffb7e0c549 100644
--- a/pkgs/games/freeciv/default.nix
+++ b/pkgs/games/freeciv/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, autoreconfHook, lua5_3, pkg-config, python3
-, zlib, bzip2, curl, lzma, gettext, libiconv
+, zlib, bzip2, curl, xz, gettext, libiconv
 , sdlClient ? true, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx, freetype, fluidsynth
 , gtkClient ? false, gtk3
 , qtClient ? false, qt5
@@ -31,7 +31,7 @@ in stdenv.mkDerivation rec {
   nativeBuildInputs = [ autoreconfHook pkg-config ]
     ++ optional qtClient [ qt5.wrapQtAppsHook ];
 
-  buildInputs = [ lua5_3 zlib bzip2 curl lzma gettext libiconv ]
+  buildInputs = [ lua5_3 zlib bzip2 curl xz gettext libiconv ]
     ++ optionals sdlClient [ SDL SDL_mixer SDL_image SDL_ttf SDL_gfx freetype fluidsynth ]
     ++ optionals gtkClient [ gtk3 ]
     ++ optionals qtClient  [ qt5.qtbase ]
diff --git a/pkgs/games/spring/default.nix b/pkgs/games/spring/default.nix
index fef1a0f0928..21aca573062 100644
--- a/pkgs/games/spring/default.nix
+++ b/pkgs/games/spring/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, lzma, boost, libdevil, zlib, p7zip
+{ lib, stdenv, fetchFromGitHub, cmake, xz, boost, libdevil, zlib, p7zip
 , openal, libvorbis, glew, freetype, xorg, SDL2, libGLU, libGL
 , asciidoc, docbook_xsl, docbook_xsl_ns, curl, makeWrapper
 , jdk ? null, python ? null, systemd, libunwind, which, minizip
@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
                 "-DPREFER_STATIC_LIBS:BOOL=OFF"];
 
   nativeBuildInputs = [ cmake makeWrapper docbook_xsl docbook_xsl_ns asciidoc ];
-  buildInputs = [ lzma boost libdevil zlib p7zip openal libvorbis freetype SDL2
+  buildInputs = [ xz boost libdevil zlib p7zip openal libvorbis freetype SDL2
     xorg.libX11 xorg.libXcursor libGLU libGL glew curl
     systemd libunwind which minizip ]
     ++ lib.optional withAI jdk
diff --git a/pkgs/misc/emulators/cdemu/libmirage.nix b/pkgs/misc/emulators/cdemu/libmirage.nix
index 0b8090ce41d..9813c906bef 100644
--- a/pkgs/misc/emulators/cdemu/libmirage.nix
+++ b/pkgs/misc/emulators/cdemu/libmirage.nix
@@ -1,5 +1,5 @@
 { callPackage, gobject-introspection, cmake, pkg-config
-, glib, libsndfile, zlib, bzip2, lzma, libsamplerate, intltool
+, glib, libsndfile, zlib, bzip2, xz, libsamplerate, intltool
 , pcre, util-linux, libselinux, libsepol }:
 
 let pkg = import ./base.nix {
@@ -8,7 +8,7 @@ let pkg = import ./base.nix {
   pkgSha256 = "08mfvqyk3833ksfd47i4j3ppmrw5ry219km6h7lywdh9hm9x14yf";
 };
 in callPackage pkg {
-  buildInputs = [ glib libsndfile zlib bzip2 lzma libsamplerate intltool ];
+  buildInputs = [ glib libsndfile zlib bzip2 xz libsamplerate intltool ];
   drvParams = {
     PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "out"}/share/gir-1.0";
     PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";
diff --git a/pkgs/misc/lightspark/default.nix b/pkgs/misc/lightspark/default.nix
index c45240982a7..7c9a4815e0a 100644
--- a/pkgs/misc/lightspark/default.nix
+++ b/pkgs/misc/lightspark/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, pkg-config, cmake, curl, zlib, ffmpeg_3, glew, pcre
-, rtmpdump, cairo, boost, SDL2, SDL2_mixer, libjpeg, pango, lzma, nasm
+, rtmpdump, cairo, boost, SDL2, SDL2_mixer, libjpeg, pango, xz, nasm
 , llvm, glibmm
 }:
 
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     curl zlib ffmpeg_3 glew pcre rtmpdump cairo boost SDL2 SDL2_mixer libjpeg
-    pango lzma nasm llvm glibmm
+    pango xz nasm llvm glibmm
   ];
 
   meta = with lib; {
diff --git a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix
index 258d9785e70..53f98e2b457 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix
@@ -1,8 +1,8 @@
-{ lib, appleDerivation, xcbuildHook, zlib, bzip2, lzma, ncurses, libutil }:
+{ lib, appleDerivation, xcbuildHook, zlib, bzip2, xz, ncurses, libutil }:
 
 appleDerivation {
   nativeBuildInputs = [ xcbuildHook ];
-  buildInputs = [ zlib bzip2 lzma ncurses libutil ];
+  buildInputs = [ zlib bzip2 xz ncurses libutil ];
 
   # some commands not working:
   # mtree: _simple.h not found
diff --git a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/text_cmds/default.nix
index 3f0c91db91c..f1fff353c0e 100644
--- a/pkgs/os-specific/darwin/apple-source-releases/text_cmds/default.nix
+++ b/pkgs/os-specific/darwin/apple-source-releases/text_cmds/default.nix
@@ -1,8 +1,8 @@
-{ lib, appleDerivation, xcbuildHook, ncurses, bzip2, zlib, lzma }:
+{ lib, appleDerivation, xcbuildHook, ncurses, bzip2, zlib, xz }:
 
 appleDerivation {
   nativeBuildInputs = [ xcbuildHook ];
-  buildInputs = [ ncurses bzip2 zlib lzma ];
+  buildInputs = [ ncurses bzip2 zlib xz ];
 
   # patches to use ncursees
   # disables md5
diff --git a/pkgs/os-specific/linux/firmware/firmware-manager/default.nix b/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
index f7f02037800..80730fdbefb 100644
--- a/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
+++ b/pkgs/os-specific/linux/firmware/firmware-manager/default.nix
@@ -1,4 +1,4 @@
-{ rustPlatform, lib, fetchFromGitHub, lzma, pkg-config, openssl, dbus, glib, udev, cairo, pango, atk, gdk-pixbuf, gtk3, wrapGAppsHook }:
+{ rustPlatform, lib, fetchFromGitHub, xz, pkg-config, openssl, dbus, glib, udev, cairo, pango, atk, gdk-pixbuf, gtk3, wrapGAppsHook }:
 rustPlatform.buildRustPackage rec {
   pname = "firmware-manager";
   version = "0.1.2";
@@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs = [ pkg-config wrapGAppsHook ];
 
-  buildInputs = [ lzma openssl dbus glib udev cairo pango atk gdk-pixbuf gtk3 ];
+  buildInputs = [ xz openssl dbus glib udev cairo pango atk gdk-pixbuf gtk3 ];
 
   depsExtraArgs.postPatch = "make prefix='$(out)' toml-gen";
 
diff --git a/pkgs/os-specific/linux/firmware/system76-firmware/default.nix b/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
index 138fea042fc..9d47d50b43f 100644
--- a/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
+++ b/pkgs/os-specific/linux/firmware/system76-firmware/default.nix
@@ -1,4 +1,4 @@
-{ rustPlatform, lib, fetchFromGitHub, lzma, pkg-config, openssl, dbus, efibootmgr, makeWrapper }:
+{ rustPlatform, lib, fetchFromGitHub, xz, pkg-config, openssl, dbus, efibootmgr, makeWrapper }:
 rustPlatform.buildRustPackage rec {
   pname = "system76-firmware";
   # Check Makefile when updating, make sure postInstall matches make install
@@ -13,7 +13,7 @@ rustPlatform.buildRustPackage rec {
 
   nativeBuildInputs = [ pkg-config makeWrapper ];
 
-  buildInputs = [ lzma openssl dbus ];
+  buildInputs = [ xz openssl dbus ];
 
   cargoBuildFlags = [ "--workspace" ];
 
diff --git a/pkgs/os-specific/windows/cygwin-setup/default.nix b/pkgs/os-specific/windows/cygwin-setup/default.nix
index c51cafa9ace..91dad81f1f5 100644
--- a/pkgs/os-specific/windows/cygwin-setup/default.nix
+++ b/pkgs/os-specific/windows/cygwin-setup/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchcvs, autoconf, automake, libtool, flex, bison, pkg-config
-, zlib, bzip2, lzma, libgcrypt
+, zlib, bzip2, xz, libgcrypt
 }:
 
 with lib;
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
       buildInputs = map mkStatic (o.buildInputs or []);
       propagatedBuildInputs = map mkStatic (o.propagatedBuildInputs or []);
     });
-  in map mkStatic [ zlib bzip2 lzma libgcrypt ];
+  in map mkStatic [ zlib bzip2 xz libgcrypt ];
 
   configureFlags = [ "--disable-shared" ];
 
diff --git a/pkgs/servers/http/apt-cacher-ng/default.nix b/pkgs/servers/http/apt-cacher-ng/default.nix
index 4ed03450af7..c79a9fe3fd2 100644
--- a/pkgs/servers/http/apt-cacher-ng/default.nix
+++ b/pkgs/servers/http/apt-cacher-ng/default.nix
@@ -5,7 +5,7 @@
 , fetchurl
 , fuse
 , libevent
-, lzma
+, xz
 , openssl
 , pkg-config
 , systemd
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ cmake doxygen pkg-config ];
-  buildInputs = [ bzip2 fuse libevent lzma openssl systemd tcp_wrappers zlib ];
+  buildInputs = [ bzip2 fuse libevent xz openssl systemd tcp_wrappers zlib ];
 
   meta = with lib; {
     description = "A caching proxy specialized for linux distribution files";
diff --git a/pkgs/tools/archivers/fsarchiver/default.nix b/pkgs/tools/archivers/fsarchiver/default.nix
index 571798fcd2e..80664a6a449 100644
--- a/pkgs/tools/archivers/fsarchiver/default.nix
+++ b/pkgs/tools/archivers/fsarchiver/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config
-, zlib, bzip2, lzma, lzo, lz4, zstd, xz
+, zlib, bzip2, lzo, lz4, zstd, xz
 , libgcrypt, e2fsprogs, util-linux, libgpgerror }:
 
 let
@@ -21,7 +21,7 @@ in stdenv.mkDerivation {
   ];
 
   buildInputs = [
-    zlib bzip2 lzma lzo lz4 zstd xz
+    zlib bzip2 xz lzo lz4 zstd xz
     libgcrypt e2fsprogs util-linux libgpgerror
   ];
 
diff --git a/pkgs/tools/archivers/innoextract/default.nix b/pkgs/tools/archivers/innoextract/default.nix
index d1cb93093d3..4822ea82d1e 100644
--- a/pkgs/tools/archivers/innoextract/default.nix
+++ b/pkgs/tools/archivers/innoextract/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, cmake, makeWrapper
-, boost, lzma
+, boost, xz
 , withGog ? false, unar ? null }:
 
 stdenv.mkDerivation rec {
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "09l1z1nbl6ijqqwszdwch9mqr54qb7df0wp2sd77v17dq6gsci33";
   };
 
-  buildInputs = [ lzma boost ];
+  buildInputs = [ xz boost ];
 
   # Python is reported as missing during the build, however
   # including Python does not change the output.
diff --git a/pkgs/tools/backup/rdedup/default.nix b/pkgs/tools/backup/rdedup/default.nix
index 94c7e711267..3d908dd24a1 100644
--- a/pkgs/tools/backup/rdedup/default.nix
+++ b/pkgs/tools/backup/rdedup/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, libsodium
-, llvmPackages, clang, lzma
+, llvmPackages, clang, xz
 , Security }:
 
 rustPlatform.buildRustPackage rec {
@@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
   ];
 
   nativeBuildInputs = [ pkg-config llvmPackages.libclang clang ];
-  buildInputs = [ openssl libsodium lzma ]
+  buildInputs = [ openssl libsodium xz ]
     ++ (lib.optional stdenv.isDarwin Security);
 
   configurePhase = ''
diff --git a/pkgs/tools/compression/pbzx/default.nix b/pkgs/tools/compression/pbzx/default.nix
index 2804ed7a0b5..8a57d483ab2 100644
--- a/pkgs/tools/compression/pbzx/default.nix
+++ b/pkgs/tools/compression/pbzx/default.nix
@@ -1,4 +1,4 @@
-{stdenv, lib, fetchFromGitHub, lzma, xar}:
+{stdenv, lib, fetchFromGitHub, xz, xar}:
 
 stdenv.mkDerivation rec {
   pname = "pbzx";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     rev = "v${version}";
     sha256 = "0bwd7wmnhpz1n5p39mh6asfyccj4cm06hwigslcwbb3pdwmvxc90";
   };
-  buildInputs = [ lzma xar ];
+  buildInputs = [ xz xar ];
   buildPhase = ''
     cc pbzx.c -llzma -lxar -o pbzx
   '';
diff --git a/pkgs/tools/compression/pixz/default.nix b/pkgs/tools/compression/pixz/default.nix
index 833dcae8850..d0418ffdd60 100644
--- a/pkgs/tools/compression/pixz/default.nix
+++ b/pkgs/tools/compression/pixz/default.nix
@@ -1,7 +1,7 @@
 {
   lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config
   , asciidoc, libxslt, libxml2, docbook_xml_dtd_45, docbook_xsl
-  , libarchive, lzma
+  , libarchive, xz
 }:
 stdenv.mkDerivation rec {
   baseName = "pixz";
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   buildInputs = [
     autoconf automake libtool asciidoc libxslt libxml2
     docbook_xml_dtd_45 docbook_xsl
-    libarchive lzma
+    libarchive xz
   ];
   preBuild = ''
     echo "XML_CATALOG_FILES='$XML_CATALOG_FILES'"
diff --git a/pkgs/tools/compression/pxz/default.nix b/pkgs/tools/compression/pxz/default.nix
index e337ccdd4ae..eb1f5d3570b 100644
--- a/pkgs/tools/compression/pxz/default.nix
+++ b/pkgs/tools/compression/pxz/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchgit, xz, lzma }:
+{ lib, stdenv, fetchgit, xz }:
 
 let name = "pxz";
     version = "4.999.9beta+git";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
     sha256 = "0na2kw8cf0qd8l1aywlv9m3xrxnqlcwxfdwp3f7x9vxwqx3k32kc";
   };
 
-  buildInputs = [ lzma ];
+  buildInputs = [ xz ];
 
   patches = [ ./_SC_ARG_MAX.patch ];
 
diff --git a/pkgs/tools/compression/xar/default.nix b/pkgs/tools/compression/xar/default.nix
index 5d7c2b09220..32b6c6d005c 100644
--- a/pkgs/tools/compression/xar/default.nix
+++ b/pkgs/tools/compression/xar/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, libxml2, lzma, openssl, zlib, bzip2, fts, autoconf }:
+{ lib, stdenv, fetchurl, libxml2, xz, openssl, zlib, bzip2, fts, autoconf }:
 
 stdenv.mkDerivation rec {
   version = "1.6.1";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     sha256 = "0ghmsbs6xwg1092v7pjcibmk5wkyifwxw6ygp08gfz25d2chhipf";
   };
 
-  buildInputs = [ libxml2 lzma openssl zlib bzip2 fts autoconf ];
+  buildInputs = [ libxml2 xz openssl zlib bzip2 fts autoconf ];
 
   prePatch = ''
     substituteInPlace configure.ac \
diff --git a/pkgs/tools/filesystems/sasquatch/default.nix b/pkgs/tools/filesystems/sasquatch/default.nix
index 7f92da6a224..66f74944150 100644
--- a/pkgs/tools/filesystems/sasquatch/default.nix
+++ b/pkgs/tools/filesystems/sasquatch/default.nix
@@ -2,7 +2,6 @@
 , fetchurl
 , lz4 ? null
 , lz4Support ? false
-, lzma
 , lzo
 , lib, stdenv
 , xz
@@ -28,7 +27,7 @@ stdenv.mkDerivation rec {
     sha256 = "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d";
   };
 
-  buildInputs = [ lzma lzo xz zlib ]
+  buildInputs = [ xz lzo xz zlib ]
     ++ lib.optional lz4Support lz4;
 
   patches = [ patch ];
diff --git a/pkgs/tools/misc/fwup/default.nix b/pkgs/tools/misc/fwup/default.nix
index 5d3259c4b6e..de2b809eea5 100644
--- a/pkgs/tools/misc/fwup/default.nix
+++ b/pkgs/tools/misc/fwup/default.nix
@@ -8,7 +8,7 @@
 , libarchive
 , libconfuse
 , libsodium
-, lzma
+, xz
 , zlib
 , coreutils
 , dosfstools
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
     libarchive
     libconfuse
     libsodium
-    lzma
+    xz
     zlib
   ]
     ++ lib.optionals stdenv.isDarwin [
diff --git a/pkgs/tools/misc/osinfo-db-tools/default.nix b/pkgs/tools/misc/osinfo-db-tools/default.nix
index cb3e8bd057a..4ee1749c6d3 100644
--- a/pkgs/tools/misc/osinfo-db-tools/default.nix
+++ b/pkgs/tools/misc/osinfo-db-tools/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, pkg-config, meson, ninja, gettext, glib, libxml2, perl, python3
-, libxslt, libarchive, bzip2, lzma, json-glib, libsoup
+, libxslt, libarchive, bzip2, xz, json-glib, libsoup
 }:
 
 stdenv.mkDerivation rec {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ meson ninja pkg-config gettext perl python3 ];
-  buildInputs = [ glib json-glib libxml2 libxslt libarchive bzip2 lzma libsoup ];
+  buildInputs = [ glib json-glib libxml2 libxslt libarchive bzip2 xz libsoup ];
 
   meta = with lib; {
     description = "Tools for managing the osinfo database";
diff --git a/pkgs/tools/networking/wget2/default.nix b/pkgs/tools/networking/wget2/default.nix
index 1537da36163..3fd40f8a7ba 100644
--- a/pkgs/tools/networking/wget2/default.nix
+++ b/pkgs/tools/networking/wget2/default.nix
@@ -17,7 +17,7 @@
 , libhsts
 , libidn2
 , libpsl
-, lzma
+, xz
 , nghttp2
 , sslSupport ? true
 , openssl
@@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ autoreconfHook flex lzip pkg-config python3 texinfo ];
 
-  buildInputs = [ brotli bzip2 gpgme libhsts libidn2 libpsl lzma nghttp2 pcre2 zlib zstd ]
+  buildInputs = [ brotli bzip2 gpgme libhsts libidn2 libpsl xz nghttp2 pcre2 zlib zstd ]
     ++ lib.optional sslSupport openssl;
 
   # TODO: include translation files
diff --git a/pkgs/tools/package-management/apt/default.nix b/pkgs/tools/package-management/apt/default.nix
index 178103cdb38..86982bf7f3a 100644
--- a/pkgs/tools/package-management/apt/default.nix
+++ b/pkgs/tools/package-management/apt/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchurl, pkg-config, cmake, perlPackages, curl, gtest
-, gnutls, libtasn1, lzma, bzip2, lz4, zstd, libseccomp, udev
+, gnutls, libtasn1, xz, bzip2, lz4, zstd, libseccomp, udev
 , db, dpkg, libxslt, docbook_xsl, docbook_xml_dtd_45
 
 # used when WITH_DOC=ON
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkg-config cmake gtest libxslt.bin ];
 
   buildInputs = [
-    perlPackages.perl curl gnutls libtasn1 lzma bzip2 lz4 zstd libseccomp udev db dpkg
+    perlPackages.perl curl gnutls libtasn1 xz bzip2 lz4 zstd libseccomp udev db dpkg
   ] ++ lib.optionals withDocs [
     doxygen perlPackages.Po4a w3m docbook_xml_dtd_45
   ] ++ lib.optionals withNLS [
diff --git a/pkgs/tools/package-management/opkg/default.nix b/pkgs/tools/package-management/opkg/default.nix
index 7f06cbbd3c2..631274cb722 100644
--- a/pkgs/tools/package-management/opkg/default.nix
+++ b/pkgs/tools/package-management/opkg/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkg-config, curl, gpgme, libarchive, bzip2, lzma, attr, acl, libxml2
+{ lib, stdenv, fetchurl, pkg-config, curl, gpgme, libarchive, bzip2, xz, attr, acl, libxml2
 , autoreconfHook }:
 
 stdenv.mkDerivation rec {
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkg-config autoreconfHook ];
-  buildInputs = [ curl gpgme libarchive bzip2 lzma attr acl libxml2 ];
+  buildInputs = [ curl gpgme libarchive bzip2 xz attr acl libxml2 ];
 
   meta = with lib; {
     description = "A lightweight package management system based upon ipkg";
diff --git a/pkgs/tools/package-management/pacman/default.nix b/pkgs/tools/package-management/pacman/default.nix
index 771454cd409..48fa91c7966 100644
--- a/pkgs/tools/package-management/pacman/default.nix
+++ b/pkgs/tools/package-management/pacman/default.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchurl, pkg-config, m4, perl, libarchive, openssl, zlib, bzip2,
-lzma, curl, runtimeShell }:
+xz, curl, runtimeShell }:
 
 stdenv.mkDerivation rec {
   pname = "pacman";
@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
   installFlags = [ "sysconfdir=${placeholder "out"}/etc" ];
 
   nativeBuildInputs = [ pkg-config m4 ];
-  buildInputs = [ curl perl libarchive openssl zlib bzip2 lzma ];
+  buildInputs = [ curl perl libarchive openssl zlib bzip2 xz ];
 
   postFixup = ''
     substituteInPlace $out/bin/repo-add \
diff --git a/pkgs/tools/security/enpass/default.nix b/pkgs/tools/security/enpass/default.nix
index 107bf56cf82..2444d1f1d72 100644
--- a/pkgs/tools/security/enpass/default.nix
+++ b/pkgs/tools/security/enpass/default.nix
@@ -2,7 +2,7 @@
 , glib, libGLU, libGL, libpulseaudio, zlib, dbus, fontconfig, freetype
 , gtk3, pango
 , makeWrapper , python2Packages, lib
-, lsof, curl, libuuid, cups, mesa, lzma, libxkbcommon
+, lsof, curl, libuuid, cups, mesa, xz, libxkbcommon
 }:
 
 let
@@ -38,7 +38,7 @@ let
     curl
     libuuid
     cups
-    lzma
+    xz
     libxkbcommon
   ]);
   package = stdenv.mkDerivation {
diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix
index f040b17f892..0291d7bb3aa 100644
--- a/pkgs/tools/security/tor/default.nix
+++ b/pkgs/tools/security/tor/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchurl, pkg-config, libevent, openssl, zlib, torsocks
-, libseccomp, systemd, libcap, lzma, zstd, scrypt, nixosTests
+, libseccomp, systemd, libcap, xz, zstd, scrypt, nixosTests
 , writeShellScript
 
 # for update.nix
@@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "geoip" ];
 
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ libevent openssl zlib lzma zstd scrypt ] ++
+  buildInputs = [ libevent openssl zlib xz zstd scrypt ] ++
     lib.optionals stdenv.isLinux [ libseccomp systemd libcap ];
 
   patches = [ ./disable-monotonic-timer-tests.patch ];
diff --git a/pkgs/tools/system/thermald/default.nix b/pkgs/tools/system/thermald/default.nix
index 5e42a791835..4d2ca811837 100644
--- a/pkgs/tools/system/thermald/default.nix
+++ b/pkgs/tools/system/thermald/default.nix
@@ -10,7 +10,7 @@
 , libevdev
 , libtool
 , libxml2
-, lzma
+, xz
 , pkg-config
 , lib, stdenv
 , upower
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
     dbus-glib
     libevdev
     libxml2
-    lzma
+    xz
     upower
   ];
 
diff --git a/pkgs/tools/system/vboot_reference/default.nix b/pkgs/tools/system/vboot_reference/default.nix
index 6f8ba2b07eb..b4b92b8f90f 100644
--- a/pkgs/tools/system/vboot_reference/default.nix
+++ b/pkgs/tools/system/vboot_reference/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitiles, pkg-config, libuuid, openssl, libyaml, lzma }:
+{ lib, stdenv, fetchFromGitiles, pkg-config, libuuid, openssl, libyaml, xz }:
 
 stdenv.mkDerivation rec {
   version = "20180311";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ openssl libuuid libyaml lzma ];
+  buildInputs = [ openssl libuuid libyaml xz ];
 
   enableParallelBuilding = true;
 
diff --git a/pkgs/tools/text/silver-searcher/default.nix b/pkgs/tools/text/silver-searcher/default.nix
index 177c556a337..8cd67b99263 100644
--- a/pkgs/tools/text/silver-searcher/default.nix
+++ b/pkgs/tools/text/silver-searcher/default.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, pcre, zlib, lzma}:
+{lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, pcre, zlib, xz}:
 
 stdenv.mkDerivation rec {
   pname = "silver-searcher";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
   NIX_LDFLAGS = lib.optionalString stdenv.isLinux "-lgcc_s";
 
   nativeBuildInputs = [ autoreconfHook pkg-config ];
-  buildInputs = [ pcre zlib lzma ];
+  buildInputs = [ pcre zlib xz ];
 
   meta = with lib; {
     homepage = "https://github.com/ggreer/the_silver_searcher/";
diff --git a/pkgs/tools/text/zimwriterfs/default.nix b/pkgs/tools/text/zimwriterfs/default.nix
index c2600ec46f6..9a7e495df2b 100644
--- a/pkgs/tools/text/zimwriterfs/default.nix
+++ b/pkgs/tools/text/zimwriterfs/default.nix
@@ -9,7 +9,7 @@
 , file
 , icu
 , gumbo
-, lzma
+, xz
 , xapian
 , zimlib
 , zlib
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ automake autoconf libtool pkg-config ];
-  buildInputs = [ file icu gumbo lzma zimlib zlib xapian ];
+  buildInputs = [ file icu gumbo xz zimlib zlib xapian ];
   setSourceRoot = ''
     sourceRoot=$(echo */zimwriterfs)
   '';
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index cceadc37245..75fed66865c 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -399,6 +399,7 @@ mapAliases ({
   lua5_expat = luaPackages.luaexpat; # added 2017-05-02
   lua5_sec = luaPackages.luasec; # added 2017-05-02
   lxappearance-gtk3 = throw "lxappearance-gtk3 has been removed. Use lxappearance instead, which now defaults to Gtk3";  # added 2020-06-03
+  lzma = xz; # moved from top-level 2021-03-14
   m3d-linux = m33-linux; # added 2016-08-13
   man_db = man-db; # added 2016-05
   manpages = man-pages; # added 2015-12-06
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 9ec43106f48..536f2438ad9 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6345,7 +6345,6 @@ in
   luxcorerender = callPackage ../tools/graphics/luxcorerender { };
 
   xz = callPackage ../tools/compression/xz { };
-  lzma = xz; # TODO: move to aliases.nix
 
   lz4 = callPackage ../tools/compression/lz4 { };
 
diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix
index a394c4d8eee..7f86b30aaf0 100644
--- a/pkgs/top-level/release-small.nix
+++ b/pkgs/top-level/release-small.nix
@@ -93,7 +93,7 @@ with import ./release-lib.nix { inherit supportedSystems nixpkgsArgs; };
   ltrace = linux;
   lvm2 = linux;
   lynx = linux;
-  lzma = linux;
+  xz = linux;
   man = linux;
   man-pages = linux;
   mc = all;