Skip to content

Commit

Permalink
uchmviewer: init at 8.4 (NixOS#372943)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage authored Feb 2, 2025
2 parents a608eba + 5658935 commit 5df57fb
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions pkgs/by-name/uc/uchmviewer/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
chmlib,
libzip,
qt6,
cmake,
nix-update-script,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "uchmviewer";
version = "8.4";

src = fetchFromGitHub {
owner = "eBookProjects";
repo = "uChmViewer";
tag = "v${finalAttrs.version}";
hash = "sha256-p3KIIg2B+sSlwJr1rNMP7JByxYXyYFsj+UyUiDbJge8=";
};

nativeBuildInputs = [
cmake
qt6.wrapQtAppsHook
];

buildInputs = [
chmlib
libzip
qt6.qt5compat
qt6.qtwebengine
];

cmakeFlags = [
(lib.cmakeBool "USE_WEBENGINE" true)
];

postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{Applications,bin}
mv $out/uchmviewer.app $out/Applications
ln -s $out/Applications/uchmviewer.app/Contents/MacOS/uchmviewer $out/bin/uchmviewer
'';

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

meta = {
changelog = "https://github.com/eBookProjects/uChmViewer/releases/tag/v${finalAttrs.version}";
description = "CHM (Winhelp) files viewer (fork of KchmViewer)";
homepage = "https://github.com/eBookProjects/uChmViewer";
license = lib.licenses.gpl3Plus;
mainProgram = "uchmviewer";
maintainers = with lib.maintainers; [ azuwis ];
platforms = lib.platforms.unix;
};
})

0 comments on commit 5df57fb

Please sign in to comment.