12 , noto-fonts-color-emoji
24 esbuild' = esbuild.override {
25 buildGoModule = args: buildGoModule (args // rec {
27 src = fetchFromGitHub {
31 hash = "sha256-f13YbgHFQk71g7twwQ2nSOGA0RG0YYM01opv6txRMuw=";
33 vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
38 pname = "deltachat-desktop";
41 src = fetchFromGitHub {
43 repo = "deltachat-desktop";
45 hash = "sha256-fL+9oPQ5dAgvQREZ7A+hKo2MnZKeVvadQDvDPsDNbnQ=";
48 npmDepsHash = "sha256-rUxJLDsAfp+brecTThYTdHIVIfVkKwZ/W5sHV0hHHIk=";
52 $(jq -r '.packages."node_modules/@deltachat/jsonrpc-client".version' package-lock.json) \
53 = $(pkg-config --modversion deltachat) \
54 || (echo "error: libdeltachat version does not match jsonrpc-client" && exit 1)
62 ] ++ lib.optionals stdenv.isLinux [
68 ] ++ lib.optionals stdenv.isDarwin [
73 ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
74 ESBUILD_BINARY_PATH = "${esbuild'}/bin/esbuild";
75 USE_SYSTEM_LIBDELTACHAT = "true";
76 VERSION_INFO_GIT_REF = src.rev;
80 rm -r node_modules/deltachat-node/node/prebuilds
83 npmBuildScript = "build4production";
88 npm prune --production
90 mkdir -p $out/lib/node_modules/deltachat-desktop
91 cp -r . $out/lib/node_modules/deltachat-desktop
93 awk '!/^#/ && NF' build/packageignore_list \
94 | xargs -I {} sh -c "rm -rf $out/lib/node_modules/deltachat-desktop/{}" || true
96 install -D build/icon.png \
97 $out/share/icons/hicolor/scalable/apps/deltachat.png
99 ln -sf ${noto-fonts-color-emoji}/share/fonts/noto/NotoColorEmoji.ttf \
100 $out/lib/node_modules/deltachat-desktop/html-dist/fonts/noto/emoji
101 for font in $out/lib/node_modules/deltachat-desktop/html-dist/fonts/Roboto-*.ttf; do
102 ln -sf ${roboto}/share/fonts/truetype/$(basename $font) \
103 $out/lib/node_modules/deltachat-desktop/html-dist/fonts
106 makeWrapper ${lib.getExe electron_28} $out/bin/deltachat \
107 --set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher${stdenv.hostPlatform.extensions.sharedLibrary} \
108 --add-flags $out/lib/node_modules/deltachat-desktop
113 desktopItems = lib.singleton (makeDesktopItem {
115 exec = "deltachat %u";
117 desktopName = "Delta Chat";
118 genericName = "Delta Chat";
119 comment = meta.description;
120 categories = [ "Network" "InstantMessaging" "Chat" ];
121 startupWMClass = "DeltaChat";
123 "x-scheme-handler/openpgp4fpr"
124 "x-scheme-handler/dcaccount"
125 "x-scheme-handler/dclogin"
126 "x-scheme-handler/mailto"
131 version = testers.testVersion {
132 package = deltachat-desktop;
137 description = "Email-based instant messaging for Desktop";
138 homepage = "https://github.com/deltachat/deltachat-desktop";
139 changelog = "https://github.com/deltachat/deltachat-desktop/blob/${src.rev}/CHANGELOG.md";
140 license = licenses.gpl3Plus;
141 mainProgram = "deltachat";
142 maintainers = with maintainers; [ dotlambda ];