1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/by-name/si/signalbackup-tools/package.nix
2024-12-06 09:44:01 -08:00

60 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
apple-sdk_11,
darwinMinVersionHook,
dbus,
openssl,
sqlite,
}:
stdenv.mkDerivation rec {
pname = "signalbackup-tools";
version = "20241205";
src = fetchFromGitHub {
owner = "bepaald";
repo = "signalbackup-tools";
rev = version;
hash = "sha256-e6T40FMM24wsVOZDE8lFeE5WKjpAFoG0M05E8oHiZeo=";
};
nativeBuildInputs = [
cmake
] ++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
];
buildInputs = [
openssl
sqlite
] ++ lib.optionals stdenv.hostPlatform.isLinux [
dbus
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
# Needed for `utimensat` on `x86_64-darwin`
apple-sdk_11
(darwinMinVersionHook "11.3")
];
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;
};
}