nixpkgs/pkgs/applications/networking/instant-messengers/signalbackup-tools/default.nix
2023-03-30 10:20:58 -07:00

41 lines
1.0 KiB
Nix

{ lib, stdenv, darwin, fetchFromGitHub, openssl, sqlite }:
(if stdenv.isDarwin then darwin.apple_sdk_11_0.clang14Stdenv else stdenv).mkDerivation rec {
pname = "signalbackup-tools";
version = "20230329";
src = fetchFromGitHub {
owner = "bepaald";
repo = pname;
rev = version;
hash = "sha256-i0slUBtJE3gYIKO7IxA0rDA4OOZYWYswuLOvece7Ejk=";
};
postPatch = ''
patchShebangs BUILDSCRIPT_MULTIPROC.bash44
'';
buildInputs = [ openssl sqlite ];
buildPhase = ''
runHook preBuild
./BUILDSCRIPT_MULTIPROC.bash44${lib.optionalString stdenv.isDarwin " --config nixpkgs-darwin"}
runHook postBuild
'';
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";
homepage = "https://github.com/bepaald/signalbackup-tools";
license = licenses.gpl3Only;
maintainers = [ maintainers.malo ];
platforms = platforms.all;
};
}