blob: a24ac50012d4202cf6ff2ae7046d356f88aca394 (
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
39
40
41
42
43
44
45
46
|
{ lib, stdenv, fetchFromGitHub, openssl, sqlite }:
stdenv.mkDerivation rec {
pname = "signalbackup-tools";
version = "20220914-1";
src = fetchFromGitHub {
owner = "bepaald";
repo = pname;
rev = version;
sha256 = "sha256-6tRIjOs6NZUQy7j5oePJ/9FuvfDhy3+uKq6CSuAi5hU=";
};
postPatch = ''
patchShebangs BUILDSCRIPT_MULTIPROC.bash44
'';
buildInputs = [ openssl sqlite ];
# Manually define `CXXFLAGS` and `LDFLAGS` on Darwin since the build scripts includes flags
# that don't work on Darwin.
buildPhase = ''
runHook preBuild
'' + lib.optionalString stdenv.isDarwin ''
export CXXFLAGS="-Wall -Wextra -Wshadow -Wold-style-cast -Woverloaded-virtual -pedantic -O3"
export LDFLAGS="-Wall -Wextra -O3"
'' + ''
./BUILDSCRIPT_MULTIPROC.bash44
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;
};
}
|