From 48b384b159f7c4f43dc26c79ec5821ed722a4146 Mon Sep 17 00:00:00 2001 From: Reno Dakota <170618376+paparodeo@users.noreply.github.com> Date: Thu, 31 Oct 2024 07:02:17 +0000 Subject: [PATCH] Revert "bisq2: init @ 2.1.2" This reverts commit 7367fb0f47cbb9c324bebf973596838eed965fd1. commit breaks eval due as it uses openjdk 22 which was removed in staging-next --- pkgs/by-name/bi/bisq/package.nix | 169 ------------------------------- pkgs/top-level/all-packages.nix | 4 - 2 files changed, 173 deletions(-) delete mode 100644 pkgs/by-name/bi/bisq/package.nix diff --git a/pkgs/by-name/bi/bisq/package.nix b/pkgs/by-name/bi/bisq/package.nix deleted file mode 100644 index 8b5dbfe1d6f80..0000000000000 --- a/pkgs/by-name/bi/bisq/package.nix +++ /dev/null @@ -1,169 +0,0 @@ -{ - stdenvNoCC, - lib, - makeWrapper, - runtimeShell, - fetchurl, - makeDesktopItem, - copyDesktopItems, - imagemagick, - openjdk, - dpkg, - writeScript, - bash, - tor, - zip, - gnupg, -}: - -let - version = "2.1.2"; - - bisq-launcher = - args: - writeScript "bisq-launcher" '' - #! ${runtimeShell} - - # This is just a comment to convince Nix that Tor is a - # runtime dependency; The Tor binary is in a *.jar file, - # whereas Nix only scans for hashes in uncompressed text. - # ${lib.getExe' tor "tor"} - - rm -fR $HOME/.local/share/Bisq2/tor - - exec "${lib.getExe openjdk}" -Djpackage.app-version=@version@ -classpath @out@/lib/app/desktop-app-launcher.jar:@out@/lib/app/* ${args} bisq.desktop_app_launcher.DesktopAppLauncher "$@" - ''; - - # 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"; - sha256 = "sha256-31uBpe/+0QQwFyAsoCt1TUWRm0PHfCFOGOx1M16efoE="; - }; - - "387C8307" = fetchurl { - url = "https://github.com/bisq-network/bisq2/releases/download/v${version}/387C8307.asc"; - sha256 = "sha256-PrRYZLT0xv82dUscOBgQGKNf6zwzWUDhriAffZbNpmI="; - }; - } - ."387C8307"; -in -stdenvNoCC.mkDerivation rec { - inherit version; - - pname = "bisq2"; - - src = fetchurl { - url = "https://github.com/bisq-network/bisq2/releases/download/v${version}/Bisq-${version}.deb"; - sha256 = "0zgv70xlz3c9mrwmiaa1dgagbc441ppk2vrkgard8zjrvk8rg7va"; - - # Verify the upstream Debian package prior to extraction. - # See https://bisq.wiki/Bisq_2#Installation - # This ensures that a successful build of this Nix package requires the Debian - # package to pass verification. - nativeBuildInputs = [ gnupg ]; - downloadToTemp = true; - - postFetch = '' - pushd $(mktemp -d) - export GNUPGHOME=./gnupg - mkdir -m 700 -p $GNUPGHOME - ln -s $downloadedFile ./Bisq-${version}.deb - ln -s ${signature} ./signature.asc - gpg --import ${publicKey} - gpg --batch --verify signature.asc Bisq-${version}.deb - popd - mv $downloadedFile $out - ''; - }; - - signature = fetchurl { - url = "https://github.com/bisq-network/bisq2/releases/download/v${version}/Bisq-${version}.deb.asc"; - sha256 = "sha256-WZhI8RDmb7nQqpCQJM86vrp8qQNg+mvRVdSPcDqgzxE="; - }; - - nativeBuildInputs = [ - copyDesktopItems - dpkg - imagemagick - makeWrapper - zip - gnupg - makeWrapper - ]; - - desktopItems = [ - (makeDesktopItem { - name = "bisq2"; - exec = "bisq2"; - icon = "bisq2"; - desktopName = "Bisq 2"; - genericName = "Decentralized bitcoin exchange"; - categories = [ - "Network" - "P2P" - ]; - }) - - (makeDesktopItem { - name = "bisq2-hidpi"; - exec = "bisq2-hidpi"; - icon = "bisq2"; - desktopName = "Bisq 2 (HiDPI)"; - genericName = "Decentralized bitcoin exchange"; - categories = [ - "Network" - "P2P" - ]; - }) - ]; - - unpackPhase = '' - dpkg -x $src . - ''; - - buildPhase = '' - # Replace the Tor binary embedded in tor.jar (which is in the zip archive tor.zip) - # with the Tor binary from Nixpkgs. - - makeWrapper ${lib.getExe' tor "tor"} ./tor - zip tor.zip ./tor - zip opt/bisq2/lib/app/tor.jar tor.zip - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out/lib $out/bin - cp -r opt/bisq2/lib/app $out/lib - - install -D -m 777 ${bisq-launcher ""} $out/bin/bisq2 - substituteAllInPlace $out/bin/bisq2 - - install -D -m 777 ${bisq-launcher "-Dglass.gtk.uiScale=2.0"} $out/bin/bisq2-hidpi - substituteAllInPlace $out/bin/bisq2-hidpi - - for n in 16 24 32 48 64 96 128 256; do - size=$n"x"$n - magick convert opt/bisq2/lib/Bisq2.png -resize $size bisq2.png - install -Dm644 -t $out/share/icons/hicolor/$size/apps bisq2.png - done; - - runHook postInstall - ''; - - meta = with lib; { - description = "Decentralized bitcoin exchange network"; - homepage = "https://bisq.network"; - mainProgram = "bisq2"; - sourceProvenance = with sourceTypes; [ - binaryBytecode - ]; - license = licenses.mit; - maintainers = with maintainers; [ emmanuelrosa ]; - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 93f9ad67df17c..e62ac36a9367e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3291,10 +3291,6 @@ with pkgs; bisq-desktop = callPackage ../applications/blockchains/bisq-desktop { }; - bisq2 = callPackage ../by-name/bi/bisq/package.nix { - openjdk = jdk22.override { enableJavaFX = true; }; - }; - bic = callPackage ../development/interpreters/bic { }; biscuit-cli = callPackage ../tools/security/biscuit-cli { };