nixpkgs/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix
2024-10-21 09:02:11 -07:00

57 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
darwin,
dbus,
openssl,
sqlite,
}:
stdenv.mkDerivation rec {
pname = "signalbackup-tools";
version = "20241021-1";
src = fetchFromGitHub {
owner = "bepaald";
repo = "signalbackup-tools";
rev = version;
hash = "sha256-fO/GSnmXsB4YVnfBBh1IXai15JeRLcAiihufIouBpxw=";
};
nativeBuildInputs = [
cmake
] ++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
];
buildInputs = [
openssl
sqlite
] ++ lib.optionals stdenv.hostPlatform.isLinux [
dbus
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk_11_0.frameworks.Security
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp signalbackup-tools $out/bin/
runHook postInstall
'';
meta = with lib; {
description = "Tool to work with Signal Backup files";
mainProgram = "signalbackup-tools";
homepage = "https://github.com/bepaald/signalbackup-tools";
license = licenses.gpl3Only;
maintainers = [ maintainers.malo ];
platforms = platforms.all;
};
}