diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-01-24 12:53:19 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-03-22 21:18:06 +0000 |
commit | 4d5f62b904ee02148867f073ba952290ebbfb9b0 (patch) | |
tree | c9bfc7e8d63caaea133bbde8915c4b15be661c2f | |
parent | 8ecb79026427f38b096f7782de9a61c03ca0e3a0 (diff) | |
download | nixpkgs-4d5f62b904ee02148867f073ba952290ebbfb9b0.tar nixpkgs-4d5f62b904ee02148867f073ba952290ebbfb9b0.tar.gz nixpkgs-4d5f62b904ee02148867f073ba952290ebbfb9b0.tar.bz2 nixpkgs-4d5f62b904ee02148867f073ba952290ebbfb9b0.tar.lz nixpkgs-4d5f62b904ee02148867f073ba952290ebbfb9b0.tar.xz nixpkgs-4d5f62b904ee02148867f073ba952290ebbfb9b0.tar.zst nixpkgs-4d5f62b904ee02148867f073ba952290ebbfb9b0.zip |
cryptsetup: separate binaries from libraries
This reduces closure sizes by making the libraries not depend on the binaries, which is good for static builds, and (when statically linked) making the binaries not depend on the libraries, which is good for static builds. When static building, we additionally have to disable loading LUKS plugins from $lib to avoid a reference, which probably wouldn't have worked anyway.
-rw-r--r-- | pkgs/os-specific/linux/cryptsetup/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/cryptsetup/default.nix b/pkgs/os-specific/linux/cryptsetup/default.nix index a9bd508d16e..be819802394 100644 --- a/pkgs/os-specific/linux/cryptsetup/default.nix +++ b/pkgs/os-specific/linux/cryptsetup/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { pname = "cryptsetup"; version = "2.4.3"; - outputs = [ "out" "dev" "man" ]; + outputs = [ "bin" "out" "dev" "man" ]; separateDebugInfo = true; src = fetchurl { @@ -31,6 +31,12 @@ stdenv.mkDerivation rec { "--enable-cryptsetup-reencrypt" "--with-crypto_backend=openssl" "--disable-ssh-token" + ] ++ lib.optionals stdenv.hostPlatform.isStatic [ + "--disable-external-tokens" + # We have to override this even though we're removing token + # support, because the path still gets included in the binary even + # though it isn't used. + "--with-luks2-external-tokens-path=/" ]; nativeBuildInputs = [ pkg-config ]; |