nixpkgs/pkgs/tools/backup/stenc/default.nix
Sergei Trofimovich 6810156f7d 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);
          |                     ^~~~~~~
2024-02-11 09:18:19 +00:00

37 lines
892 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, gitUpdater
, autoreconfHook
}:
stdenv.mkDerivation rec {
pname = "stenc";
version = "1.1.1";
src = fetchFromGitHub {
owner = "scsitape";
repo = "stenc";
rev = version;
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 { };
meta = {
description = "SCSI Tape Encryption Manager";
homepage = "https://github.com/scsitape/stenc";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ woffs ];
platforms = lib.platforms.linux;
};
}