nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 73 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 appimageTools, 6 makeWrapper, 7 _7zz, 8}: 9 10let 11 pname = "quiet"; 12 version = "6.0.0"; 13 14 meta = { 15 description = "Private, p2p alternative to Slack and Discord built on Tor & IPFS"; 16 homepage = "https://github.com/TryQuiet/quiet"; 17 changelog = "https://github.com/TryQuiet/quiet/releases/tag/@quiet/desktop@${version}"; 18 license = lib.licenses.gpl3Only; 19 maintainers = with lib.maintainers; [ kashw2 ]; 20 }; 21 22 linux = appimageTools.wrapType2 { 23 inherit pname version; 24 25 src = fetchurl { 26 url = "https://github.com/TryQuiet/quiet/releases/download/@quiet/desktop@${version}/Quiet-${version}.AppImage"; 27 hash = "sha256-YIkbS3L6DIof9gsgHKaguHIwGggVLjQXPM8o7810Wgs="; 28 }; 29 30 meta = meta // { 31 platforms = lib.platforms.linux; 32 }; 33 }; 34 35 darwin = stdenv.mkDerivation { 36 inherit pname version; 37 38 src = fetchurl { 39 url = "https://github.com/TryQuiet/quiet/releases/download/@quiet/desktop@${version}/Quiet-${version}.dmg"; 40 hash = "sha256-B1rT+6U0gjScr1FPuh3xGxkpfumT/8feTJbEbCgXPpo="; 41 }; 42 43 nativeBuildInputs = [ 44 _7zz 45 makeWrapper 46 ]; 47 48 sourceRoot = "Quiet ${version}"; 49 50 unpackPhase = '' 51 runHook preUnpack 52 53 7zz x $src -x!Quiet\ ${version}/Applications 54 55 runHook postUnpack 56 ''; 57 58 installPhase = '' 59 runHook preInstall 60 61 mkdir -p $out/{Applications,bin} 62 mv Quiet.app $out/Applications 63 makeWrapper $out/Applications/Quiet.app/Contents/MacOS/Quiet $out/bin/${pname} 64 65 runHook postInstall 66 ''; 67 68 meta = meta // { 69 platforms = lib.platforms.darwin; 70 }; 71 }; 72in 73if stdenv.hostPlatform.isDarwin then darwin else linux