about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-09-23 14:59:16 +0100
committerYureka <yuka@yuka.dev>2022-10-09 08:11:33 +0200
commite5b5136429ab1df2ec1818dd8e8ae4ff04e3cf23 (patch)
tree53e2bb6fb2c09c7bff75f6fccd2bd9552128ae06 /pkgs/os-specific
parentc4bf5cbd849531a00e064f7be4d7d5f592c69b4d (diff)
cryptsetup: Remove ruby build dependency from NixOS
Removing this build dependency makes most NixOS tests completely
independent of the ruby ecosystem.
This helps reduce mass-rebuilds, which is especially useful when
bisecting the staging branch using a NixOS test.
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/cryptsetup/default.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/cryptsetup/default.nix b/pkgs/os-specific/linux/cryptsetup/default.nix
index 62f3f0c4db14b..2bf95abb8eee1 100644
--- a/pkgs/os-specific/linux/cryptsetup/default.nix
+++ b/pkgs/os-specific/linux/cryptsetup/default.nix
@@ -1,5 +1,12 @@
 { lib, stdenv, fetchurl, lvm2, json_c, asciidoctor
-, openssl, libuuid, pkg-config, popt }:
+, openssl, libuuid, pkg-config, popt
+
+  # 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,
+  # saving mass-rebuilds.
+, rebuildMan ? false
+}:
 
 stdenv.mkDerivation rec {
   pname = "cryptsetup";
@@ -28,6 +35,8 @@ stdenv.mkDerivation rec {
     "--enable-cryptsetup-reencrypt"
     "--with-crypto_backend=openssl"
     "--disable-ssh-token"
+  ] ++ lib.optionals (!rebuildMan) [
+    "--disable-asciidoc"
   ] ++ lib.optionals stdenv.hostPlatform.isStatic [
     "--disable-external-tokens"
     # We have to override this even though we're removing token
@@ -36,7 +45,7 @@ stdenv.mkDerivation rec {
     "--with-luks2-external-tokens-path=/"
   ];
 
-  nativeBuildInputs = [ pkg-config asciidoctor ];
+  nativeBuildInputs = [ pkg-config ] ++ lib.optionals rebuildMan [ asciidoctor ];
   buildInputs = [ lvm2 json_c openssl libuuid popt ];
 
   # The test [7] header backup in compat-test fails with a mysterious