Unverified Commit 28386512 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

signal-desktop-bin(x86_64-linux; aarch64-linux; darwin): 7.47.0 -> 7.52.0;...

signal-desktop-bin(x86_64-linux; aarch64-linux; darwin): 7.47.0 -> 7.52.0; signal-desktop-bin: replace apple emoji sheets  (#400945)
parents 43f0b404 4712c0b2
Loading
Loading
Loading
Loading
+0 −29
Original line number Diff line number Diff line
@@ -55,21 +55,6 @@ def emoji_to_noto_name(emoji: str) -> str:
    )


def emoji_to_emoji_data_name(emoji: str) -> str:
    r"""Return the npm emoji-data emoji name of an emoji.

    emoji-data emoji names are hyphen‐minus‐separated Unicode scalar
    values, represented in lowercase big‐endian hex padded to at least
    four digits.

    >>> emoji_to_emoji_data_name("😶‍🌫️")
    '1f636-200d-1f32b-fe0f'
    >>> emoji_to_emoji_data_name("\U0001f636\u200d\U0001f32b\ufe0f")
    '1f636-200d-1f32b-fe0f'
    """
    return "-".join(f"{ord(scalar_value):04x}" for scalar_value in emoji)


def _main() -> None:
    noto_png_path, asar_root = (Path(arg) for arg in sys.argv[1:])
    asar_root = asar_root.absolute()
@@ -77,16 +62,6 @@ def _main() -> None:
    out_path = asar_root / "images" / "nixpkgs-emoji"
    out_path.mkdir(parents=True)

    emoji_data_out_path = (
        asar_root
        / "node_modules"
        / "emoji-datasource-apple"
        / "img"
        / "apple"
        / "64"
    )
    emoji_data_out_path.mkdir(parents=True)

    jumbomoji_json_path = asar_root / "build" / "jumbomoji.json"
    with jumbomoji_json_path.open() as jumbomoji_json_file:
        jumbomoji_packs = json.load(jumbomoji_json_file)
@@ -107,10 +82,6 @@ def _main() -> None:
                )
                continue

            (
                emoji_data_out_path / f"{emoji_to_emoji_data_name(emoji)}.png"
            ).symlink_to(out_path / emoji)

    print(out_path.relative_to(asar_root))


+20 −1
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
  at-spi2-core,
  libappindicator-gtk3,
  libgbm,
  libwebp,
  # Runtime dependencies:
  systemd,
  libnotify,
@@ -86,6 +87,15 @@ let
      runHook postInstall
    '';
  });

  noto-emoji-sheet-32 = fetchurl {
    url = "https://raw.githubusercontent.com/iamcal/emoji-data/refs/tags/v15.1.2/sheet_google_32.png";
    hash = "sha256-S03NCTbvB5yeQl62WpLNjNGhjNErtgaOB6tAj/X8vPc=";
  };
  noto-emoji-sheet-64 = fetchurl {
    url = "https://raw.githubusercontent.com/iamcal/emoji-data/refs/tags/v15.1.2/sheet_google_64.png";
    hash = "sha256-kZYStR5xAuausSpOD6wJZRJZ1K6nPpweE3aYSgWntS4=";
  };
in
stdenv.mkDerivation rec {
  inherit pname version;
@@ -124,7 +134,8 @@ stdenv.mkDerivation rec {
      asar extract "$out/${libdir}/resources/app.asar" $out/asar-contents
      rm -r \
        "$out/${libdir}/resources/app.asar"{,.unpacked} \
        $out/asar-contents/node_modules/emoji-datasource-apple
        $out/asar-contents/images/emoji-sheet-32.webp \
        $out/asar-contents/images/emoji-sheet-64.webp
    '';
  };

@@ -136,6 +147,7 @@ stdenv.mkDerivation rec {
    # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651
    # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset.
    (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; })
    libwebp
  ];

  buildInputs = [
@@ -208,6 +220,10 @@ stdenv.mkDerivation rec {
    # Create required symlinks:
    ln -s libGLESv2.so "$out/lib/signal-desktop/libGLESv2.so.2"

    # Compress the emoji sheets to webp, as signal expects webp images. The flags used are the same as those used upstream.
    cwebp -progress -mt -preset icon -alpha_filter best -alpha_q 20 -pass 10 -q 75 ${noto-emoji-sheet-32} -o asar-contents/images/emoji-sheet-32.webp
    cwebp -progress -mt -preset icon -alpha_filter best -alpha_q 20 -pass 10 -q 75 ${noto-emoji-sheet-64} -o asar-contents/images/emoji-sheet-64.webp

    # Copy the Noto Color Emoji PNGs into the ASAR contents. See `src`
    # for the motivation, and the script for the technical details.
    emojiPrefix=$(
@@ -270,6 +286,9 @@ stdenv.mkDerivation rec {

      # Various npm packages
      lib.licenses.free

      lib.licenses.asl20 # noto-emoji
      lib.licenses.mit # emoji-data
    ];
    maintainers = with lib.maintainers; [
      mic92
+3 −3
Original line number Diff line number Diff line
{ callPackage }:
callPackage ./generic.nix { } {
  pname = "signal-desktop-bin";
  version = "7.47.0-1";
  version = "7.52.0";

  libdir = "usr/lib64/signal-desktop";
  bindir = "usr/bin";
@@ -10,6 +10,6 @@ callPackage ./generic.nix { } {
    bsdtar -xf $downloadedFile -C "$out"
  '';

  url = "https://download.copr.fedorainfracloud.org/results/useidel/signal-desktop/fedora-42-aarch64/08795262-signal-desktop/signal-desktop-7.47.0-1.fc42.aarch64.rpm";
  hash = "sha256-CDj9OX6OfEzbP8kusqnWN+MCPPEi9u2Hj1LkpsCg3vI=";
  url = "https://download.copr.fedorainfracloud.org/results/useidel/signal-desktop/fedora-42-aarch64/08956500-signal-desktop/signal-desktop-7.52.0-1.fc42.aarch64.rpm";
  hash = "sha256-kQbCkswCNRnz/K6KpZKJ55bCaM2YFL9wW+erVA+3Nok=";
}
+2 −2
Original line number Diff line number Diff line
@@ -6,11 +6,11 @@
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "signal-desktop-bin";
  version = "7.51.0";
  version = "7.52.0";

  src = fetchurl {
    url = "https://updates.signal.org/desktop/signal-desktop-mac-universal-${finalAttrs.version}.dmg";
    hash = "sha256-dUcBvKbGVsEUxOSv8u/jjuvYjHar2+zbv+/ZRS85w1w=";
    hash = "sha256-GamsV4tWLEWbegUIrmZ4ZpAuRbfZzlxjnEy7FOo4q/E=";
  };
  sourceRoot = ".";

+2 −2
Original line number Diff line number Diff line
{ callPackage }:
callPackage ./generic.nix { } rec {
  pname = "signal-desktop-bin";
  version = "7.47.0";
  version = "7.52.0";

  libdir = "opt/Signal";
  bindir = libdir;
  extractPkg = "dpkg-deb -x $downloadedFile $out";

  url = "https://updates.signal.org/desktop/apt/pool/s/signal-desktop/signal-desktop_${version}_amd64.deb";
  hash = "sha256-rH1iuyVYoUNFvj2Z9DI5MXcX+sXjN2NSW2uaKafTO9M=";
  hash = "sha256-SOe0BAEE5ljBb/OM3F7ejQQk8/KROFf7kfs/Gtp+bSY=";
}