briar: init at 0.2.1-beta

This commit is contained in:
Jonas Heinrich 2022-01-29 16:08:35 +01:00 committed by Yt
parent 2d958456db
commit 0ff3a27898
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,58 @@
{ lib
, stdenv
, fetchzip
, openjdk
, makeWrapper
, tor
, p7zip
, bash
, writeScript
}:
let
briar-tor = writeScript "briar-tor" ''
#! ${bash}/bin/bash
exec ${tor}/bin/tor "$@"
'';
in
stdenv.mkDerivation rec {
pname = "briar-desktop";
version = "0.2.1-beta";
src = fetchzip {
url = "https://code.briarproject.org/briar/briar-desktop/-/jobs/18424/artifacts/download?file_type=archive";
sha256 = "sha256-ivMbgo0+iZE4/Iffq9HUBErGIQMVLrRZUQ6R3V3X8II=";
extension = "zip";
};
nativeBuildInputs = [
makeWrapper
p7zip
];
installPhase = ''
mkdir -p $out/{bin,lib}
cp ${src}/briar-desktop.jar $out/lib/
makeWrapper ${openjdk}/bin/java $out/bin/briar-desktop \
--add-flags "-jar $out/lib/briar-desktop.jar"
'';
fixupPhase = ''
# Replace the embedded Tor binary (which is in a Tar archive)
# with one from Nixpkgs.
cp ${briar-tor} ./tor
for arch in {aarch64,armhf,x86_64}; do
7z a tor_linux-$arch.zip tor
7z a $out/lib/briar-desktop.jar tor_linux-$arch.zip
done
'';
meta = with lib; {
description = "Decentalized and secure messnger";
homepage = "https://code.briarproject.org/briar/briar-desktop";
license = licenses.gpl3;
maintainers = with maintainers; [ onny ];
platforms = [ "x86_64-linux" "aarch64-linux" "armv7l-linux" ];
};
}

View File

@ -4581,6 +4581,8 @@ with pkgs;
boofuzz= callPackage ../tools/security/boofuzz { };
briar-desktop = callPackage ../applications/networking/instant-messengers/briar-desktop { };
bsdbuild = callPackage ../development/tools/misc/bsdbuild { };
bsdiff = callPackage ../tools/compression/bsdiff { };