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