nixpkgs/pkgs/tools/backup/stenc/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

39 lines
919 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";
mainProgram = "stenc";
homepage = "https://github.com/scsitape/stenc";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ woffs ];
platforms = lib.platforms.linux;
};
}