2023-01-08 22:18:26 +03:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, qmake
|
|
|
|
, qttools
|
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
|
|
|
, qtsvg
|
|
|
|
, qtwayland
|
|
|
|
, qtwebsockets
|
2023-04-20 20:14:20 +03:00
|
|
|
, qt5compat
|
2023-01-08 22:18:26 +03:00
|
|
|
, makeWrapper
|
|
|
|
, wrapQtAppsHook
|
2023-05-28 11:13:48 +03:00
|
|
|
, botan2
|
|
|
|
, pkg-config
|
2021-09-05 11:48:02 +03:00
|
|
|
}:
|
2019-01-28 00:22:10 +03:00
|
|
|
|
2023-01-08 22:17:31 +03:00
|
|
|
let
|
2019-01-28 00:22:10 +03:00
|
|
|
pname = "qownnotes";
|
2023-01-08 22:17:31 +03:00
|
|
|
appname = "QOwnNotes";
|
2023-06-09 16:27:50 +03:00
|
|
|
version = "23.6.4";
|
2023-01-08 22:17:31 +03:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname appname version;
|
2019-01-28 00:22:10 +03:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.tuxfamily.org/${pname}/src/${pname}-${version}.tar.xz";
|
2023-06-09 16:27:50 +03:00
|
|
|
hash = "sha256-4uH76/zLgNcuX6nI6YtTxGB9cYj3jHla/B3w9w6CUx4=";
|
2019-01-28 00:22:10 +03:00
|
|
|
};
|
|
|
|
|
2023-01-08 22:17:31 +03:00
|
|
|
nativeBuildInputs = [
|
|
|
|
qmake
|
|
|
|
qttools
|
|
|
|
wrapQtAppsHook
|
2023-05-28 11:13:48 +03:00
|
|
|
pkg-config
|
2023-01-08 22:17:31 +03:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ makeWrapper ];
|
2019-01-28 00:22:10 +03:00
|
|
|
|
2023-01-08 22:18:26 +03:00
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
|
|
|
qtsvg
|
|
|
|
qtwebsockets
|
2023-04-20 20:14:20 +03:00
|
|
|
qt5compat
|
2023-05-28 11:13:48 +03:00
|
|
|
botan2
|
2023-01-08 22:18:26 +03:00
|
|
|
] ++ lib.optionals stdenv.isLinux [ qtwayland ];
|
2019-01-28 00:22:10 +03:00
|
|
|
|
2023-05-28 11:13:48 +03:00
|
|
|
qmakeFlags = [
|
|
|
|
"USE_SYSTEM_BOTAN=1"
|
|
|
|
];
|
|
|
|
|
2023-01-08 22:17:31 +03:00
|
|
|
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}
|
|
|
|
'';
|
|
|
|
|
2021-05-11 19:09:19 +03:00
|
|
|
meta = with lib; {
|
2022-10-21 05:05:04 +03:00
|
|
|
description = "Plain-text file notepad and todo-list manager with markdown support and Nextcloud/ownCloud integration";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://www.qownnotes.org/";
|
2023-01-08 22:19:12 +03:00
|
|
|
changelog = "https://www.qownnotes.org/changelog.html";
|
|
|
|
downloadPage = "https://github.com/pbek/QOwnNotes/releases/tag/v${version}";
|
2021-03-20 00:50:59 +03:00
|
|
|
license = licenses.gpl2Only;
|
2023-04-20 20:15:49 +03:00
|
|
|
maintainers = with maintainers; [ pbek totoroot ];
|
2023-01-08 22:17:31 +03:00
|
|
|
platforms = platforms.unix;
|
2019-01-28 00:22:10 +03:00
|
|
|
};
|
|
|
|
}
|