about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/backup/stenc/default.nix
blob: 96e7ed5eca8d4fdd0ace3c69fdd8164883c0bdf6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ 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";
    mainProgram = "stenc";
    homepage = "https://github.com/scsitape/stenc";
    license = lib.licenses.gpl2;
    maintainers = with lib.maintainers; [ woffs ];
    platforms = lib.platforms.linux;
  };
}