KomodoPlatform / komodo-wallet-desktop

Komodo Wallet Desktop GUI
https://atomicdex.io
GNU General Public License v2.0
235 stars 207 forks source link

[FR]: Ability to build without vcpkg (for Nix support) #2187

Open L-as opened 1 year ago

L-as commented 1 year ago

Is your feature request related to a problem? Please describe. It would be great if there was a Nix expression (for Mac and Linux) to easily build this. vcpkg is problematic with Nix (and Nix replaces it anyway). For reference, see https://discourse.nixos.org/t/packaging-cmake-projects-using-vcpkg/21213/4

Describe your solution -DENABLE_VCPKG option to disable it?

Hopefully an eventual Nix expression would be upstreamable to Nixpkgs. (AFAICT there is no Ethereum-compatible wallet on Nixpkgs besides the Brave browser.)

tonymorony commented 1 year ago

Thank you for your feedback and suggestion, @L-as! Having a Nix expression to build and NixOS support would be beneficial indeed. Unfortunately, we do not have the resources to allocate to this feature at this time. It would be great if you could contribute by making a pull request so that this feature can be implemented sooner.

cf: https://github.com/KomodoPlatform/atomicDEX-Desktop/issues/1876

L-as commented 1 year ago

Thank you, I will probably do a deep dive into this soonish as I'm looking to use the swapping functionality offered.

MarekPasnikowski commented 6 months ago

Yesterday I made a breakthrough on this front while working on a Guix package for Komodo Wallet.

It is actually amusingly simple: comment out or delete the include(vcpkg_prerequisites) line in the top of the main CMakeLists.txt file. On top of that I have applied two flags: "-Wno-dev" "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"

After this I believe it is a matter of solving all the CMake errors caused by this removal to get the software finally packaged for Nix-based systems.

Take a look here if you are interested in my current state of work: https://git.marekpasnikowski.pl/guix.git/tree/private/komodo/komodo.scm?h=private

This is as far as I can go with my self-taught skills, as the three errors I am currently facing are absolutely alien to me and I do not have the time to find my way to understanding. This is my call for help to move forward — what file manipulations are needed to solve this class of errors?

-- /tmp/guix-build-komodo-wallet-0.7.0-beta.drv-0/build/bin//AntaraAtomicDexAppDir
-- Configuring done
CMake Error at cmake/dependencies.cmake:74 (target_link_libraries):
  The link interface of target "komodo-date" contains:

    date::date-tz

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  cmake/antara.cmake:44 (include)
  CMakeLists.txt:50 (include)

CMake Error at vendor/antara-gaming_sdk/modules/event/CMakeLists.txt:7 (target_link_libraries):
  Target "antara_event_shared_sources" links to:

    doom::meta

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

CMake Error at vendor/antara-gaming_sdk/modules/ecs/CMakeLists.txt:8 (target_link_libraries):
  Target "antara_ecs_shared_sources" links to:

    doom::meta

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.
MarekPasnikowski commented 5 months ago

Against all fears, I managed to achieve further progress. I have no idea of knowing whether simple name changes date::date-tz -> date::date and doom::meta -> doom while defining the missing library of doom-meta are the actual solution; but this is good enough for my use of "fake it till you make it" strategy.

I am now hitting the familiar class of some_header: no such file or directory error in the build phase. This one I understand completely, and will solve it at ease.

PS: In the meantime I have restructured my personal git repositories, and this project has a new home at https://git.marekpasnikowski.pl/distribution.git/tree/packages/komodo . Some files are leftovers from before the VCPKG breakthrough, but I am not ready to throw them out yet.

MarekPasnikowski commented 5 months ago

I have successfully made it to the step 169/170, which is the project installation.

I think I deserve the answer to the following question without having to reverse engineer it myself. How do I disable the AppImage creation process? I want the normal linux binary to be the install target.

Forgive me pinging you directly @tonymorony @smk762 , but seeing the recent lack of communications and activity on this project, I wish to ensure at least this message is heard and hopefully answered.