Unverified Commit f1920bf5 authored by Pavol Rusnak's avatar Pavol Rusnak Committed by GitHub
Browse files

Merge pull request #202582 from mdarocha/wasabiwallet-update

wasabiwallet: 2.0.1.3 -> 2.0.2
parents 30c92ecb a21593d8
Loading
Loading
Loading
Loading
+21 −13
Original line number Diff line number Diff line
{ lib, stdenv
, autoPatchelfHook
, makeWrapper
, fetchurl
, makeDesktopItem
, curl
, dotnetCorePackages
, lttng-ust_2_12
, fontconfig
, krb5
, openssl
@@ -11,29 +14,31 @@
}:

let
  dotnet-runtime = dotnetCorePackages.runtime_5_0;
  libPath = lib.makeLibraryPath [
  dotnet-runtime = dotnetCorePackages.runtime_6_0;
  # These libraries are dynamically loaded by the application,
  # and need to be present in LD_LIBRARY_PATH
  runtimeLibs = [
    curl
    dotnet-runtime
    fontconfig.lib
    krb5
    openssl
    stdenv.cc.cc.lib
    xorg.libX11
    xorg.libICE
    xorg.libSM
    zlib
  ];
in
stdenv.mkDerivation rec {
  pname = "wasabiwallet";
  version = "2.0.1.3";
  version = "2.0.2";

  src = fetchurl {
    url = "https://github.com/zkSNACKs/WalletWasabi/releases/download/v${version}/Wasabi-${version}.tar.gz";
    sha256 = "sha256-cATqg/n4/BDQtuCVjHAx3EfMLmlX5EjeQ01gavy/L8o=";
    sha256 = "sha256-0DFl+UFxQckRM2qXFqDpKaRQ5sIMUbNj7l3zKPKAOnQ=";
  };

  dontBuild = true;
  dontPatchELF = true;

  desktopItem = makeDesktopItem {
    name = "wasabi";
@@ -44,16 +49,19 @@ stdenv.mkDerivation rec {
    categories = [ "Network" "Utility" ];
  };

  nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
  buildInputs = runtimeLibs ++ [
    lttng-ust_2_12
  ];

  installPhase = ''
    mkdir -p $out/opt/${pname} $out/bin $out/share/applications
    cp -Rv . $out/opt/${pname}
    cd $out/opt/${pname}
    for i in $(find . -type f -name '*.so') wassabee
      do
        patchelf --set-rpath ${libPath} $i
      done
    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" wassabee
    ln -s $out/opt/${pname}/wassabee $out/bin/${pname}

    makeWrapper "${dotnet-runtime}/bin/dotnet" "$out/bin/${pname}" \
      --add-flags "$out/opt/${pname}/WalletWasabi.Fluent.Desktop.dll" \
      --suffix "LD_LIBRARY_PATH" : "${lib.makeLibraryPath runtimeLibs}"

    cp -v $desktopItem/share/applications/* $out/share/applications
  '';