nixpkgs/pkgs/applications/office/appflowy/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

85 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchzip
, autoPatchelfHook
, makeWrapper
, copyDesktopItems
, makeDesktopItem
, gtk3
, xdg-user-dirs
, keybinder3
2023-10-11 16:50:53 +02:00
, libnotify
2022-01-03 14:54:07 +01:00
}:
stdenv.mkDerivation rec {
pname = "appflowy";
2024-04-25 14:22:32 +02:00
version = "0.5.5";
2022-01-03 14:54:07 +01:00
src = fetchzip {
2024-01-06 15:32:18 +01:00
url = "https://github.com/AppFlowy-IO/appflowy/releases/download/${version}/AppFlowy-${version}-linux-x86_64.tar.gz";
2024-04-25 14:22:32 +02:00
hash = "sha256-sDA//ARuzU0q2V3jhFXGhaQaeF0jsDRbtdHCBTgIL8U=";
2023-02-17 22:04:30 +01:00
stripRoot = false;
2022-01-03 14:54:07 +01:00
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
copyDesktopItems
2022-01-03 14:54:07 +01:00
];
buildInputs = [
gtk3
keybinder3
2023-10-11 16:50:53 +02:00
libnotify
2022-01-03 14:54:07 +01:00
];
dontBuild = true;
dontConfigure = true;
installPhase = ''
runHook preInstall
2023-05-11 19:19:10 +02:00
cd AppFlowy/
2023-02-17 22:04:30 +01:00
2022-01-03 14:54:07 +01:00
mkdir -p $out/opt/
mkdir -p $out/bin/
# Copy archive contents to the outpout directory
cp -r ./* $out/opt/
2023-12-18 19:41:06 +01:00
# Copy icon
install -Dm444 data/flutter_assets/assets/images/flowy_logo.svg $out/share/icons/hicolor/scalable/apps/appflowy.svg
2022-01-03 14:54:07 +01:00
runHook postInstall
'';
preFixup = ''
2022-01-03 14:54:07 +01:00
# Add missing libraries to appflowy using the ones it comes with
2023-03-22 15:02:27 +01:00
makeWrapper $out/opt/AppFlowy $out/bin/appflowy \
--set LD_LIBRARY_PATH "$out/opt/lib/" \
--prefix PATH : "${lib.makeBinPath [ xdg-user-dirs ]}"
2022-01-03 14:54:07 +01:00
'';
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "AppFlowy";
comment = meta.description;
exec = "appflowy";
2023-12-18 19:41:06 +01:00
icon = "appflowy";
categories = [ "Office" ];
2022-01-03 14:54:07 +01:00
})
];
meta = with lib; {
description = "An open-source alternative to Notion";
homepage = "https://www.appflowy.io/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2022-01-03 14:54:07 +01:00
license = licenses.agpl3Only;
changelog = "https://github.com/AppFlowy-IO/appflowy/releases/tag/${version}";
maintainers = with maintainers; [ darkonion0 ];
platforms = [ "x86_64-linux" ];
2024-02-11 03:19:15 +01:00
mainProgram = "appflowy";
2022-01-03 14:54:07 +01:00
};
}