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