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