2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, qmake
|
|
|
|
, qttools
|
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
|
|
|
, qtsvg
|
|
|
|
, qtwayland
|
|
|
|
, qtwebsockets
|
|
|
|
, qtx11extras
|
|
|
|
, qtxmlpatterns
|
|
|
|
, makeWrapper
|
|
|
|
, wrapQtAppsHook
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
let
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "qownnotes";
|
2023-01-11 07:51:40 +00:00
|
|
|
appname = "QOwnNotes";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "23.4.6";
|
2023-01-11 07:51:40 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname appname version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.tuxfamily.org/${pname}/src/${pname}-${version}.tar.xz";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-lfQkY/B+mv+hUeAfmZkZ2BHq7MjR0MUVNPjk5QCGisE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
qmake
|
|
|
|
qttools
|
|
|
|
wrapQtAppsHook
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
|
|
|
qtsvg
|
|
|
|
qtwebsockets
|
|
|
|
qtx11extras
|
|
|
|
qtxmlpatterns
|
|
|
|
] ++ lib.optionals stdenv.isLinux [ qtwayland ];
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
# Create a lowercase symlink for Linux
|
|
|
|
lib.optionalString stdenv.isLinux ''
|
|
|
|
ln -s $out/bin/${appname} $out/bin/${pname}
|
|
|
|
''
|
|
|
|
# Wrap application for macOS as lowercase binary
|
|
|
|
+ lib.optionalString stdenv.isDarwin ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
mv $out/bin/${appname}.app $out/Applications
|
|
|
|
makeWrapper $out/Applications/${appname}.app/Contents/MacOS/${appname} $out/bin/${pname}
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
meta = with lib; {
|
2022-10-30 15:09:59 +00:00
|
|
|
description = "Plain-text file notepad and todo-list manager with markdown support and Nextcloud/ownCloud integration";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.qownnotes.org/";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://www.qownnotes.org/changelog.html";
|
|
|
|
downloadPage = "https://github.com/pbek/QOwnNotes/releases/tag/v${version}";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = licenses.gpl2Only;
|
2023-04-29 16:46:19 +00:00
|
|
|
maintainers = with maintainers; [ pbek totoroot ];
|
2023-01-11 07:51:40 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|