From fbba791f7f5dfb2485a3d60a59d75e9e910061ac Mon Sep 17 00:00:00 2001 From: Jacob Hrbek Date: Mon, 13 May 2024 12:31:23 +0200 Subject: [PATCH 1/4] Sub to fix https://github.com/NixOS/nixpkgs/issues/293842 --- build.log | 67 +++++++++++ .../blockchains/haveno/default.nix | 111 ++++++++++++++++++ .../applications/blockchains/haveno/update.sh | 21 ++++ pkgs/top-level/all-packages.nix | 2 + 4 files changed, 201 insertions(+) create mode 100644 build.log create mode 100644 pkgs/applications/blockchains/haveno/default.nix create mode 100755 pkgs/applications/blockchains/haveno/update.sh diff --git a/build.log b/build.log new file mode 100644 index 0000000000000..9e80ef363ccd8 --- /dev/null +++ b/build.log @@ -0,0 +1,67 @@ +@nix { "action": "setPhase", "phase": "unpackPhase" } +Running phase: unpackPhase +unpacking source archive /nix/store/xgxilpynviqjg46jl93l7pc3fln7jwrv-source +source root is source +@nix { "action": "setPhase", "phase": "patchPhase" } +Running phase: patchPhase +@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" } +Running phase: updateAutotoolsGnuConfigScriptsPhase +@nix { "action": "setPhase", "phase": "configurePhase" } +Running phase: configurePhase +no configure script, doing nothing +@nix { "action": "setPhase", "phase": "buildPhase" } +Running phase: buildPhase + +Welcome to Gradle 8.7! + +Here are the highlights of this release: + - Compiling and testing with Java 22 + - Cacheable Groovy script compilation + - New methods in lazy collection properties + +For more details see https://docs.gradle.org/8.7/release-notes.html + +To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.7/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation. + + +> Starting DaemonDaemon will be stopped at the end of the build + +> IDLE<-------------> 0% INITIALIZING [54ms]<-------------> 0% INITIALIZING [154ms]<-------------> 0% INITIALIZING [254ms]<-------------> 0% INITIALIZING [354ms]<-------------> 0% INITIALIZING [454ms]<-------------> 0% INITIALIZING [554ms]> Evaluating settings<-------------> 0% INITIALIZING [654ms]<-------------> 0% INITIALIZING [754ms]<-------------> 0% INITIALIZING [854ms]<-------------> 0% INITIALIZING [954ms]<-------------> 0% INITIALIZING [1s]<-------------> 0% INITIALIZING [2s]<-------------> 0% CONFIGURING [2s]> Loading projects> root project<-------------> 0% CONFIGURING [3s]<-------------> 0% CONFIGURING [4s]<-------------> 0% CONFIGURING [5s] +FAILURE: Build failed with an exception. + +* What went wrong: +A problem occurred configuring root project 'haveno'. +> Could not resolve all artifacts for configuration ':classpath'. + > Could not resolve com.google.protobuf:protobuf-gradle-plugin:0.8.17. + Required by: + project : + > No cached version of com.google.protobuf:protobuf-gradle-plugin:0.8.17 available for offline mode. + > Could not resolve com.google.gradle:osdetector-gradle-plugin:1.7.3. + Required by: + project : + > No cached version of com.google.gradle:osdetector-gradle-plugin:1.7.3 available for offline mode. + > Could not resolve com.github.johnrengelman:shadow:8.1.1. + Required by: + project : + > No cached version of com.github.johnrengelman:shadow:8.1.1 available for offline mode. + > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.3. + Required by: + project : + > No cached version of org.springframework.boot:spring-boot-gradle-plugin:3.2.3 available for offline mode. + > Could not resolve com.gradle:gradle-enterprise-gradle-plugin:3.16.1. + Required by: + project : + > No cached version of com.gradle:gradle-enterprise-gradle-plugin:3.16.1 available for offline mode. + +* Try: +> Run with --stacktrace option to get the stack trace. + + +<-------------> 6% CONFIGURING [5s]> IDLE> Run with --info or --debug option to get more log output. +> Run with --scan to get full insights. +> Get more help at https://help.gradle.org. + +BUILD FAILED in 7s + + +<-------------> 0% WAITING> IDLE[?12l[?25h \ No newline at end of file diff --git a/pkgs/applications/blockchains/haveno/default.nix b/pkgs/applications/blockchains/haveno/default.nix new file mode 100644 index 0000000000000..8dfbe362f13d1 --- /dev/null +++ b/pkgs/applications/blockchains/haveno/default.nix @@ -0,0 +1,111 @@ +{ stdenv +, lib +, makeWrapper +, fetchurl +, fetchFromGitHub +, makeDesktopItem +, copyDesktopItems +, imagemagick +, openjdk11 +, dpkg +, gradle +, gnumake +, jdk21 +, writeScript +, bash +, stripJavaArchivesHook +, tor +, zip +, xz +, findutils +}: + +stdenv.mkDerivation rec { + pname = "haveno"; + version = "1.0.3"; + + src = fetchFromGitHub { + owner = "haveno-dex"; + repo = "haveno"; + rev = "cc247bbc69994b3904f6e7237c4f1c6835a9e33e"; + hash = "sha256-ptjrZ3dLPRtAUIHWBnXP7OTwWmN+4OylJwPimJotwW8="; + }; + + nativeBuildInputs = [ + gnumake + jdk21 + gradle + + copyDesktopItems + + imagemagick + makeWrapper + stripJavaArchivesHook + xz + zip + findutils + ]; + + # TODO(Krey) + # desktopItems = [ + # (makeDesktopItem { + # name = "Bisq"; + # exec = "bisq-desktop"; + # icon = "bisq"; + # desktopName = "Bisq ${version}"; + # genericName = "Decentralized bitcoin exchange"; + # categories = [ "Network" "P2P" ]; + # }) + # ]; + + # fake build to pre-download deps into fixed-output derivation + # TODO(Kreyn->Nikky): Plz figure this out thanku <3 + deps = stdenv.mkDerivation { + pname = "${pname}-deps"; + inherit src version postPatch; + nativeBuildInputs = [ gradle perl ]; + buildPhase = '' + export GRADLE_USER_HOME="$(mktemp -d)" + gradle --no-daemon build + ''; + # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) + installPhase = '' + find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \ + | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/''${\($5 =~ s/okio-jvm/okio/r)}" #e' \ + | sh + ''; + # Don't move info to share/ + forceShare = [ "dummy" ]; + outputHashMode = "recursive"; + # Downloaded jars differ by platform + outputHash = "sha256-cs95YI0SpvzCo5x5trMXlVUGepNKIH9oZ95AfLErKIU="; + }; + + preBuild = '' + mkdir -p .localnet + ''; + + buildPhase = '' + gradle --offline --no-daemon build + ''; + + installPhase = '' + runHook preInstall + + # "haveno-apitest" "haveno-cli" "haveno-daemon" "haveno-desktop" "haveno-inventory" "haveno-monitor" "haveno-relay" "haveno-seednode" "haveno-statsnode" + + # ... + + runHook postInstall + ''; + + # passthru.updateScript = ./update.sh; + + meta = with lib; { + description = "A decentralized bitcoin exchange network"; + homepage = "https://bisq.network"; + license = licenses.mit; + maintainers = with maintainers; [ juaningan emmanuelrosa ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/applications/blockchains/haveno/update.sh b/pkgs/applications/blockchains/haveno/update.sh new file mode 100755 index 0000000000000..c65e04e3de409 --- /dev/null +++ b/pkgs/applications/blockchains/haveno/update.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl jq gnused gnupg common-updater-scripts + +set -eu -o pipefail + +version="$(curl -s https://api.github.com/repos/bisq-network/bisq/releases| jq '.[] | {name,prerelease} | select(.prerelease==false) | limit(1;.[])' | sed 's/[\"v]//g' | head -n 1)" +depname="Bisq-64bit-$version.deb" +src="https://github.com/bisq-network/bisq/releases/download/v$version/$depname" +signature="$src.asc" + +pushd $(mktemp -d --suffix=-bisq-updater) +export GNUPGHOME=$PWD/gnupg +mkdir -m 700 -p "$GNUPGHOME" +curl -L -o "$depname" -- "$src" +curl -L -o signature.asc -- "$signature" +curl https://bisq.network/pubkey/E222AA02.asc | gpg --import +gpg --batch --verify signature.asc "$depname" +sha256=$(nix-prefetch-url --type sha256 "file://$PWD/$depname") +popd + +update-source-version bisq-desktop "$version" "$sha256" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a6feba9e587e1..6db0dae1c802d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35259,6 +35259,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) CoreData IOKit PCSC; }; + haveno = callPackage ../applications/blockchains/haveno { }; + monero-gui = libsForQt5.callPackage ../applications/blockchains/monero-gui { }; napari = with python3Packages; toPythonApplication napari; From 2d0ea48aa14fa1644eae27ae25d27f077780f1ed Mon Sep 17 00:00:00 2001 From: Jacob Hrbek Date: Tue, 14 May 2024 14:36:10 +0200 Subject: [PATCH 2/4] sync --- build.log | 59 ++++++++----------- .../blockchains/haveno/default.nix | 35 ++++------- 2 files changed, 38 insertions(+), 56 deletions(-) diff --git a/build.log b/build.log index 9e80ef363ccd8..7fa152ea0448c 100644 --- a/build.log +++ b/build.log @@ -1,6 +1,6 @@ @nix { "action": "setPhase", "phase": "unpackPhase" } Running phase: unpackPhase -unpacking source archive /nix/store/xgxilpynviqjg46jl93l7pc3fln7jwrv-source +unpacking source archive /nix/store/qq3clw9lrd1yszs4dbfalds172p3xwic-source source root is source @nix { "action": "setPhase", "phase": "patchPhase" } Running phase: patchPhase @@ -24,44 +24,37 @@ For more details see https://docs.gradle.org/8.7/release-notes.html To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.7/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation. -> Starting DaemonDaemon will be stopped at the end of the build +> Starting Daemon> IDLEDaemon will be stopped at the end of the build  -> IDLE<-------------> 0% INITIALIZING [54ms]<-------------> 0% INITIALIZING [154ms]<-------------> 0% INITIALIZING [254ms]<-------------> 0% INITIALIZING [354ms]<-------------> 0% INITIALIZING [454ms]<-------------> 0% INITIALIZING [554ms]> Evaluating settings<-------------> 0% INITIALIZING [654ms]<-------------> 0% INITIALIZING [754ms]<-------------> 0% INITIALIZING [854ms]<-------------> 0% INITIALIZING [954ms]<-------------> 0% INITIALIZING [1s]<-------------> 0% INITIALIZING [2s]<-------------> 0% CONFIGURING [2s]> Loading projects> root project<-------------> 0% CONFIGURING [3s]<-------------> 0% CONFIGURING [4s]<-------------> 0% CONFIGURING [5s] -FAILURE: Build failed with an exception. +> IDLE<-------------> 0% INITIALIZING [69ms]<-------------> 0% INITIALIZING [169ms]<-------------> 0% INITIALIZING [269ms]<-------------> 0% INITIALIZING [368ms]<-------------> 0% INITIALIZING [469ms]<-------------> 0% INITIALIZING [570ms]<-------------> 0% INITIALIZING [669ms]<-------------> 0% INITIALIZING [769ms]> Evaluating settings<-------------> 0% INITIALIZING [868ms]<-------------> 0% INITIALIZING [968ms]<-------------> 0% INITIALIZING [1s]<-------------> 0% INITIALIZING [2s]<-------------> 0% CONFIGURING [2s]> IDLE> root project<-------------> 0% CONFIGURING [3s]<-------------> 0% CONFIGURING [4s]<-------------> 0% CONFIGURING [5s]<-------------> 0% CONFIGURING [6s]> root project > Resolve dependencies of :classpath + -* What went wrong: -A problem occurred configuring root project 'haveno'. -> Could not resolve all artifacts for configuration ':classpath'. - > Could not resolve com.google.protobuf:protobuf-gradle-plugin:0.8.17. - Required by: - project : - > No cached version of com.google.protobuf:protobuf-gradle-plugin:0.8.17 available for offline mode. - > Could not resolve com.google.gradle:osdetector-gradle-plugin:1.7.3. - Required by: - project : - > No cached version of com.google.gradle:osdetector-gradle-plugin:1.7.3 available for offline mode. - > Could not resolve com.github.johnrengelman:shadow:8.1.1. - Required by: - project : - > No cached version of com.github.johnrengelman:shadow:8.1.1 available for offline mode. - > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.3. - Required by: - project : - > No cached version of org.springframework.boot:spring-boot-gradle-plugin:3.2.3 available for offline mode. - > Could not resolve com.gradle:gradle-enterprise-gradle-plugin:3.16.1. - Required by: - project : - > No cached version of com.gradle:gradle-enterprise-gradle-plugin:3.16.1 available for offline mode. +> root project > Resolve dependencies of :classpath > spring-boot-gradle-plugin> root project > Resolve dependencies of :classpath > osdetector-gradle-plugin-> root project > Resolve dependencies of :classpath > gradle-enterprise-gradle-> root project > Resolve dependencies of :classpath > shadow-8.1.1.pom<-------------> 0% CONFIGURING [7s]> IDLE> IDLE> root project > Resolve dependencies of :classpath > gradle-enterprise-gradle-> root project > Resolve dependencies of :classpath > shadow-8.1.1.module> root project > Resolve dependencies of :classpath > commons-lang-2.6.pom> IDLE> root project > Resolve dependencies of :classpath > guava-27.0.1-jre.pom> root project > Resolve dependencies of :classpath > commons-parent-17.pom > 6> IDLE> root project > Resolve dependencies of :classpath<-------------> 0% CONFIGURING [8s]> root project > Resolve dependencies of :classpath > jdom2-2.0.6.1.pom> root project > Resolve dependencies of :classpath > plexus-utils-3.5.1.pom> root project > Resolve dependencies of :classpath > commons-io-2.11.0.pom> root project > Resolve dependencies of :classpath > asm-commons-9.4.pom> root project > Resolve dependencies of :classpath > jdependency-2.8.0.pom> root project > Resolve dependencies of :classpath > plexus-10.pom> root project > Resolve dependencies of :classpath > ow2-1.5.1.pom> IDLE> root project > Resolve dependencies of :classpath > commons-parent-52.pom> root project > Resolve dependencies of :classpath > ant-parent-1.10.13.pom> IDLE> root project > Resolve dependencies of :classpath > apache-23.pom> IDLE> root project > Resolve dependencies of :classpath> root project > Resolve dependencies of :classpath > junit-bom-5.7.2.module> root project > Resolve dependencies of :classpath> root project > Resolve dependencies of :classpath > log4j-2.20.0.pom> root project > Resolve dependencies of :classpath > logging-parent-7.pom<-------------> 0% CONFIGURING [9s]> root project > Resolve dependencies of :classpath > apache-27.pom> root project > Resolve dependencies of :classpath> root project > Resolve dependencies of :classpath > groovy-bom-3.0.14.pom> root project > Resolve dependencies of :classpath > jackson-parent-2.14.pom> root project > Resolve dependencies of :classpath > oss-parent-48.pom > 4.7 K> root project > Resolve dependencies of :classpath > jakarta.jakartaee-bom-9.0> root project > Resolve dependencies of :classpath > jakartaee-api-parent-9.0.> root project > Resolve dependencies of :classpath > project-1.0.6.pom> root project > Resolve dependencies of :classpath > jetty-bom-9.4.50.v2022120<-------------> 0% CONFIGURING [10s]> root project > Resolve dependencies of :classpath > junit-bom-5.9.1.pom> root project > Resolve dependencies of :classpath > kubernetes-client-bom-5.1> root project > Resolve dependencies of :classpath > netty-bom-4.1.86.Final.po> root project > Resolve dependencies of :classpath > spring-framework-bom-5.3.> root project > Resolve dependencies of :classpath> root project > Resolve dependencies of :classpath > spring-boot-loader-tools-> root project > Resolve dependencies of :classpath > dependency-management-plu> root project > Resolve dependencies of :classpath > commons-compress-1.21.pom> root project > Resolve dependencies of :classpath > spring-boot-buildpack-pla> IDLE> IDLE> IDLE<-------------> 0% CONFIGURING [11s]> root project > Resolve dependencies of :classpath > error_prone_annotations-2> root project > Resolve dependencies of :classpath > checker-qual-2.5.2.pom> root project > Resolve dependencies of :classpath > j2objc-annotations-1.1.po> root project > Resolve dependencies of :classpath > jsr305-3.0.2.pom> root project > Resolve dependencies of :classpath > error_prone_parent-2.2.0.> root project > Resolve dependencies of :classpath > animal-sniffer-annotation> root project > Resolve dependencies of :classpath > guava-parent-26.0-android> IDLE> IDLE> IDLE> root project > Resolve dependencies of :classpath > animal-sniffer-parent-1.1> root project > Resolve dependencies of :classpath > mojo-parent-40.pom> root project > Resolve dependencies of :classpath > asm-tree-9.4.pom> root project > Resolve dependencies of :classpath > ant-launcher-1.10.13.pom> root project > Resolve dependencies of :classpath > log4j-api-2.20.0.pom> root project > Resolve dependencies of :classpath > jackson-databind-2.14.2.p> root project > Resolve dependencies of :classpath > jna-platform-5.13.0.pom> root project > Resolve dependencies of :classpath > httpclient5-5.2.3.pom> root project > Resolve dependencies of :classpath > jackson-module-parameter-> root project > Resolve dependencies of :classpath > jackson-base-2.14.2.pom> root project > Resolve dependencies of :classpath > httpcomponents-parent-13.> IDLE> root project > Resolve dependencies of :classpath > jackson-modules-java8-2.1<-------------> 0% CONFIGURING [12s]> root project > Resolve dependencies of :classpath > jackson-bom-2.14.2.pom> IDLE> root project > Resolve dependencies of :classpath > jackson-databind-2.14.2.m> root project > Resolve dependencies of :classpath > junit-bom-5.9.3.pom> root project > Resolve dependencies of :classpath > jackson-module-parameter-> IDLE> root project > Resolve dependencies of :classpath > junit-bom-5.9.3.module> IDLE> root project > Resolve dependencies of :classpath > spring-jcl-6.0.10.module> root project > Resolve dependencies of :classpath > jackson-core-2.14.2.pom> root project > Resolve dependencies of :classpath > jackson-annotations-2.14.> IDLE> root project > Resolve dependencies of :classpath > jna-5.13.0.pom> root project > Resolve dependencies of :classpath > slf4j-api-1.7.36.pom> root project > Resolve dependencies of :classpath > httpcore5-5.2.4.pom> root project > Resolve dependencies of :classpath > httpcore5-h2-5.2.4.pom> IDLE> root project > Resolve dependencies of :classpath > httpcore5-parent-5.2.4.po> IDLE> root project > Resolve dependencies of :classpath > antlr4-runtime-4.7.2.pom> root project > Resolve dependencies of :classpath<-------------> 0% CONFIGURING [13s]> root project> root project > tomlj-1.0.0.jar> root project > Resolve files of configuration ':classpath' > osdetector-gradl> root project > Resolve files of configuration ':classpath' > log4j-core-2.20.> root project > Resolve files of configuration ':classpath' > protobuf-gradle-> root project > Resolve files of configuration ':classpath' > shadow-8.1.1.jar> root project > Resolve files of configuration ':classpath' > guava-27.0.1-jre> root project > Resolve files of configuration ':classpath' > commons-lang-2.6> root project > Resolve files of configuration ':classpath' > os-maven-plugin-> root project > Resolve files of configuration ':classpath' > asm-commons-9.4.> root project > Resolve files of configuration ':classpath' > asm-tree-9.4.jar> root project > Resolve files of configuration ':classpath' > asm-9.4.jar> root project > Resolve files of configuration ':classpath' > commons-io-2.11.> root project > Resolve files of configuration ':classpath' > ant-1.10.13.jar> root project > Resolve files of configuration ':classpath' > spring-boot-buil> root project > Resolve files of configuration ':classpath' > spring-boot-load> root project > Resolve files of configuration ':classpath' > ant-1.10.13.jar > root project > Resolve files of configuration ':classpath' > jdependency-2.8.> root project > Resolve files of configuration ':classpath' > spring-core-6.0.> root project > Resolve files of configuration ':classpath' > listenablefuture> root project > Resolve files of configuration ':classpath' > commons-compress> root project > Resolve files of configuration ':classpath' > failureaccess-1.> root project > Resolve files of configuration ':classpath' > checker-qual-2.5> root project > Resolve files of configuration ':classpath' > jsr305-3.0.2.jar> root project > Resolve files of configuration ':classpath' > error_prone_anno> root project > Resolve files of configuration ':classpath' > j2objc-annotatio> root project > Resolve files of configuration ':classpath' > animal-sniffer-a<-------------> 0% CONFIGURING [14s]> root project > Resolve files of configuration ':classpath' > jackson-annotati> root project > Resolve files of configuration ':classpath' > jackson-core-2.1> root project > Resolve files of configuration ':classpath' > ant-launcher-1.1> root project > Resolve files of configuration ':classpath' > jna-platform-5.1> root project > Resolve files of configuration ':classpath' > httpclient5-5.2.> root project > Resolve files of configuration ':classpath' > spring-jcl-6.0.1> root project > Resolve files of configuration ':classpath' > slf4j-api-1.7.36> root project > Resolve files of configuration ':classpath' > antlr4-runtime-4> root project > Resolve files of configuration ':classpath' > httpcore5-5.2.4.> root project > Resolve files of configuration ':classpath' > Verifying gradle> root project > Resolve files of configuration ':classpath' > Verifying osdete> root project > Resolve files of configuration ':classpath' > Verifying protob> root project > Resolve files of configuration ':classpath' > Verifying shadow> root project > Resolve files of configuration ':classpath' > ExternalDependen> root project > Resolve files of configuration ':classpath' > ExternalDependen> root project > Resolve files of configuration ':classpath' > ExternalDependen> root project > Resolve files of configuration ':classpath' > ExternalDependen> IDLE> root project > Resolve files of configuration ':classpath' > ExternalDependen> IDLE> root project > Resolve files of configuration ':classpath' > ExternalDependen> IDLE<-------------> 0% CONFIGURING [15s]> root project > Resolve files of configuration ':classpath' > ExternalDependen> IDLE> root project > Resolve files of configuration ':classpath' > ExternalDependen<-------------> 0% CONFIGURING [16s]> IDLE> root project > Resolve files of configuration ':classpath' > ExternalDependen> IDLE> root project > Resolve files of configuration ':classpath' > ExternalDependen> IDLE> IDLE> IDLE> IDLE<-------------> 0% CONFIGURING [17s]> root project<-------------> 0% CONFIGURING [18s]<-------------> 0% CONFIGURING [19s]<-------------> 0% CONFIGURING [20s]<-------------> 0% CONFIGURING [21s]<-------------> 0% CONFIGURING [22s]<=========----> 73% CONFIGURING [22s]> :proto<=============> 100% CONFIGURING [23s]> IDLE> Resolve dependencies of :desktop:runtimeClasspath > jcsv-1.4.0.pom> Resolve dependencies of :desktop:runtimeClasspath > gson-2.8.5.pom> Resolve dependencies of :desktop:runtimeClasspath > guava-32.1.1-jre.pom> Resolve dependencies of :desktop:runtimeClasspath > logback-core-1.1.11.pom> IDLE> IDLE> Resolve dependencies of :desktop:runtimeClasspath > guava-parent-32.1.1-jre.p> IDLE> Resolve dependencies of :desktop:runtimeClasspath > commons-lang3-3.11.pom > > Resolve dependencies of :desktop:runtimeClasspath > bcpg-jdk15on-1.63.pom > 1> Resolve dependencies of :desktop:runtimeClasspath > commons-parent-42.pom > 1> Resolve dependencies of :desktop:runtimeClasspath > easybind-1.0.3.pom<=============> 100% CONFIGURING [24s]> Resolve dependencies of :desktop:runtimeClasspath > commons-parent-51.pom > 6> IDLE> Resolve dependencies of :desktop:runtimeClasspath > javafx-fxml-21.0.2.pom> Resolve dependencies of :desktop:runtimeClasspath > bitcoinj-2a80db4.pom> IDLE> Resolve dependencies of :desktop:runtimeClasspath > javafx-graphics-21.0.2.po> IDLE> Resolve dependencies of :desktop:runtimeClasspath > jtorctl-9b5ba2036b.pom> Resolve dependencies of :desktop:runtimeClasspath<=============> 100% CONFIGURING [25s]> Resolve dependencies of :desktop:runtimeClasspath > tor.external-33485b9e57.p> Resolve dependencies of :desktop:runtimeClasspath > tor.native-33485b9e57.pom> Resolve dependencies of :desktop:runtimeClasspath > tor.native-33485b9e57.pom> Resolve dependencies of :desktop:runtimeClasspath > tor.external-33485b9e57.p> Resolve dependencies of :desktop:runtimeClasspath > parent-33485b9e57.pom> IDLE<=============> 100% CONFIGURING [26s]<=============> 100% CONFIGURING [27s]> Resolve dependencies of :desktop:runtimeClasspath> Resolve dependencies of :desktop:runtimeClasspath > httpcomponents-core-4.4.1> Resolve dependencies of :desktop:runtimeClasspath > jackson-parent-2.12.pom> Resolve dependencies of :desktop:runtimeClasspath > jsonrpc4j-1.6.0.bisq.1.po> Resolve dependencies of :desktop:runtimeClasspath > jackson-base-2.12.1.pom> Resolve dependencies of :desktop:runtimeClasspath > jackson-annotations-2.12.> IDLE> IDLE> IDLE> Resolve dependencies of :desktop:runtimeClasspath > jsonrpc4j-1.6.0.bisq.1.mo> Resolve dependencies of :desktop:runtimeClasspath> Resolve dependencies of :desktop:runtimeClasspath > bcprov-jdk15to18-1.63.pom> Resolve dependencies of :desktop:runtimeClasspath > jcip-annotations-1.0.pom> Resolve dependencies of :desktop:runtimeClasspath > maven-metadata.xml> IDLE> Resolve dependencies of :desktop:runtimeClasspath > jackson-modules-base-2.13> Resolve dependencies of :desktop:runtimeClasspath > jackson-parent-2.13.pom<=============> 100% CONFIGURING [28s]> Resolve dependencies of :desktop:runtimeClasspath> Resolve dependencies of :desktop:runtimeClasspath > maven-metadata.xml> Resolve dependencies of :desktop:runtimeClasspath > commons-codec-1.15.pom> Resolve dependencies of :desktop:runtimeClasspath > jeromq-0.5.2.pom> Resolve dependencies of :desktop:runtimeClasspath > httpclient5-parent-5.2.1.> IDLE> Resolve dependencies of :desktop:runtimeClasspath> Resolve dependencies of :desktop:runtimeClasspath > jsocks-43b004b5bcc468fb12> Resolve dependencies of :desktop:runtimeClasspath > kotlin-logging-1.5.4.pom> Resolve dependencies of :desktop:runtimeClasspath > tor-33485b9e57.pom> IDLE<=============> 100% CONFIGURING [29s]> IDLE> Resolve dependencies of :desktop:runtimeClasspath > tor-binary-windows-4e527e> Resolve dependencies of :desktop:runtimeClasspath > tor-binary-linux32-4e527e> Resolve dependencies of :desktop:runtimeClasspath > tor-binary-macos-4e527e5a> Resolve dependencies of :desktop:runtimeClasspath > tor-binary-linux64-4e527e> Resolve dependencies of :desktop:runtimeClasspath > tor-binary-macos-4e527e5a> Resolve dependencies of :desktop:runtimeClasspath > tor-binary-linux32-4e527e> IDLE> Resolve dependencies of :desktop:runtimeClasspath > tor-binary-4e527e5a0e14b0> IDLE> IDLE<=============> 100% CONFIGURING [30s]> Resolve dependencies of :desktop:runtimeClasspath > commons-parent-34.pom> Resolve dependencies of :desktop:runtimeClasspath > checker-qual-3.33.0.pom> Resolve dependencies of :desktop:runtimeClasspath > core-2.0.pom> Resolve dependencies of :desktop:runtimeClasspath> Resolve dependencies of :desktop:runtimeClasspath > httpcore5-h2-5.2.pom > 3.<=============> 100% CONFIGURING [31s]> Resolve dependencies of :desktop:runtimeClasspath> Resolve dependencies of :desktop:runtimeClasspath > jtorctl-b2a172f44edcd8dea> Resolve dependencies of :desktop:runtimeClasspath > tor-binary-geoip-4e527e5a> IDLE> Resolve dependencies of :desktop:runtimeClasspath > jackson-annotations-2.13.> Resolve dependencies of :desktop:runtimeClasspath> Resolve files of configuration ':desktop:runtimeClasspath' > grpc-core-1.42.1> Resolve files of configuration ':desktop:runtimeClasspath' > logback-core-1.1> Resolve files of configuration ':desktop:runtimeClasspath' > logback-classic-> Resolve files of configuration ':desktop:runtimeClasspath' > grpc-netty-shade<=============> 100% CONFIGURING [32s]> Resolve files of configuration ':desktop:runtimeClasspath' > proto-google-com> Resolve files of configuration ':desktop:runtimeClasspath' > protobuf-java-3.> Resolve files of configuration ':desktop:runtimeClasspath' > jfoenix-9.0.10.j> IDLE> Resolve files of configuration ':desktop:runtimeClasspath' > commons-lang3-3.> Resolve files of configuration ':desktop:runtimeClasspath' > bcpg-jdk15on-1.6> Resolve files of configuration ':desktop:runtimeClasspath' > qrgen-1.3.jar> Resolve files of configuration ':desktop:runtimeClasspath' > jsonrpc4j-1.6.0.> Resolve files of configuration ':desktop:runtimeClasspath' > annotations-13.0> Resolve files of configuration ':desktop:runtimeClasspath' > kotlin-stdlib-1.> Resolve files of configuration ':desktop:runtimeClasspath' > tor-33485b9e57.j> Resolve files of configuration ':desktop:runtimeClasspath' > httpclient5-5.2.> Resolve files of configuration ':desktop:runtimeClasspath' > bitcoinj-2a80db4> Resolve files of configuration ':desktop:runtimeClasspath' > javafx-controls-> Resolve files of configuration ':desktop:runtimeClasspath' > javafx-swing-21.> Resolve files of configuration ':desktop:runtimeClasspath' > javafx-graphics-<=============> 100% CONFIGURING [33s]> IDLE> Resolve files of configuration ':desktop:runtimeClasspath' > jopt-simple-5.0.> Resolve files of configuration ':desktop:runtimeClasspath' > grpc-api-1.42.1.> Resolve files of configuration ':desktop:runtimeClasspath' > commons-codec-1.> Resolve files of configuration ':desktop:runtimeClasspath' > jackson-core-2.1> Resolve files of configuration ':desktop:runtimeClasspath' > jackson-databind> Resolve files of configuration ':desktop:runtimeClasspath' > bcprov-jdk15to18> Resolve files of configuration ':desktop:runtimeClasspath' > bcprov-jdk15on-1> Resolve files of configuration ':desktop:runtimeClasspath' > jakarta.inject-a> Resolve files of configuration ':desktop:runtimeClasspath' > tor-binary-linux> Resolve files of configuration ':desktop:runtimeClasspath' > tor-binary-linux> Resolve files of configuration ':desktop:runtimeClasspath' > tor-binary-macos<=============> 100% CONFIGURING [34s]> Resolve files of configuration ':desktop:runtimeClasspath' > tor-binary-geoip<=============> 100% CONFIGURING [35s]<=============> 100% CONFIGURING [36s]> IDLE<=============> 100% CONFIGURING [37s]<=============> 100% CONFIGURING [38s]> IDLE<=============> 100% CONFIGURING [39s]> IDLE<=============> 100% CONFIGURING [40s]<=============> 100% CONFIGURING [41s]> Resolve files of configuration ':desktop:runtimeClasspath'> Resolve files of configuration ':desktop:runtimeClasspath' > Verifying easybi> Resolve files of configuration ':desktop:runtimeClasspath' > Verifying jfoeni> Resolve files of configuration ':desktop:runtimeClasspath' > Verifying guava-> Resolve files of configuration ':desktop:runtimeClasspath' > Verifying grpc-n> Resolve files of configuration ':desktop:runtimeClasspath' > Verifying tor-bi> Resolve files of configuration ':desktop:runtimeClasspath' > Verifying tor-bi> Resolve files of configuration ':desktop:runtimeClasspath' > Verifying tor-bi> Resolve files of configuration ':desktop:runtimeClasspath' > Verifying monero> IDLE> IDLE> IDLE> Resolve dependencies of :inventory:runtimeClasspath > spark-core-2.5.2.pom> Resolve dependencies of :inventory:runtimeClasspath > jetty-webapp-9.3.6.v201> Resolve dependencies of :inventory:runtimeClasspath > websocket-servlet-9.3.6> Resolve dependencies of :inventory:runtimeClasspath > jetty-project-9.3.6.v20> Resolve dependencies of :inventory:runtimeClasspath > websocket-server-9.3.6.> Resolve dependencies of :inventory:runtimeClasspath > jetty-parent-25.pom> Resolve dependencies of :inventory:runtimeClasspath > maven-metadata.xml> IDLE> IDLE> IDLE> Resolve dependencies of :inventory:runtimeClasspath > jetty-io-9.3.6.v2015110> Resolve dependencies of :inventory:runtimeClasspath > jetty-xml-9.3.6.v201511> Resolve dependencies of :inventory:runtimeClasspath > jetty-servlet-9.3.6.v20<=============> 100% CONFIGURING [42s]> IDLE> Resolve dependencies of :inventory:runtimeClasspath > websocket-api-9.3.6.v20> IDLE> Resolve files of configuration ':inventory:runtimeClasspath' > jetty-security> Resolve files of configuration ':inventory:runtimeClasspath' > jetty-servlet-> Resolve files of configuration ':inventory:runtimeClasspath' > spark-core-2.5> Resolve files of configuration ':inventory:runtimeClasspath' > jetty-webapp-9> Resolve files of configuration ':inventory:runtimeClasspath' > jetty-server-9> Resolve files of configuration ':inventory:runtimeClasspath' > websocket-comm> Resolve files of configuration ':inventory:runtimeClasspath' > websocket-clie> Resolve files of configuration ':inventory:runtimeClasspath' > jetty-io-9.3.6> IDLE> IDLE> IDLE> IDLE> Resolve dependencies of :seednode:runtimeClasspath > maven-metadata.xml> IDLE<-------------> 0% EXECUTING [42s]> :proto:extractIncludeProto > Resolve dependencies of :proto:compileProtoPath > :proto:extractIncludeProto > Resolve dependencies of :proto:compileProtoPath <-------------> 0% EXECUTING [43s]> :proto:extractIncludeProto > Resolve files of configuration ':proto:compilePr> :proto:extractIncludeProto > Resolve files of configuration ':proto:compilePr> :proto:extractIncludeProto > Resolve files of configuration ':proto:compilePr> IDLE> IDLE> :proto:extractIncludeProto > Resolve dependencies of :proto:compileClasspath > :proto:extractIncludeProto > Resolve files of configuration ':proto:compileCl> :proto:extractIncludeProto> :proto:generateProto > Resolve dependencies of :proto:protobufToolsLocator_pr> :proto:generateProto> :proto:generateProto > Resolve files of configuration ':proto:protobufToolsLo<-------------> 0% EXECUTING [44s]> :proto:generateProto > Resolve dependencies of :proto:protobufToolsLocator_gr> :proto:generateProto > Resolve files of configuration ':proto:protobufToolsLo> :proto:generateProto> Task :proto:generateProto FAILED + +<-------------> 1% EXECUTING [44s]> IDLE> IDLE> IDLE> IDLE +FAILURE: Build failed with an exception. + +* What went wrong: +Execution failed for task ':proto:generateProto'. +> java.io.IOException: Cannot run program "/build/tmp.YollhrLx8O/caches/modules-2/files-2.1/com.google.protobuf/protoc/3.19.1/d231c807be82ffc29b02525c8c2691772eb945bc/protoc-3.19.1-linux-x86_64.exe": error=2, No such file or directory * Try: > Run with --stacktrace option to get the stack trace. - - -<-------------> 6% CONFIGURING [5s]> IDLE> Run with --info or --debug option to get more log output. -> Run with --scan to get full insights. +> Run with --info or --debug option to get more log output. +> Run with --scan to get full insights. > Get more help at https://help.gradle.org. -BUILD FAILED in 7s +Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. + +You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. + +For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. + +BUILD FAILED in 47s +3 actionable tasks: 3 executed + + +   -<-------------> 0% WAITING> IDLE[?12l[?25h \ No newline at end of file +<-------------> 0% WAITING> IDLE> IDLE> IDLE> IDLE[?12l[?25h \ No newline at end of file diff --git a/pkgs/applications/blockchains/haveno/default.nix b/pkgs/applications/blockchains/haveno/default.nix index 8dfbe362f13d1..c5cb17baab626 100644 --- a/pkgs/applications/blockchains/haveno/default.nix +++ b/pkgs/applications/blockchains/haveno/default.nix @@ -6,11 +6,10 @@ , makeDesktopItem , copyDesktopItems , imagemagick -, openjdk11 -, dpkg +, openjdk21 , gradle , gnumake -, jdk21 +, protobuf , writeScript , bash , stripJavaArchivesHook @@ -18,33 +17,21 @@ , zip , xz , findutils +, perl }: stdenv.mkDerivation rec { pname = "haveno"; - version = "1.0.3"; + version = "1.0.3-281b7d0"; src = fetchFromGitHub { owner = "haveno-dex"; repo = "haveno"; - rev = "cc247bbc69994b3904f6e7237c4f1c6835a9e33e"; - hash = "sha256-ptjrZ3dLPRtAUIHWBnXP7OTwWmN+4OylJwPimJotwW8="; + rev = "281b7d0905a0272d8c202c6776191642172843c7"; + hash = "sha256-uDJhmK7Jr6BTe6bYY7pp19zhymnXJXtTuQ1jkzyRQ8E="; }; - nativeBuildInputs = [ - gnumake - jdk21 - gradle - - copyDesktopItems - - imagemagick - makeWrapper - stripJavaArchivesHook - xz - zip - findutils - ]; + nativeBuildInputs = [ gradle makeWrapper ]; # TODO(Krey) # desktopItems = [ @@ -59,10 +46,9 @@ stdenv.mkDerivation rec { # ]; # fake build to pre-download deps into fixed-output derivation - # TODO(Kreyn->Nikky): Plz figure this out thanku <3 deps = stdenv.mkDerivation { pname = "${pname}-deps"; - inherit src version postPatch; + inherit src version; nativeBuildInputs = [ gradle perl ]; buildPhase = '' export GRADLE_USER_HOME="$(mktemp -d)" @@ -78,10 +64,13 @@ stdenv.mkDerivation rec { forceShare = [ "dummy" ]; outputHashMode = "recursive"; # Downloaded jars differ by platform - outputHash = "sha256-cs95YI0SpvzCo5x5trMXlVUGepNKIH9oZ95AfLErKIU="; + # outputHash = "sha256-cs95YI0SpvzCo5x5trMXlVUGepNKIH9oZ95AfLErKIU="; + outputHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; }; preBuild = '' + # Use the local packages from deps + sed -i -e '/repositories {/a maven { url uri("${deps}") }' build.gradle mkdir -p .localnet ''; From 14430f61a7cf2def0d6138de2a4f28930c029fc6 Mon Sep 17 00:00:00 2001 From: Jacob Hrbek Date: Fri, 9 Aug 2024 21:29:48 +0000 Subject: [PATCH 3/4] sync --- .../blockchains/haveno/default.nix | 136 ++++++++---------- 1 file changed, 56 insertions(+), 80 deletions(-) diff --git a/pkgs/applications/blockchains/haveno/default.nix b/pkgs/applications/blockchains/haveno/default.nix index c5cb17baab626..8ace37bfbf9e2 100644 --- a/pkgs/applications/blockchains/haveno/default.nix +++ b/pkgs/applications/blockchains/haveno/default.nix @@ -1,100 +1,76 @@ -{ stdenv -, lib -, makeWrapper -, fetchurl -, fetchFromGitHub -, makeDesktopItem -, copyDesktopItems -, imagemagick -, openjdk21 -, gradle -, gnumake -, protobuf -, writeScript -, bash -, stripJavaArchivesHook -, tor -, zip -, xz -, findutils -, perl -}: +{ lib, stdenv, fetchurl, fetchFromGitHub, jdk, jre, gradle, bash, coreutils, substituteAll, nixosTests, fetchpatch, writeText }: + +# Refer to https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/gradle.section.md for packaging details stdenv.mkDerivation rec { pname = "haveno"; - version = "1.0.3-281b7d0"; + version = "1.0.10"; src = fetchFromGitHub { owner = "haveno-dex"; repo = "haveno"; - rev = "281b7d0905a0272d8c202c6776191642172843c7"; - hash = "sha256-uDJhmK7Jr6BTe6bYY7pp19zhymnXJXtTuQ1jkzyRQ8E="; + rev = version; + hash = "sha256-5ENXC6SWPt08ZixbHHdNAMkjVIXOodk+/Y1hgQ9fm68="; }; - nativeBuildInputs = [ gradle makeWrapper ]; - - # TODO(Krey) - # desktopItems = [ - # (makeDesktopItem { - # name = "Bisq"; - # exec = "bisq-desktop"; - # icon = "bisq"; - # desktopName = "Bisq ${version}"; - # genericName = "Decentralized bitcoin exchange"; - # categories = [ "Network" "P2P" ]; - # }) - # ]; - - # fake build to pre-download deps into fixed-output derivation - deps = stdenv.mkDerivation { - pname = "${pname}-deps"; - inherit src version; - nativeBuildInputs = [ gradle perl ]; - buildPhase = '' - export GRADLE_USER_HOME="$(mktemp -d)" - gradle --no-daemon build - ''; - # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) - installPhase = '' - find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \ - | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/''${\($5 =~ s/okio-jvm/okio/r)}" #e' \ - | sh - ''; - # Don't move info to share/ - forceShare = [ "dummy" ]; - outputHashMode = "recursive"; - # Downloaded jars differ by platform - # outputHash = "sha256-cs95YI0SpvzCo5x5trMXlVUGepNKIH9oZ95AfLErKIU="; - outputHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; + # postPatch = '' + # rm gradle/verification-{keyring.keys,metadata.xml} + # ''; + + nativeBuildInputs = [ gradle jdk ]; + + # wrapper = substituteAll { + # src = ./havenoWrapper; + # inherit bash coreutils jre; + # }; + + mitmCache = gradle.fetchDeps { + inherit pname; + data = ./deps.json; }; - preBuild = '' - # Use the local packages from deps - sed -i -e '/repositories {/a maven { url uri("${deps}") }' build.gradle - mkdir -p .localnet - ''; + # this is required for using mitm-cache on Darwin + __darwinAllowLocalNetworking = true; + + gradleFlags = [ + "-Dorg.gradle.java.home=${jdk}" + "-Dfile.encoding=utf-8" + ]; + + gradleBuildTask = "jar"; - buildPhase = '' - gradle --offline --no-daemon build - ''; + # will run the gradleCheckTask (defaults to "test") + doCheck = true; - installPhase = '' - runHook preInstall + # installPhase = '' + # mkdir -p $out/{bin,share/haveno} + # cp build/libs/haveno-all.jar $out/share/haveno - # "haveno-apitest" "haveno-cli" "haveno-daemon" "haveno-desktop" "haveno-inventory" "haveno-monitor" "haveno-relay" "haveno-seednode" "haveno-statsnode" + # makeWrapper ${jre}/bin/java $out/bin/haveno \ + # --add-flags "-jar $out/share/haveno/haveno-all.jar" - # ... + # cp ${src}/haveno.1 $out/share/man/man1 + # ''; - runHook postInstall - ''; + # installPhase = '' + # runHook preInstall + # install -Dm444 build/libs/freenet.jar $out/share/freenet/freenet.jar + # ln -s ${freenet_ext} $out/share/freenet/freenet-ext.jar + # mkdir -p $out/bin + # install -Dm555 ${wrapper} $out/bin/freenet + # substituteInPlace $out/bin/freenet \ + # --subst-var-by outFreenet $out + # runHook postInstall + # ''; - # passthru.updateScript = ./update.sh; + # passthru.tests = { inherit (nixosTests) freenet; }; - meta = with lib; { - description = "A decentralized bitcoin exchange network"; - homepage = "https://bisq.network"; - license = licenses.mit; - maintainers = with maintainers; [ juaningan emmanuelrosa ]; - platforms = [ "x86_64-linux" ]; + meta = { + description = "A decentralized monero exchange network"; + homepage = "https://haveno.exchange"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ juaningan emmanuelrosa ]; + platforms = with lib.platforms; linux; + # changelog = ""; }; } From 02b553d2691aa047b2df0911d5c24432d42968c6 Mon Sep 17 00:00:00 2001 From: Jacob Hrbek Date: Fri, 9 Aug 2024 23:34:42 +0000 Subject: [PATCH 4/4] Blind code to make the work easier later --- .../blockchains/haveno/default.nix | 46 ++++++++----------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/pkgs/applications/blockchains/haveno/default.nix b/pkgs/applications/blockchains/haveno/default.nix index 8ace37bfbf9e2..dd434b472f46d 100644 --- a/pkgs/applications/blockchains/haveno/default.nix +++ b/pkgs/applications/blockchains/haveno/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, fetchFromGitHub, jdk, jre, gradle, bash, coreutils, substituteAll, nixosTests, fetchpatch, writeText }: +{ lib, stdenv, fetchFromGitHub, jdk, jre, gradle, bash, coreutils, substituteAll, nixosTests, fetchpatch, writeText, makeDesktopItem, ... }: # Refer to https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/gradle.section.md for packaging details @@ -10,38 +10,39 @@ stdenv.mkDerivation rec { owner = "haveno-dex"; repo = "haveno"; rev = version; - hash = "sha256-5ENXC6SWPt08ZixbHHdNAMkjVIXOodk+/Y1hgQ9fm68="; + hash = "sha256-DGpnDyCrelGpyQ8RPhHu7WlQEcNyRHblr8IAUFGVL+A="; }; - # postPatch = '' - # rm gradle/verification-{keyring.keys,metadata.xml} - # ''; - nativeBuildInputs = [ gradle jdk ]; - # wrapper = substituteAll { - # src = ./havenoWrapper; - # inherit bash coreutils jre; - # }; - mitmCache = gradle.fetchDeps { inherit pname; data = ./deps.json; }; - # this is required for using mitm-cache on Darwin - __darwinAllowLocalNetworking = true; + desktopItem = makeDesktopItem { + name = "Haveno"; + desktopName = "Haveno"; + exec = "haveno"; + icon = "haveno"; + # REVIEW(Krey): Propose which category this should be using + categories = [ "Game" ]; + }; gradleFlags = [ + # TODO(Krey): Is this needed? "-Dorg.gradle.java.home=${jdk}" + "-Dfile.encoding=utf-8" ]; - gradleBuildTask = "jar"; + # REVIEW(Krey): No idea what this should be set to + # gradleBuildTask = "shadowJar"; # will run the gradleCheckTask (defaults to "test") doCheck = true; + # TODO(Krey): Implementation blocked by https://github.com/haveno-dex/haveno/issues/1206 # installPhase = '' # mkdir -p $out/{bin,share/haveno} # cp build/libs/haveno-all.jar $out/share/haveno @@ -52,19 +53,6 @@ stdenv.mkDerivation rec { # cp ${src}/haveno.1 $out/share/man/man1 # ''; - # installPhase = '' - # runHook preInstall - # install -Dm444 build/libs/freenet.jar $out/share/freenet/freenet.jar - # ln -s ${freenet_ext} $out/share/freenet/freenet-ext.jar - # mkdir -p $out/bin - # install -Dm555 ${wrapper} $out/bin/freenet - # substituteInPlace $out/bin/freenet \ - # --subst-var-by outFreenet $out - # runHook postInstall - # ''; - - # passthru.tests = { inherit (nixosTests) freenet; }; - meta = { description = "A decentralized monero exchange network"; homepage = "https://haveno.exchange"; @@ -72,5 +60,9 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [ juaningan emmanuelrosa ]; platforms = with lib.platforms; linux; # changelog = ""; + sourceProvenance = with lib.sourceTypes; [ + fromSource + binaryBytecode # mitm cache + ]; }; }