173 lines
6.0 KiB
Scheme
173 lines
6.0 KiB
Scheme
(define-module (ajatt packages dictionaries)
|
|
#:use-module (gnu packages cmake)
|
|
#:use-module (gnu packages compression)
|
|
#:use-module (gnu packages dictionaries)
|
|
#:use-module (gnu packages education)
|
|
#:use-module (gnu packages fontutils)
|
|
#:use-module (gnu packages fonts)
|
|
#:use-module (gnu packages gstreamer)
|
|
#:use-module (gnu packages hunspell)
|
|
#:use-module (gnu packages icu4c)
|
|
#:use-module (gnu packages image)
|
|
#:use-module (gnu packages perl)
|
|
#:use-module (gnu packages pkg-config)
|
|
#:use-module ((gnu packages qt) #:hide (qtspeech))
|
|
#:use-module (gnu packages search)
|
|
#:use-module (gnu packages textutils)
|
|
#:use-module (gnu packages version-control)
|
|
#:use-module (gnu packages video)
|
|
#:use-module (gnu packages vulkan)
|
|
#:use-module (gnu packages web)
|
|
#:use-module (gnu packages xdisorg)
|
|
#:use-module (gnu packages xiph)
|
|
#:use-module (gnu packages xorg)
|
|
#:use-module (guix build-system cmake)
|
|
#:use-module (guix build-system gnu)
|
|
#:use-module (guix gexp)
|
|
#:use-module (guix utils)
|
|
#:use-module (guix git-download)
|
|
#:use-module (guix packages)
|
|
#:use-module (ajatt packages qt)
|
|
#:use-module (ajatt packages suckless)
|
|
#:use-module ((guix licenses) #:prefix license:))
|
|
|
|
(define-public goldendict-ng
|
|
(package
|
|
(name "goldendict-ng")
|
|
(version "24.02.22")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri
|
|
(git-reference
|
|
(url "https://github.com/xiaoyifang/goldendict-ng.git")
|
|
(commit "327aff93904960d374f9d2e0a8cf0eefaa99ef33")))
|
|
(sha256
|
|
(base32 "1czz9gn5172f0hwaxn8grpks6023z3c63ibf4dgsj3lkjpdgk78a"))))
|
|
(build-system cmake-build-system)
|
|
(arguments
|
|
(list
|
|
#:make-flags #~(list "-j" "7")
|
|
#:cmake cmake
|
|
#:tests? #f
|
|
#:configure-flags
|
|
#~(list "-DCMAKE_BUILD_TYPE=Release")
|
|
#:phases
|
|
#~(modify-phases %standard-phases
|
|
(add-after 'unpack 'absolutize-qt-headers
|
|
(lambda _
|
|
(let ((qtbase-file
|
|
(lambda (path)
|
|
(string-append "\"" #$qtbase path "\""))))
|
|
(substitute* "src/ui/mainwindow.cc"
|
|
(("<QPrinter>")
|
|
(qtbase-file
|
|
"/include/qt6/QtPrintSupport/QPrinter"))
|
|
(("<QPageSetupDialog>")
|
|
(qtbase-file
|
|
"/include/qt6/QtPrintSupport/QPageSetupDialog"))
|
|
(("<QPrintPreviewDialog>")
|
|
(qtbase-file
|
|
"/include/qt6/QtPrintSupport/QPrintPreviewDialog"))
|
|
(("<QPrintDialog>")
|
|
(qtbase-file
|
|
"/include/qt6/QtPrintSupport/QPrintDialog"))))))
|
|
(add-after 'wrap 'wrap-qt-process-path
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
(wrap-program (search-input-file outputs "bin/goldendict")
|
|
`("QTWEBENGINE_RESOURCES_PATH" =
|
|
(,(search-input-directory
|
|
inputs "/share/qt6/resources")))
|
|
`("QTWEBENGINEPROCESS_PATH" =
|
|
(,(search-input-file
|
|
inputs "/lib/qt6/libexec/QtWebEngineProcess")))))))))
|
|
(native-inputs
|
|
(list hunspell
|
|
icu4c
|
|
libeb
|
|
libtiff
|
|
libvorbis
|
|
libxkbcommon
|
|
libxkbfile
|
|
libxtst
|
|
libzim
|
|
lzo
|
|
opencc
|
|
pkg-config
|
|
qt5compat
|
|
gstreamer
|
|
qtspeech
|
|
qtsvg
|
|
qttools
|
|
qtwebview
|
|
qtx11extras
|
|
vulkan-headers
|
|
(list xz "static")
|
|
zlib
|
|
(list zstd "lib")))
|
|
(inputs
|
|
(list ao
|
|
bzip2
|
|
ffmpeg
|
|
xapian
|
|
qtmultimedia
|
|
qtwebengine
|
|
gstreamer
|
|
qtbase
|
|
xproto))
|
|
(synopsis "A feature-rich dictionary lookup program")
|
|
(description
|
|
"GoldenDict is a feature-rich dictionary lookup program,
|
|
supporting multiple dictionary formats (StarDict, Babylon, Lingvo, Dictd, AARD,
|
|
MDict, SDict) and online dictionaries, featuring perfect article rendering with
|
|
the complete markup, illustrations and other content retained, and allowing you
|
|
to type in words without any accents or correct case.")
|
|
(home-page "https://xiaoyifang.github.io/goldendict-ng/")
|
|
(license
|
|
(list license:gpl3+
|
|
license:zlib))))
|
|
|
|
(define-public suckless-dictpopup
|
|
(package
|
|
(name "suckless-dictpopup")
|
|
(version "2.5_stable")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri
|
|
(git-reference
|
|
(url "https://github.com/KonstantinDjairo/suckless_dictpopup.git")
|
|
(commit "5309e184d0a68bad266ca0f4bef7c3d73ccc5eef")))
|
|
(sha256
|
|
(base32 "1pnx25s101ydldcvsrh79imkpirw5j5n9qzp9pzi37fz1g1xbb1k"))))
|
|
(build-system gnu-build-system)
|
|
(inputs
|
|
(list freetype
|
|
libxft
|
|
libx11
|
|
font-google-noto-sans-cjk
|
|
libxinerama
|
|
perl
|
|
sdcv
|
|
sselp))
|
|
(arguments
|
|
(list #:tests? #f
|
|
#:make-flags
|
|
#~(list (string-append "CC=" #$(cc-for-target))
|
|
(string-append "PREFIX=" #$output)
|
|
(string-append "CPPFLAGS=-I"
|
|
(assoc-ref %build-inputs "freetype")
|
|
"/include/freetype2"))
|
|
#:phases
|
|
#~(modify-phases %standard-phases
|
|
(replace 'configure
|
|
(lambda _ (copy-file "config.def.h" "config.h"))))))
|
|
(synopsis "A very lightweight popup dictionary written in C.")
|
|
(description "suckless_dictpopup is a very lightweight program to show popups
|
|
with the dictionary entries of the selected text. It uses Xlib for displaying
|
|
the popup and sdcv for the dictionary lookup.")
|
|
(home-page "https://github.com/KonstantinDjairo/suckless_dictpopup")
|
|
(license license:bsd-0)))
|
|
|
|
goldendict-ng
|