c2cf2b76ff
briar-desktop 0.2.1-beta has expired and will no longer run. briar-desktop 0.3.1-beta also adds functionality such as notifications.
63 lines
1.4 KiB
Nix
63 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, openjdk
|
|
, libnotify
|
|
, 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.3.1-beta";
|
|
|
|
src = fetchurl {
|
|
url = "https://desktop.briarproject.org/jars/linux/0.3.1-beta/briar-desktop-linux-0.3.1-beta.jar";
|
|
sha256 = "841dc198101e6e8aa6b5ab6bd6b80e9c6b2593cb88bc3b2592f947baf963389d";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
p7zip
|
|
];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/{bin,lib}
|
|
cp ${src} $out/lib/briar-desktop.jar
|
|
makeWrapper ${openjdk}/bin/java $out/bin/briar-desktop \
|
|
--add-flags "-jar $out/lib/briar-desktop.jar" \
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
|
|
libnotify
|
|
]}"
|
|
'';
|
|
|
|
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" ];
|
|
};
|
|
}
|