diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-01-24 16:54:31 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-04-09 11:34:13 +0000 |
commit | 918fcc9b6e8e00961af46ebd0adde0bd9fcb5afc (patch) | |
tree | b16cc1317a6233c04675398610f557c6ee7d1fbc | |
parent | cd70609d8fa10b4564d5eb806529813e679cd097 (diff) | |
download | nixpkgs-918fcc9b6e8e00961af46ebd0adde0bd9fcb5afc.tar nixpkgs-918fcc9b6e8e00961af46ebd0adde0bd9fcb5afc.tar.gz nixpkgs-918fcc9b6e8e00961af46ebd0adde0bd9fcb5afc.tar.bz2 nixpkgs-918fcc9b6e8e00961af46ebd0adde0bd9fcb5afc.tar.lz nixpkgs-918fcc9b6e8e00961af46ebd0adde0bd9fcb5afc.tar.xz nixpkgs-918fcc9b6e8e00961af46ebd0adde0bd9fcb5afc.tar.zst nixpkgs-918fcc9b6e8e00961af46ebd0adde0bd9fcb5afc.zip |
cryptsetup: make all programs optional
Some use cases (think appliances) call for veritysetup but not cryptsetup, and others (like NixOS) don't need veritysetup and usually not integritysetup. This is especially useful for pkgsStatic where each program contains a whole copy of the libraries it needs so is quite large.
-rw-r--r-- | pkgs/os-specific/linux/cryptsetup/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/cryptsetup/default.nix b/pkgs/os-specific/linux/cryptsetup/default.nix index 0e7988f4d99..acf3ec3f492 100644 --- a/pkgs/os-specific/linux/cryptsetup/default.nix +++ b/pkgs/os-specific/linux/cryptsetup/default.nix @@ -1,6 +1,8 @@ { lib, stdenv, fetchurl, lvm2, json_c, asciidoctor , openssl, libuuid, pkg-config, popt, nixosTests - + # Programs enabled by default upstream are implicitly enabled unless + # manually set to false. +, programs ? { cryptsetup-reencrypt = true; } # The release tarballs contain precomputed manpage files, so we don't need # to run asciidoctor on the man sources. By avoiding asciidoctor, we make # the bare NixOS build hash independent of changes to the ruby ecosystem, @@ -48,7 +50,7 @@ stdenv.mkDerivation rec { # support, because the path still gets included in the binary even # though it isn't used. "--with-luks2-external-tokens-path=/" - ]; + ] ++ (with lib; mapAttrsToList (flip enableFeature)) programs; nativeBuildInputs = [ pkg-config ] ++ lib.optionals rebuildMan [ asciidoctor ]; buildInputs = [ lvm2 json_c openssl libuuid popt ]; |