quiet: 5.1.2 -> 6.0.0; add darwin support (#422353)
This commit is contained in:
@@ -3,16 +3,13 @@
|
||||
stdenv,
|
||||
fetchurl,
|
||||
appimageTools,
|
||||
makeWrapper,
|
||||
_7zz,
|
||||
}:
|
||||
|
||||
appimageTools.wrapType2 rec {
|
||||
let
|
||||
pname = "quiet";
|
||||
version = "5.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/TryQuiet/quiet/releases/download/@quiet/desktop@${version}/Quiet-${version}.AppImage";
|
||||
hash = "sha256-ahJUBvQVfU8CtGq5p+S8avpHRkXSn9kQv9HPN7TvJiM=";
|
||||
};
|
||||
version = "6.0.0";
|
||||
|
||||
meta = {
|
||||
description = "Private, p2p alternative to Slack and Discord built on Tor & IPFS";
|
||||
@@ -20,6 +17,57 @@ appimageTools.wrapType2 rec {
|
||||
changelog = "https://github.com/TryQuiet/quiet/releases/tag/@quiet/desktop@${version}";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ kashw2 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
||||
linux = appimageTools.wrapType2 {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/TryQuiet/quiet/releases/download/@quiet/desktop@${version}/Quiet-${version}.AppImage";
|
||||
hash = "sha256-YIkbS3L6DIof9gsgHKaguHIwGggVLjQXPM8o7810Wgs=";
|
||||
};
|
||||
|
||||
meta = meta // {
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
};
|
||||
|
||||
darwin = stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/TryQuiet/quiet/releases/download/@quiet/desktop@${version}/Quiet-${version}.dmg";
|
||||
hash = "sha256-B1rT+6U0gjScr1FPuh3xGxkpfumT/8feTJbEbCgXPpo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
_7zz
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
sourceRoot = "Quiet ${version}";
|
||||
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
|
||||
7zz x $src -x!Quiet\ ${version}/Applications
|
||||
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstallPhase
|
||||
|
||||
mkdir -p $out/{Applications,bin}
|
||||
mv Quiet.app $out/Applications
|
||||
makeWrapper $out/Applications/Quiet.app/Contents/MacOS/Quiet $out/bin/${pname}
|
||||
|
||||
runHook postInstallPhase
|
||||
'';
|
||||
|
||||
meta = meta // {
|
||||
platforms = lib.platforms.darwin;
|
||||
};
|
||||
};
|
||||
in
|
||||
if stdenv.hostPlatform.isDarwin then darwin else linux
|
||||
|
||||
Reference in New Issue
Block a user