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

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

80 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchzip
, autoPatchelfHook
, makeWrapper
, copyDesktopItems
, makeDesktopItem
, gtk3
2023-02-17 21:04:30 +00:00
, openssl_1_1
, xdg-user-dirs
, keybinder3
2022-01-03 13:54:07 +00:00
}:
stdenv.mkDerivation rec {
pname = "appflowy";
2023-06-12 09:00:13 +00:00
version = "0.2.1";
2022-01-03 13:54:07 +00:00
src = fetchzip {
2023-02-17 21:04:30 +00:00
url = "https://github.com/AppFlowy-IO/appflowy/releases/download/${version}/AppFlowy_x86_64-unknown-linux-gnu_ubuntu-20.04.tar.gz";
2023-06-12 09:00:13 +00:00
sha256 = "sha256-8+zT/CVG40y63Q0hjrgpuYrhWPFp6W4DaR4d+X0FMlU=";
2023-02-17 21:04:30 +00:00
stripRoot = false;
2022-01-03 13:54:07 +00:00
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
copyDesktopItems
2022-01-03 13:54:07 +00:00
];
buildInputs = [
gtk3
2023-02-17 21:04:30 +00:00
openssl_1_1
keybinder3
2022-01-03 13:54:07 +00:00
];
dontBuild = true;
dontConfigure = true;
installPhase = ''
runHook preInstall
2023-05-11 17:19:10 +00:00
cd AppFlowy/
2023-02-17 21:04:30 +00:00
2022-01-03 13:54:07 +00:00
mkdir -p $out/opt/
mkdir -p $out/bin/
# Copy archive contents to the outpout directory
cp -r ./* $out/opt/
runHook postInstall
'';
preFixup = ''
2022-01-03 13:54:07 +00:00
# Add missing libraries to appflowy using the ones it comes with
2023-03-22 14:02:27 +00: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 13:54:07 +00:00
'';
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "AppFlowy";
comment = meta.description;
exec = "appflowy";
categories = [ "Office" ];
2022-01-03 13:54:07 +00:00
})
];
meta = with lib; {
description = "An open-source alternative to Notion";
homepage = "https://www.appflowy.io/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2022-01-03 13:54:07 +00:00
license = licenses.agpl3Only;
changelog = "https://github.com/AppFlowy-IO/appflowy/releases/tag/${version}";
maintainers = with maintainers; [ darkonion0 ];
platforms = [ "x86_64-linux" ];
};
}