depot/third_party/nixpkgs/pkgs/applications/blockchains/wasabiwallet/default.nix
Default email a71eb02b76 Project import generated by Copybara.
GitOrigin-RevId: a115bb9bd56831941be3776c8a94005867f316a7
2022-11-27 10:42:12 +01:00

76 lines
1.8 KiB
Nix

{ lib, stdenv
, autoPatchelfHook
, makeWrapper
, fetchurl
, makeDesktopItem
, curl
, dotnetCorePackages
, lttng-ust_2_12
, fontconfig
, krb5
, openssl
, xorg
, zlib
}:
let
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
fontconfig.lib
krb5
openssl
stdenv.cc.cc.lib
xorg.libX11
xorg.libICE
xorg.libSM
zlib
];
in
stdenv.mkDerivation rec {
pname = "wasabiwallet";
version = "2.0.2";
src = fetchurl {
url = "https://github.com/zkSNACKs/WalletWasabi/releases/download/v${version}/Wasabi-${version}.tar.gz";
sha256 = "sha256-0DFl+UFxQckRM2qXFqDpKaRQ5sIMUbNj7l3zKPKAOnQ=";
};
dontBuild = true;
desktopItem = makeDesktopItem {
name = "wasabi";
exec = "wasabiwallet";
desktopName = "Wasabi";
genericName = "Bitcoin wallet";
comment = meta.description;
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}
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
'';
meta = with lib; {
description = "Privacy focused Bitcoin wallet";
homepage = "https://wasabiwallet.io/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.mit;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ mmahut ];
};
}