2022-01-13 20:06:32 +00:00
|
|
|
{ stdenv,
|
|
|
|
lib,
|
|
|
|
fetchzip,
|
|
|
|
autoPatchelfHook,
|
|
|
|
makeWrapper,
|
|
|
|
copyDesktopItems,
|
|
|
|
makeDesktopItem,
|
|
|
|
gtk3,
|
|
|
|
openssl,
|
|
|
|
xdg-user-dirs
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "appflowy";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.0.4";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/AppFlowy-IO/appflowy/releases/download/${version}/AppFlowy-linux-x86.tar.gz";
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-ke3cuRi+ZlBSWawg66cGrV928dOBp0EniNakitmgUso=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
makeWrapper
|
|
|
|
copyDesktopItems
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/opt/
|
|
|
|
mkdir -p $out/bin/
|
|
|
|
|
|
|
|
# Copy archive contents to the outpout directory
|
|
|
|
cp -r ./* $out/opt/
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = let
|
2022-03-05 16:20:37 +00:00
|
|
|
binPath = lib.makeBinPath [
|
2022-01-13 20:06:32 +00:00
|
|
|
xdg-user-dirs
|
|
|
|
];
|
|
|
|
in ''
|
|
|
|
# Add missing libraries to appflowy using the ones it comes with
|
|
|
|
makeWrapper $out/opt/app_flowy $out/bin/appflowy \
|
2022-03-05 16:20:37 +00:00
|
|
|
--set LD_LIBRARY_PATH "$out/opt/lib/" \
|
|
|
|
--prefix PATH : "${binPath}"
|
2022-01-13 20:06:32 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = pname;
|
|
|
|
desktopName = "AppFlowy";
|
|
|
|
comment = meta.description;
|
|
|
|
exec = "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" ];
|
|
|
|
};
|
|
|
|
}
|