From 4f42092bebd1eb9117faf9e1bd8739726bdb982e Mon Sep 17 00:00:00 2001 From: Emmanuel Rosa Date: Tue, 8 Jul 2025 08:52:10 -0400 Subject: [PATCH] bisq2: add aarch64-linux support - Add aarch64-linux as a platform. - Use both GPG keys for signature verification. - Remove lib anti-pattern in the meta attribute. The bisq2 deb package is usually signed by one of two GPG keys. Instead of having to modify the package to use the correct key, this change adds both keys to the key ring. GPG will produce a successful verification as long as one of the keys verifies. --- pkgs/by-name/bi/bisq2/package.nix | 39 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/pkgs/by-name/bi/bisq2/package.nix b/pkgs/by-name/bi/bisq2/package.nix index 05519f122068..9b8fff374af9 100644 --- a/pkgs/by-name/bi/bisq2/package.nix +++ b/pkgs/by-name/bi/bisq2/package.nix @@ -33,25 +33,24 @@ let # A given release will be signed by either Alejandro Garcia or Henrik Jannsen # as indicated in the file # https://github.com/bisq-network/bisq2/releases/download/v${version}/signingkey.asc - publicKey = - { - "E222AA02" = fetchurl { - url = "https://github.com/bisq-network/bisq2/releases/download/v${version}/E222AA02.asc"; - hash = "sha256-31uBpe/+0QQwFyAsoCt1TUWRm0PHfCFOGOx1M16efoE="; - }; + publicKey = { + "E222AA02" = fetchurl { + url = "https://github.com/bisq-network/bisq2/releases/download/v${version}/E222AA02.asc"; + hash = "sha256-31uBpe/+0QQwFyAsoCt1TUWRm0PHfCFOGOx1M16efoE="; + }; - "387C8307" = fetchurl { - url = "https://github.com/bisq-network/bisq2/releases/download/v${version}/387C8307.asc"; - hash = "sha256-PrRYZLT0xv82dUscOBgQGKNf6zwzWUDhriAffZbNpmI="; - }; - } - ."E222AA02"; + "387C8307" = fetchurl { + url = "https://github.com/bisq-network/bisq2/releases/download/v${version}/387C8307.asc"; + hash = "sha256-PrRYZLT0xv82dUscOBgQGKNf6zwzWUDhriAffZbNpmI="; + }; + }; in stdenvNoCC.mkDerivation rec { inherit version; pname = "bisq2"; + # nixpkgs-update: no auto update src = fetchurl { url = "https://github.com/bisq-network/bisq2/releases/download/v${version}/Bisq-${version}.deb"; hash = "sha256-kNQbTZoHFR2qFw/Jjc9iaEews/oUOYoJanmbVH/vs44="; @@ -69,7 +68,8 @@ stdenvNoCC.mkDerivation rec { mkdir -m 700 -p $GNUPGHOME ln -s $downloadedFile ./Bisq-${version}.deb ln -s ${signature} ./signature.asc - gpg --import ${publicKey} + gpg --import ${publicKey."E222AA02"} + gpg --import ${publicKey."387C8307"} gpg --batch --verify signature.asc Bisq-${version}.deb popd mv $downloadedFile $out @@ -162,15 +162,18 @@ stdenvNoCC.mkDerivation rec { runHook postInstall ''; - meta = with lib; { + meta = { description = "Decentralized bitcoin exchange network"; homepage = "https://bisq.network"; mainProgram = "bisq2"; - sourceProvenance = with sourceTypes; [ + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; - license = licenses.mit; - maintainers = with maintainers; [ emmanuelrosa ]; - platforms = [ "x86_64-linux" ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ emmanuelrosa ]; + platforms = [ + "x86_64-linux" + "aarch64-linux" + ]; }; }