Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signal-desktop: add darwin support #348165

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
signal-desktop =
if hostPlatform.system == "aarch64-linux" then
callPackage ./signal-desktop-aarch64.nix { }
else if hostPlatform.isDarwin then
callPackage ./signal-desktop-darwin.nix { }
else
callPackage ./signal-desktop.nix { };
signal-desktop-beta = (callPackage ./signal-desktop-beta.nix { }).overrideAttrs (old: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ stdenv.mkDerivation rec {
emily
];
mainProgram = pname;
platforms = [ "x86_64-linux" "aarch64-linux" ];
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
stdenv,
lib,
fetchurl,
_7zz,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "signal-desktop";
version = "7.28.0";

src = fetchurl {
url = "https://updates.signal.org/desktop/signal-desktop-mac-universal-${finalAttrs.version}.dmg";
hash = "sha256-yPObHZPCXRycuf9VexooWkXDJLReEiTuFSmCxlHA/OU=";
};
sourceRoot = ".";

nativeBuildInputs = [ _7zz ];

dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall

mkdir -p $out/Applications
cp -r Signal.app $out/Applications

runHook postInstall
'';

passthru = {
updateScript.command = [ ./update.sh ];
};

meta = {
NickHu marked this conversation as resolved.
Show resolved Hide resolved
description = "Private, simple, and secure messenger";
longDescription = ''
Signal Desktop is an Electron application that links with your
"Signal Android" or "Signal iOS" app.
'';
homepage = "https://signal.org/";
downloadPage = "https://signal.org/download/macos/";
changelog = "https://github.com/signalapp/Signal-Desktop/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [
agpl3Only

# Various npm packages
free

# has non-redistributable Apple emoji packaged, see main derivation
unfree
];
maintainers = with lib.maintainers; [ nickhu ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ signal-desktop)
--system aarch64-linux \
--override-filename "$SCRIPT_DIR/signal-desktop-aarch64.nix" \
signal-desktop

echo "Updating signal-desktop for darwin"
nix-update --version "$latestVersion" \
--system aarch64-darwin \
--override-filename "$SCRIPT_DIR/signal-desktop-darwin.nix" \
signal-desktop
;;
signal-desktop-beta)
latestTagBeta=$(curl_github https://api.github.com/repos/signalapp/Signal-Desktop/releases | jq -r ".[0].tag_name")
Expand Down