Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qownnotes: 25.1.5 -> 25.1.6 #377623

Merged
merged 4 commits into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 34 additions & 25 deletions pkgs/by-name/qo/qownnotes/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@
nixosTests,
installShellFiles,
xvfb-run,
versionCheckHook,
nix-update-script,
}:

let
stdenv.mkDerivation (finalAttrs: {
pname = "qownnotes";
appname = "QOwnNotes";
version = "25.1.5";
in
stdenv.mkDerivation {
inherit pname version;
version = "25.1.6";

src = fetchurl {
url = "https://github.com/pbek/QOwnNotes/releases/download/v${version}/qownnotes-${version}.tar.xz";
hash = "sha256-Qr5pkKznosUGO7HvUkZhemWwtKpyYA79Vz1jU6YhODE=";
url = "https://github.com/pbek/QOwnNotes/releases/download/v${finalAttrs.version}/qownnotes-${finalAttrs.version}.tar.xz";
hash = "sha256-EmkOuxXH7XSpWrw3rtLPQ4XCX93RDbhnUR1edsNVJLk=";
};

nativeBuildInputs =
Expand Down Expand Up @@ -52,44 +51,54 @@ stdenv.mkDerivation {
# Install shell completion on Linux (with xvfb-run)
postInstall =
lib.optionalString stdenv.hostPlatform.isLinux ''
installShellCompletion --cmd ${appname} \
--bash <(xvfb-run $out/bin/${appname} --completion bash) \
--fish <(xvfb-run $out/bin/${appname} --completion fish)
installShellCompletion --cmd ${pname} \
--bash <(xvfb-run $out/bin/${appname} --completion bash) \
--fish <(xvfb-run $out/bin/${appname} --completion fish)
installShellCompletion --cmd ${finalAttrs.appname} \
--bash <(xvfb-run $out/bin/${finalAttrs.appname} --completion bash) \
--fish <(xvfb-run $out/bin/${finalAttrs.appname} --completion fish)
installShellCompletion --cmd ${finalAttrs.pname} \
--bash <(xvfb-run $out/bin/${finalAttrs.appname} --completion bash) \
--fish <(xvfb-run $out/bin/${finalAttrs.appname} --completion fish)
''
# Install shell completion on macOS
+ lib.optionalString stdenv.isDarwin ''
installShellCompletion --cmd ${pname} \
--bash <($out/bin/${appname} --completion bash) \
--fish <($out/bin/${appname} --completion fish)
installShellCompletion --cmd ${finalAttrs.pname} \
--bash <($out/bin/${finalAttrs.appname} --completion bash) \
--fish <($out/bin/${finalAttrs.appname} --completion fish)
''
# Create a lowercase symlink for Linux
+ lib.optionalString stdenv.hostPlatform.isLinux ''
ln -s $out/bin/${appname} $out/bin/${pname}
ln -s $out/bin/${finalAttrs.appname} $out/bin/${finalAttrs.pname}
''
# Rename application for macOS as lowercase binary
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# Prevent "same file" error
mv $out/bin/${appname} $out/bin/${pname}.bin
mv $out/bin/${pname}.bin $out/bin/${pname}
mv $out/bin/${finalAttrs.appname} $out/bin/${finalAttrs.pname}.bin
mv $out/bin/${finalAttrs.pname}.bin $out/bin/${finalAttrs.pname}
'';

# Tests QOwnNotes using the NixOS module by launching xterm:
passthru.tests.basic-nixos-module-functionality = nixosTests.qownnotes;

meta = with lib; {
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;

passthru = {
updateScript = nix-update-script { };
};

meta = {
description = "Plain-text file notepad and todo-list manager with markdown support and Nextcloud/ownCloud integration";
homepage = "https://www.qownnotes.org/";
changelog = "https://www.qownnotes.org/changelog.html";
downloadPage = "https://github.com/pbek/QOwnNotes/releases/tag/v${version}";
license = licenses.gpl2Only;
maintainers = with maintainers; [
downloadPage = "https://github.com/pbek/QOwnNotes/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [
pbek
totoroot
matthiasbeyer
];
platforms = platforms.unix;
platforms = lib.platforms.unix;
};
}
})