about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2024-02-11 09:18:19 +0000
committerSergei Trofimovich <slyich@gmail.com>2024-02-11 09:18:19 +0000
commit6810156f7df0d1de951596967519ab9127dd6e68 (patch)
tree71828496af04b3f787d260c2948e3744e136b6a9 /pkgs/tools
parentef6206934d5726ed9315ac78879f5ba2a6b55785 (diff)
stenc: fix `gcc-13` build failure
Without the change build fails on` master` as
https://hydra.nixos.org/build/247722183:

    In file included from main.cpp:17:
    scsiencrypt.h:357:21: error: 'uint8_t' has not been declared
      357 |                     uint8_t *buffer);
          |                     ^~~~~~~
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/backup/stenc/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/tools/backup/stenc/default.nix b/pkgs/tools/backup/stenc/default.nix
index fe45720ee814e..fb8d71c73119c 100644
--- a/pkgs/tools/backup/stenc/default.nix
+++ b/pkgs/tools/backup/stenc/default.nix
@@ -16,6 +16,13 @@ stdenv.mkDerivation rec {
     sha256 = "GcCRVkv+1mREq3MhMRn5fICthwI4WRQJSP6InuzxP1Q=";
   };
 
+  postPatch = ''
+    # Fix gcc-13 build by pulling missing header. UPstream also fixed it
+    # in next major version, but there are many other patch dependencies.
+    # TODO: remove on next major version update
+    sed -e '1i #include <cstdint>' -i src/scsiencrypt.h
+  '';
+
   nativeBuildInputs = [ autoreconfHook ];
 
   passthru.updateScript = gitUpdater { };