23 appname = "QOwnNotes";
27 inherit pname version;
30 url = "https://github.com/pbek/QOwnNotes/releases/download/v${version}/qownnotes-${version}.tar.xz";
31 hash = "sha256-dthb+FkytNiiS2s7VdMgYxvNbGeBx5gONOYkHHphigY=";
41 ] ++ lib.optionals stdenv.isDarwin [ makeWrapper ];
50 ] ++ lib.optionals stdenv.isLinux [ qtwayland ];
57 installShellCompletion --cmd ${appname} \
58 --bash <(xvfb-run $out/bin/${appname} --completion bash) \
59 --fish <(xvfb-run $out/bin/${appname} --completion fish)
60 installShellCompletion --cmd ${pname} \
61 --bash <(xvfb-run $out/bin/${appname} --completion bash) \
62 --fish <(xvfb-run $out/bin/${appname} --completion fish)
64 # Create a lowercase symlink for Linux
65 + lib.optionalString stdenv.isLinux ''
66 ln -s $out/bin/${appname} $out/bin/${pname}
68 # Wrap application for macOS as lowercase binary
69 + lib.optionalString stdenv.isDarwin ''
70 mkdir -p $out/Applications
71 mv $out/bin/${appname}.app $out/Applications
72 makeWrapper $out/Applications/${appname}.app/Contents/MacOS/${appname} $out/bin/${pname}
75 # Tests QOwnNotes using the NixOS module by launching xterm:
76 passthru.tests.basic-nixos-module-functionality = nixosTests.qownnotes;
79 description = "Plain-text file notepad and todo-list manager with markdown support and Nextcloud/ownCloud integration";
80 homepage = "https://www.qownnotes.org/";
81 changelog = "https://www.qownnotes.org/changelog.html";
82 downloadPage = "https://github.com/pbek/QOwnNotes/releases/tag/v${version}";
83 license = licenses.gpl2Only;
84 maintainers = with maintainers; [ pbek totoroot ];
85 platforms = platforms.unix;