@@ -50,6 +50,7 @@ (define-module (gnu packages c)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages bison)
#:use-module (gnu packages check)
+ #:use-module (gnu packages crypto)
#:use-module (gnu packages flex)
#:use-module (gnu packages gcc)
#:use-module (gnu packages perl)
@@ -1258,3 +1259,51 @@ (define-public utest-h
(description
"This package provides a header-only unit testing library for C/C++.")
(license license:unlicense))))
+
+(define-public jrnlc
+ (package
+ (name "jrnlc")
+ (version "2022.a")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/thexhr/jrnlc")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "10j4iyac41ndr9yic7vdkajf4kvvwzbd5jxpjypzybcygj9jq8h6"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test target
+ #:make-flags
+ #~(list (string-append "PREFIX=" #$output)
+ (string-append "CC=" #$(cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-install
+ (lambda _
+ (substitute* "Makefile"
+ (("-o root") ""))))
+ (add-after 'patch-install 'fix-cross-compile
+ (lambda _
+ (substitute* "Makefile"
+ (("pkg-config")
+ #$(pkg-config-for-target)))))
+ (delete 'configure) ;no configure script
+ (add-before 'install 'create-output-dirs
+ (lambda _
+ (mkdir-p #$output)
+ (with-directory-excursion #$output
+ (mkdir-p "bin")
+ (mkdir-p "man")))))))
+ (inputs (list json-c libsodium))
+ (native-inputs (list pkg-config))
+ (home-page "https://github.com/thexhr/jrnlc")
+ (synopsis "Command-line journal for note-taking")
+ (description
+ "This package provides a command-line utility for taking notes
+in a journal. You can take notes by entering them on the command
+line or writing them to standard input. It supports full encryption
+of the journal, so that your notes remain secret.")
+ (license license:isc)))