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

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

67 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, qmake
, qttools
, qtbase
, qtdeclarative
, qtsvg
, qtwayland
, qtwebsockets
, qtx11extras
, qtxmlpatterns
, makeWrapper
, wrapQtAppsHook
}:
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-05-01 17:10:03 +03:00
version = "23.5.0";
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-05-01 17:10:03 +03:00
sha256 = "sha256-W1bu3isEe1j7XTj+deLNk6Ncssy2UKG+eF36fe1FFWs=";
2019-01-28 00:22:10 +03:00
};
2023-01-08 22:17:31 +03:00
nativeBuildInputs = [
qmake
qttools
wrapQtAppsHook
] ++ lib.optionals stdenv.isDarwin [ makeWrapper ];
2019-01-28 00:22:10 +03:00
buildInputs = [
qtbase
qtdeclarative
qtsvg
qtwebsockets
qtx11extras
qtxmlpatterns
] ++ lib.optionals stdenv.isLinux [ qtwayland ];
2019-01-28 00:22:10 +03:00
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";
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;
maintainers = with maintainers; [ pbek totoroot ];
2023-01-08 22:17:31 +03:00
platforms = platforms.unix;
2019-01-28 00:22:10 +03:00
};
}