package libcpr rdricpp gd-tools and catch2

pull/2/head
hashirama 2024-04-13 21:56:23 -04:00
parent ff301354b6
commit cd1b3e1e3b
No known key found for this signature in database
GPG Key ID: 53E62470A86BC185
1 changed files with 245 additions and 69 deletions

View File

@ -29,59 +29,75 @@
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (ajatt packages qt) #:use-module (ajatt packages qt)
#:use-module (ajatt packages suckless) #:use-module (ajatt packages suckless)
#:use-module ((guix licenses) #:prefix license:)) #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages search)
#:use-module (gnu packages web)
#:use-module (gnu packages gcc)
#:use-module (gnu packages tls)
#:use-module (gnu packages cpp)
#:use-module (gnu packages glib)
#:use-module (gnu packages nss)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages certs)
#:use-module (gnu packages check)
#:use-module (guix build-system qt)
#:use-module (gnu packages curl)
#:use-module (guix utils)
#:use-module (guix search-paths)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix download))
(define-public goldendict-ng (define-public goldendict-ng
(package (package
(name "goldendict-ng") (name "goldendict-ng")
(version "24.02.22") (version "24.02.22")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
(uri (uri
(git-reference (git-reference
(url "https://github.com/xiaoyifang/goldendict-ng.git") (url "https://github.com/xiaoyifang/goldendict-ng.git")
(commit "cb37a91df8add30f991fdcfc53861fb4d9f361e7"))) (commit "cb37a91df8add30f991fdcfc53861fb4d9f361e7")))
(sha256 (sha256
(base32 "1czz9gn5172f0hwaxn8grpks6023z3c63ibf4dgsj3lkjpdgk78a")))) (base32 "1czz9gn5172f0hwaxn8grpks6023z3c63ibf4dgsj3lkjpdgk78a"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
(list (list
#:make-flags #~(list "-j" "7") #:make-flags #~(list "-j" "7")
#:cmake cmake #:cmake cmake
#:tests? #f #:tests? #f
#:configure-flags #:configure-flags
#~(list "-DCMAKE_BUILD_TYPE=Release") #~(list "-DCMAKE_BUILD_TYPE=Release")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'absolutize-qt-headers (add-after 'unpack 'absolutize-qt-headers
(lambda _ (lambda _
(let ((qtbase-file (let ((qtbase-file
(lambda (path) (lambda (path)
(string-append "\"" #$qtbase path "\"")))) (string-append "\"" #$qtbase path "\""))))
(substitute* "src/ui/mainwindow.cc" (substitute* "src/ui/mainwindow.cc"
(("<QPrinter>") (("<QPrinter>")
(qtbase-file (qtbase-file
"/include/qt6/QtPrintSupport/QPrinter")) "/include/qt6/QtPrintSupport/QPrinter"))
(("<QPageSetupDialog>") (("<QPageSetupDialog>")
(qtbase-file (qtbase-file
"/include/qt6/QtPrintSupport/QPageSetupDialog")) "/include/qt6/QtPrintSupport/QPageSetupDialog"))
(("<QPrintPreviewDialog>") (("<QPrintPreviewDialog>")
(qtbase-file (qtbase-file
"/include/qt6/QtPrintSupport/QPrintPreviewDialog")) "/include/qt6/QtPrintSupport/QPrintPreviewDialog"))
(("<QPrintDialog>") (("<QPrintDialog>")
(qtbase-file (qtbase-file
"/include/qt6/QtPrintSupport/QPrintDialog")))))) "/include/qt6/QtPrintSupport/QPrintDialog"))))))
(add-after 'wrap 'wrap-qt-process-path (add-after 'wrap 'wrap-qt-process-path
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (search-input-file outputs "bin/goldendict") (wrap-program (search-input-file outputs "bin/goldendict")
`("QTWEBENGINE_RESOURCES_PATH" = `("QTWEBENGINE_RESOURCES_PATH" =
(,(search-input-directory (,(search-input-directory
inputs "/share/qt6/resources"))) inputs "/share/qt6/resources")))
`("QTWEBENGINEPROCESS_PATH" = `("QTWEBENGINEPROCESS_PATH" =
(,(search-input-file (,(search-input-file
inputs "/lib/qt6/libexec/QtWebEngineProcess"))))))))) inputs "/lib/qt6/libexec/QtWebEngineProcess")))))))))
(native-inputs (native-inputs
(list hunspell (list hunspell
icu4c icu4c
@ -125,32 +141,32 @@ the complete markup, illustrations and other content retained, and allowing you
to type in words without any accents or correct case.") to type in words without any accents or correct case.")
(home-page "https://xiaoyifang.github.io/goldendict-ng/") (home-page "https://xiaoyifang.github.io/goldendict-ng/")
(license (license
(list license:gpl3+ (list license:gpl3+
license:zlib)))) license:zlib))))
(define-public suckless-dictpopup (define-public suckless-dictpopup
(package (package
(name "suckless-dictpopup") (name "suckless-dictpopup")
(version "2.5_stable") (version "2.5_stable")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
(uri (uri
(git-reference (git-reference
(url "https://github.com/KonstantinDjairo/suckless_dictpopup.git") (url "https://github.com/KonstantinDjairo/suckless_dictpopup.git")
(commit "5309e184d0a68bad266ca0f4bef7c3d73ccc5eef"))) (commit "5309e184d0a68bad266ca0f4bef7c3d73ccc5eef")))
(sha256 (sha256
(base32 "1pnx25s101ydldcvsrh79imkpirw5j5n9qzp9pzi37fz1g1xbb1k")))) (base32 "1pnx25s101ydldcvsrh79imkpirw5j5n9qzp9pzi37fz1g1xbb1k"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
(list freetype (list freetype
libxft libxft
libx11 libx11
font-google-noto-sans-cjk font-google-noto-sans-cjk
libxinerama libxinerama
perl perl
sdcv sdcv
sselp)) sselp))
(arguments (arguments
(list #:tests? #f (list #:tests? #f
#:make-flags #:make-flags
@ -161,8 +177,8 @@ to type in words without any accents or correct case.")
"/include/freetype2")) "/include/freetype2"))
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(replace 'configure (replace 'configure
(lambda _ (copy-file "config.def.h" "config.h")))))) (lambda _ (copy-file "config.def.h" "config.h"))))))
(synopsis "A very lightweight popup dictionary written in C.") (synopsis "A very lightweight popup dictionary written in C.")
(description "suckless_dictpopup is a very lightweight program to show popups (description "suckless_dictpopup is a very lightweight program to show popups
with the dictionary entries of the selected text. It uses Xlib for displaying with the dictionary entries of the selected text. It uses Xlib for displaying
@ -170,4 +186,164 @@ the popup and sdcv for the dictionary lookup.")
(home-page "https://github.com/KonstantinDjairo/suckless_dictpopup") (home-page "https://github.com/KonstantinDjairo/suckless_dictpopup")
(license license:bsd-0))) (license license:bsd-0)))
goldendict-ng
(define-public catch2-full
(package
(name "Catch2")
(version "3.5.2")
(source (origin
(method url-fetch)
(uri "https://github.com/catchorg/Catch2/archive/refs/tags/v3.5.2.tar.gz")
(sha256 (base32 "0vhc8zg69idw8lp7vr4hdkhsf9scqba33wizz6rl0vxpksj47596"))))
(build-system cmake-build-system)
(arguments ( list #:cmake cmake #:tests? #f))
(native-inputs
(list gcc-13 pkg-config))
(synopsis "Catch2 testing for C++")
(description
"Catch2 is mainly a unit testing framework for C++, but it also
provides basic micro-benchmarking features, and simple BDD macros.
Catch2's main advantage is that using it is both simple and natural.
Test names do not have to be valid identifiers, assertions look like
normal C++ boolean expressions, and sections provide a nice and local
way to share set-up and tear-down code in tests.")
(home-page "https://github.com/catchorg/Catch2")
(license
(list license:boost1.0))))
(define-public libcpr
(package
(name "cpr")
(version "1.5")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://codeberg.org/hashirama/libcpr.git")
(commit "528b3b235e9bf4c7e1b66e1b8d3a4451ba37d5e0")))
(sha256 (base32 "0040d3v4fjmjs253dc8cwqh5k484pvjybdq1rvwzmg0bwi0invjd"))))
(build-system cmake-build-system)
(arguments
( list #:cmake cmake #:tests? #f
))
(native-inputs
(list
openssl
gcc-13
curl
pkg-config
))
(inputs
(list
curl
openssl
))
(synopsis "C++ Requests: Curl for People ")
(description
"C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project.
Despite its name, libcurl's easy interface is anything but, and making mistakes,
misusing it is a common source of error and frustration. Using the more expressive
language facilities of C++17 'or C++11 in case you use cpr < 1.10.0', this library
captures the essence of making network calls into a few concise idioms.")
(home-page "https://github.com/libcpr/cpr")
(license
(list license:expat))))
(define-public rdricpp
(package
(name "rdricpp")
(version "1.5")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://codeberg.org/hashirama/rdricpp.git")
(commit "63aa0e11e7244cbc06cbecabbc1ac96faee9dabc")))
(sha256 (base32 "0iz8gw7y1ybmds5d9wkzd15gj78k1flxziqn9wm424mhfp80h8bj"))))
(build-system cmake-build-system)
(arguments
( list #:cmake cmake
#:tests? #f
#:configure-flags
#~(list "-DGUIX=1") ))
(native-inputs
(list gcc-13 pkg-config))
(inputs
(list catch2-full))
(synopsis "Rikaitan Deinflector Reference Implementation in C++.")
(description
"Rikaitan Deinflector Reference Implementation in C++.")
(home-page "https://codeberg.org/hashirama/rdricpp")
(license
(list license:gpl3+
license:zlib))))
(define-public gd-tools
(package
(name "gd-tools")
(version "1.5")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://codeberg.org/hashirama/gd-tools.git")
(commit "a44fc99f9a4ae716b89afefbc96b77abcbe89307")))
(sha256 (base32 "0jpg7v3alfd3ls352vnp9wjrk2sd2jl81l2lzrqvank78f8jpwnd"))))
(build-system cmake-build-system)
(arguments
( list #:cmake cmake
;;#:tests? #f
#:configure-flags
#~(list "-DGUIX=1")
)
)
(native-inputs
(list
openssl
rdricpp
zlib
glib
gcc-13
curl
pkg-config
))
(inputs
(list
nlohmann-json
curl
openssl
nss-certs
marisa
catch2-full
libcpr
))
(synopsis "A set of helpful programs to enhance goldendict for immersion learning.")
(description
"A set of helpful programs to enhance goldendict for immersion learning.")
(home-page "https://codeberg.org/hashirama/gd-tools/")
(license
(list license:gpl3+
license:zlib))))
gd-tools