(use-modules
 (guix download)
 (guix packages)
 ((guix licenses) #:prefix license:)
 (guix build-system gnu)
 (gnu packages)
 (gnu packages autotools)
 (gnu packages boost)
 (gnu packages pkg-config)
 (gnu packages python)
 (gnu packages libevent)
 (gnu packages linux)
 (gnu packages qt)
 (gnu packages dbm)
 (gnu packages upnp)
 (gnu packages tls))

(define-public litecoin-core-0.18
  (package
    (name "litecoin-core")
    (version "0.18.1")
    (source (origin
              (method url-fetch)
              (uri
               ;; TODO: this is not a stable tarball.  Use git-fetch instead.
	       (string-append "https://github.com/litecoin-project/litecoin/archive/refs/tags/v"
			      version ".tar.gz"))
              (sha256
               (base32
		"0bq42jwli4vi3h7yvwwvy5mgzhnkinvdxkccd6wr0n6w3ahwnrrd"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("autoconf" ,autoconf)
       ("automake" ,automake)
       ("libtool" ,libtool)
       ("pkg-config" ,pkg-config)
       ("python" ,python)             ; for the tests
       ("util-linux" ,util-linux)     ; provides the hexdump command for tests
       ("qttools" ,qttools)))
    (inputs
     `(("bdb" ,bdb-4.8)                 ; 4.8 required for compatibility
       ("boost" ,boost)
       ("libevent" ,libevent)
       ("miniupnpc" ,miniupnpc)
       ("openssl" ,openssl)
       ("qtbase" ,qtbase)))
    (arguments
     `(#:configure-flags
       (list
        ;; Boost is not found unless specified manually.
        (string-append "--with-boost="
                       (assoc-ref %build-inputs "boost"))
        ;; XXX: The configure script looks up Qt paths by
        ;; `pkg-config --variable=host_bins Qt5Core`, which fails to pick
        ;; up executables residing in 'qttools', so we specify them here.
        (string-append "ac_cv_path_LRELEASE="
                       (assoc-ref %build-inputs "qttools")
                       "/bin/lrelease")
        (string-append "ac_cv_path_LUPDATE="
                       (assoc-ref %build-inputs "qttools")
                       "/bin/lupdate"))
       #:phases
       (modify-phases %standard-phases
         (add-before 'configure 'make-qt-deterministic
           (lambda _
             ;; Make Qt deterministic.
             (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
             #t))
         (add-before 'build 'set-no-git-flag
           (lambda _
             ;; Make it clear we are not building from within a git repository
             ;; (and thus no information regarding this build is available
             ;; from git).
             (setenv "BITCOIN_GENBUILD_NO_GIT" "1")
             #t))
         (add-before 'check 'set-home
           (lambda _
             (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME
             #t))
         (add-after 'check 'check-functional
           (lambda _
             (invoke
              "python3" "./test/functional/test_runner.py"
              (string-append "--jobs=" (number->string (parallel-job-count))))
             #t)))))
    (home-page "https://litecoin.org/")
    (synopsis "Litecoin peer-to-peer client")
    (description
     "Litecoin is a peer-to-peer Internet currency that enables instant, 
	near-zero cost payments to anyone in the world. Litecoin is an open 
	source, global payment network that is fully decentralized without 
	any central authorities. Mathematics secures the network and empowers
	 individuals to control their own finances. Litecoin features faster 
	transaction confirmation times and improved storage efficiency 
	than the leading math-based currency. With substantial industry 
	support, trade volume and liquidity, Litecoin is a proven medium of
	 commerce complementary to Bitcoin.")
    (license license:expat)))

litecoin-core-0.18

Generated by Ricardo Wurmus using scpaste at Fri Apr 23 15:28:01 2021. CEST. (original)