Skip to content

Commit

Permalink
qownnotes: 25.1.5 -> 25.1.6 (#377623)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasbeyer authored Jan 29, 2025
2 parents b965380 + 3b92f76 commit 3009c34
Showing 1 changed file with 34 additions and 25 deletions.
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;
};
}
})

0 comments on commit 3009c34

Please sign in to comment.