19 urlSuffix = "linux-x86_64.tar.gz";
20 hash = "sha256-sQ3dxwPWHLUoWgnR9+oHaFoDzXxtwKRiBvz2wkFB01g=";
23 urlSuffix = "macos-universal.zip";
24 hash = "sha256-4bU/qecZBrTr34SZAjDDgwpXAAHDITz6lV6mJGjElko=";
26 aarch64-darwin = x86_64-darwin;
28 ."${stdenvNoCC.hostPlatform.system}"
29 or (throw "appflowy: No source for system: ${stdenvNoCC.hostPlatform.system}");
31 stdenvNoCC.mkDerivation (finalAttrs: {
36 url = "https://github.com/AppFlowy-IO/appflowy/releases/download/${finalAttrs.version}/AppFlowy-${finalAttrs.version}-${dist.urlSuffix}";
44 ] ++ lib.optionals stdenvNoCC.hostPlatform.isLinux [ autoPatchelfHook ];
56 lib.optionalString stdenvNoCC.hostPlatform.isLinux ''
61 mkdir -p $out/{bin,opt}
63 # Copy archive contents to the outpout directory
67 install -Dm444 data/flutter_assets/assets/images/flowy_logo.svg $out/share/icons/hicolor/scalable/apps/appflowy.svg
71 + lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
74 mkdir -p $out/{Applications,bin}
75 cp -r ./AppFlowy.app $out/Applications/
81 lib.optionalString stdenvNoCC.hostPlatform.isLinux ''
82 # Add missing libraries to appflowy using the ones it comes with
83 makeWrapper $out/opt/AppFlowy $out/bin/appflowy \
84 --set LD_LIBRARY_PATH "$out/opt/lib/" \
85 --prefix PATH : "${lib.makeBinPath [ xdg-user-dirs ]}"
87 + lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
88 makeWrapper $out/Applications/AppFlowy.app/Contents/MacOS/AppFlowy $out/bin/appflowy
91 desktopItems = lib.optionals stdenvNoCC.hostPlatform.isLinux [
94 desktopName = "AppFlowy";
95 comment = finalAttrs.meta.description;
98 categories = [ "Office" ];
103 description = "An open-source alternative to Notion";
104 homepage = "https://www.appflowy.io/";
105 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
106 license = licenses.agpl3Only;
107 changelog = "https://github.com/AppFlowy-IO/appflowy/releases/tag/${finalAttrs.version}";
108 maintainers = with maintainers; [ darkonion0 ];
109 platforms = [ "x86_64-linux" ] ++ platforms.darwin;
110 mainProgram = "appflowy";