mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
e40327d3bb
946b86cf57
Revert "build: Fix gcc-cross-x86_64-w64-mingw32-10.3.0 in Guix" (fanquake)682962d9f6
guix: point to latest upstream commit (fanquake) Pull request description: Now that https://issues.guix.gnu.org/54212 has been merged upstream, we can bump our time-machine, and then no-longer need to maintain a workaround to use `std::filesystem` for Windows builds. Guix build on `x86_64`: ```bash 8edd06c2dbd4533c9f1b0e445cda1c2692b7d5e28e9d4c9262100dc1b4160448 guix-build-946b86cf5735/output/aarch64-linux-gnu/SHA256SUMS.part aca0eb632d73d08272a76837a9d15ab6df602cc95fd8d67d459881c823531816 guix-build-946b86cf5735/output/aarch64-linux-gnu/bitcoin-946b86cf5735-aarch64-linux-gnu-debug.tar.gz 5795e2893a81d2a260e7290a9204e63f78e7994cae54277a0ae952fd977108b3 guix-build-946b86cf5735/output/aarch64-linux-gnu/bitcoin-946b86cf5735-aarch64-linux-gnu.tar.gz 90dc12f37f9b66a553be3251374da04f022fd98a871a8d0b122f69ff4fdc5a3d guix-build-946b86cf5735/output/arm-linux-gnueabihf/SHA256SUMS.part d03dbb12963328afe050c212dac6c42f5f34ce6f36d5a22f6b262ed17acd00fa guix-build-946b86cf5735/output/arm-linux-gnueabihf/bitcoin-946b86cf5735-arm-linux-gnueabihf-debug.tar.gz d02cac8b56285bec488d3f4ac92174ee1a25a3f75d069a9e54a872905fcab311 guix-build-946b86cf5735/output/arm-linux-gnueabihf/bitcoin-946b86cf5735-arm-linux-gnueabihf.tar.gz 14122032ce024eec843552d6fb6eefad4eb849a0bfac1f7679f0723e7aa69d7d guix-build-946b86cf5735/output/arm64-apple-darwin/SHA256SUMS.part a2392b37cde87f1a9db599197e7516f31024b88e86699a6bdc9bc0e95edcd450 guix-build-946b86cf5735/output/arm64-apple-darwin/bitcoin-946b86cf5735-arm64-apple-darwin-unsigned.dmg 8b3596ff5dda6f978f7d19ed33b29357226f17449db65058676b911d110b2fb8 guix-build-946b86cf5735/output/arm64-apple-darwin/bitcoin-946b86cf5735-arm64-apple-darwin-unsigned.tar.gz 94baa2dae8c7b920fdd3e78097084c4550cb9441769b851924671265b032724b guix-build-946b86cf5735/output/arm64-apple-darwin/bitcoin-946b86cf5735-arm64-apple-darwin.tar.gz ee13d5669928c2d09e1091871c3e1a4e4fe7e2aa76ef0cfb472cac26fe304372 guix-build-946b86cf5735/output/dist-archive/bitcoin-946b86cf5735.tar.gz b757ff56eb2b4b6c07ea1b784a5d72e2d6dce53a6b15068e6b10beb101068d9b guix-build-946b86cf5735/output/powerpc64-linux-gnu/SHA256SUMS.part b6f29f9a3d1e78e37a56da3a98fd74037a622070f8d5f3e677db3714f2f0ab90 guix-build-946b86cf5735/output/powerpc64-linux-gnu/bitcoin-946b86cf5735-powerpc64-linux-gnu-debug.tar.gz fa575269b25154ad9d258bfe4c89d9c083d199084229a9c2c44235d22e0499de guix-build-946b86cf5735/output/powerpc64-linux-gnu/bitcoin-946b86cf5735-powerpc64-linux-gnu.tar.gz ee73c68dfa2923da17553aee26e9c26c1e9b5ecfae0f032e6cac56f951ea7353 guix-build-946b86cf5735/output/powerpc64le-linux-gnu/SHA256SUMS.part 9eb4d47506765b7d2e93cdf1ef5e53a2f53e22a318cbd7d5d7a9f97de292e2e7 guix-build-946b86cf5735/output/powerpc64le-linux-gnu/bitcoin-946b86cf5735-powerpc64le-linux-gnu-debug.tar.gz 5541f70c5d5e935d5c71e2aef3995e0df76202782d296b81c692c05250d3ba6c guix-build-946b86cf5735/output/powerpc64le-linux-gnu/bitcoin-946b86cf5735-powerpc64le-linux-gnu.tar.gz 46dbe4710fbb962a8a8c8a2d60e3fd7a53fc0ea47096f776de9b2d865b6dcd99 guix-build-946b86cf5735/output/riscv64-linux-gnu/SHA256SUMS.part 3dbcb703d699e400a6d23082e545e52ac6d3100d54bf0f544216940c0f336e24 guix-build-946b86cf5735/output/riscv64-linux-gnu/bitcoin-946b86cf5735-riscv64-linux-gnu-debug.tar.gz b2dc20a418192478e9b892dcaec982bf23899a5742bb33791ed9e621d4b2bd87 guix-build-946b86cf5735/output/riscv64-linux-gnu/bitcoin-946b86cf5735-riscv64-linux-gnu.tar.gz a25c379f2c81be647491b10fa50486c780bf0096f437e4db351d32ccf235ad7d guix-build-946b86cf5735/output/x86_64-apple-darwin/SHA256SUMS.part c017523424767593daaf4037598683ffa360c4142df4986b9548e42b125587a5 guix-build-946b86cf5735/output/x86_64-apple-darwin/bitcoin-946b86cf5735-x86_64-apple-darwin-unsigned.dmg a6e1e5bb358ec7f8f4f5289225ea07f6d3bef417da90756c7eb748a2e9a9276d guix-build-946b86cf5735/output/x86_64-apple-darwin/bitcoin-946b86cf5735-x86_64-apple-darwin-unsigned.tar.gz 95283762bafa08106c841cb43a19b18a541fdae7cb759f13a2e9bf81ac24b176 guix-build-946b86cf5735/output/x86_64-apple-darwin/bitcoin-946b86cf5735-x86_64-apple-darwin.tar.gz 56876f95dc4ce82b35f1206ef4093962431887f5a0eac28abfbfdacab68b55f7 guix-build-946b86cf5735/output/x86_64-linux-gnu/SHA256SUMS.part 8305d7b92b30fd8a14ea44459d673c077ec8971aeaa79cb6331c4f9fccd51f0f guix-build-946b86cf5735/output/x86_64-linux-gnu/bitcoin-946b86cf5735-x86_64-linux-gnu-debug.tar.gz a6f1e12fd15e0eb6ef8e1182ecf564b587a0d2b77f799570bdcbad747617d202 guix-build-946b86cf5735/output/x86_64-linux-gnu/bitcoin-946b86cf5735-x86_64-linux-gnu.tar.gz 79cd3e1b9a6cbb06bb19f24cb03d02a5e87f1c96c42648d0397bf6edca912114 guix-build-946b86cf5735/output/x86_64-w64-mingw32/SHA256SUMS.part c119dd7bebfd76d9692c37efa150862feb98256a1ec6e2fcedf85dbaf185a47d guix-build-946b86cf5735/output/x86_64-w64-mingw32/bitcoin-946b86cf5735-win64-debug.zip a48af7b53c9c863ced4d7b9864f91f4f4a54cc63275858427fb7636f90f464fe guix-build-946b86cf5735/output/x86_64-w64-mingw32/bitcoin-946b86cf5735-win64-setup-unsigned.exe 2ebd813a39299a687f4cfd0e60b76808f9e8fee5a60a16e84148d3f0b3da6128 guix-build-946b86cf5735/output/x86_64-w64-mingw32/bitcoin-946b86cf5735-win64-unsigned.tar.gz c628444e07c18ff13db76cb5a51386d77be8135ca7fe80a4d1b97b07e4f34baf guix-build-946b86cf5735/output/x86_64-w64-mingw32/bitcoin-946b86cf5735-win64.zip ``` Guix build on `aarch64`: ```bash 83f7387975d043e29a994d4d8e9bbdd65c8ba2002a1ca97fe76a61ad2333d37e guix-build-946b86cf5735/output/arm-linux-gnueabihf/SHA256SUMS.part 8791579ecc7c0799bd53be7c0bdab18eb4bae2fb06ed41d0aa77e28ee0dde487 guix-build-946b86cf5735/output/arm-linux-gnueabihf/bitcoin-946b86cf5735-arm-linux-gnueabihf-debug.tar.gz 28d6a41d7ccb88197ef75e1e83d202a0a11caefde3a6f86ed9186d9e19c2c682 guix-build-946b86cf5735/output/arm-linux-gnueabihf/bitcoin-946b86cf5735-arm-linux-gnueabihf.tar.gz 0c34bfb74a3ff7b2f69967e00ac02af145b7af3f539e7b5f817e8453b49efdb8 guix-build-946b86cf5735/output/arm64-apple-darwin/SHA256SUMS.part 57357182b3630fa7b02cefab2b662944d2f226d8c739f934fd15e669b11de01a guix-build-946b86cf5735/output/arm64-apple-darwin/bitcoin-946b86cf5735-arm64-apple-darwin-unsigned.dmg f5d761f3b5d98c830ec7247ad2ec42e9d6fbe723539b0c47f4a91c2e8a7214c7 guix-build-946b86cf5735/output/arm64-apple-darwin/bitcoin-946b86cf5735-arm64-apple-darwin-unsigned.tar.gz fb2ab7cfc7a9f01b1507ec08775ac8f7267cfbeb28d13f4b62f15cbd81ef15fe guix-build-946b86cf5735/output/arm64-apple-darwin/bitcoin-946b86cf5735-arm64-apple-darwin.tar.gz ee13d5669928c2d09e1091871c3e1a4e4fe7e2aa76ef0cfb472cac26fe304372 guix-build-946b86cf5735/output/dist-archive/bitcoin-946b86cf5735.tar.gz a269e7ef2bac18e7bbdf8488023fa1dd202d5b7cd18f4127b122b9fa82cd9317 guix-build-946b86cf5735/output/powerpc64-linux-gnu/SHA256SUMS.part 9b5ad80352b9d211dd8e3b2d7ac5b304a83aaaa43e54a96f4ec6e130d37415e5 guix-build-946b86cf5735/output/powerpc64-linux-gnu/bitcoin-946b86cf5735-powerpc64-linux-gnu-debug.tar.gz 4b7c09ebe7b729957f345629acb8ce0c3966ed17d8a4cc3da6401100dd29c05b guix-build-946b86cf5735/output/powerpc64-linux-gnu/bitcoin-946b86cf5735-powerpc64-linux-gnu.tar.gz abc357d83966bf3f2dba201786b315cf673da197c1e3e2ee56e99e5e44df32a6 guix-build-946b86cf5735/output/powerpc64le-linux-gnu/SHA256SUMS.part d057eb88fb33363345026e2fe39881dff65c06cd1266427ef018befa4f21d5a7 guix-build-946b86cf5735/output/powerpc64le-linux-gnu/bitcoin-946b86cf5735-powerpc64le-linux-gnu-debug.tar.gz 9067057d983ed79acaf252fc7ca8cbe89dbad92280a95f079a417a20a7fe1f83 guix-build-946b86cf5735/output/powerpc64le-linux-gnu/bitcoin-946b86cf5735-powerpc64le-linux-gnu.tar.gz cd05ef28fbaad0512edc012a124f32079b8fe831d7c7882f0f8a754756712bc3 guix-build-946b86cf5735/output/riscv64-linux-gnu/SHA256SUMS.part 2dcdb32faa687ed14956338c4876ea2a4a113c52cdf835eb4e66cbcd98e6ebdc guix-build-946b86cf5735/output/riscv64-linux-gnu/bitcoin-946b86cf5735-riscv64-linux-gnu-debug.tar.gz 940c6404d506c353256018eea9b77560f618c75e1becae1ac262149b2f30d01a guix-build-946b86cf5735/output/riscv64-linux-gnu/bitcoin-946b86cf5735-riscv64-linux-gnu.tar.gz a980ef922b3af77ee7d9118b7db1d0893bdc1dbdf7c39d076f5dc4e368296447 guix-build-946b86cf5735/output/x86_64-apple-darwin/SHA256SUMS.part c017523424767593daaf4037598683ffa360c4142df4986b9548e42b125587a5 guix-build-946b86cf5735/output/x86_64-apple-darwin/bitcoin-946b86cf5735-x86_64-apple-darwin-unsigned.dmg 090479eecdd7169184f29009eb498dd498d504a4d642ae034ec82210cd08dca2 guix-build-946b86cf5735/output/x86_64-apple-darwin/bitcoin-946b86cf5735-x86_64-apple-darwin-unsigned.tar.gz 95283762bafa08106c841cb43a19b18a541fdae7cb759f13a2e9bf81ac24b176 guix-build-946b86cf5735/output/x86_64-apple-darwin/bitcoin-946b86cf5735-x86_64-apple-darwin.tar.gz a94a4ed02ff71ca6a5594cb3aed7f600cfacf40fa14ceb3dd8af6a251502bea4 guix-build-946b86cf5735/output/x86_64-linux-gnu/SHA256SUMS.part 04b1e08c5482b5fd37b360e2950775626838a7c2429bcceec3d082615b52c300 guix-build-946b86cf5735/output/x86_64-linux-gnu/bitcoin-946b86cf5735-x86_64-linux-gnu-debug.tar.gz 0e0d8260f3898a59e23878fc17f47e20af0b2e35f628196df3977ca53418ad19 guix-build-946b86cf5735/output/x86_64-linux-gnu/bitcoin-946b86cf5735-x86_64-linux-gnu.tar.gz 942aced6e2a6df3c0f31d2040db2a61b51b4014fc6530410eb5ece5a6b05f11d guix-build-946b86cf5735/output/x86_64-w64-mingw32/SHA256SUMS.part a8119d7db4dcde912dfff27d2690da0935e08a2996f0282715afd9ea7cde11f8 guix-build-946b86cf5735/output/x86_64-w64-mingw32/bitcoin-946b86cf5735-win64-debug.zip a48af7b53c9c863ced4d7b9864f91f4f4a54cc63275858427fb7636f90f464fe guix-build-946b86cf5735/output/x86_64-w64-mingw32/bitcoin-946b86cf5735-win64-setup-unsigned.exe 2ebd813a39299a687f4cfd0e60b76808f9e8fee5a60a16e84148d3f0b3da6128 guix-build-946b86cf5735/output/x86_64-w64-mingw32/bitcoin-946b86cf5735-win64-unsigned.tar.gz 7aa5627bb706654734525b7ef76736fe24b8f314e5a20f850ea6a0dca1559d1f guix-build-946b86cf5735/output/x86_64-w64-mingw32/bitcoin-946b86cf5735-win64.zip ``` ACKs for top commit: hebasto: ACK946b86cf57
, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: c0545440a61395eb2957c98da8d7987169e3b6a866279d56950e7ff19b7700a817937e0f66fea17aeb98e9092b7662bbd8a69446ae89b348e7b786e39951dba9
612 lines
24 KiB
Scheme
612 lines
24 KiB
Scheme
(use-modules (gnu)
|
|
(gnu packages)
|
|
(gnu packages autotools)
|
|
(gnu packages base)
|
|
(gnu packages bash)
|
|
(gnu packages bison)
|
|
(gnu packages certs)
|
|
(gnu packages cdrom)
|
|
(gnu packages check)
|
|
(gnu packages cmake)
|
|
(gnu packages commencement)
|
|
(gnu packages compression)
|
|
(gnu packages cross-base)
|
|
(gnu packages curl)
|
|
(gnu packages file)
|
|
(gnu packages gawk)
|
|
(gnu packages gcc)
|
|
(gnu packages gnome)
|
|
(gnu packages installers)
|
|
(gnu packages linux)
|
|
(gnu packages llvm)
|
|
(gnu packages mingw)
|
|
(gnu packages moreutils)
|
|
(gnu packages perl)
|
|
(gnu packages pkg-config)
|
|
(gnu packages python)
|
|
(gnu packages python-crypto)
|
|
(gnu packages python-web)
|
|
(gnu packages shells)
|
|
(gnu packages tls)
|
|
(gnu packages version-control)
|
|
(guix build-system gnu)
|
|
(guix build-system python)
|
|
(guix build-system trivial)
|
|
(guix download)
|
|
(guix gexp)
|
|
(guix git-download)
|
|
((guix licenses) #:prefix license:)
|
|
(guix packages)
|
|
(guix profiles)
|
|
(guix utils))
|
|
|
|
(define-syntax-rule (search-our-patches file-name ...)
|
|
"Return the list of absolute file names corresponding to each
|
|
FILE-NAME found in ./patches relative to the current file."
|
|
(parameterize
|
|
((%patch-path (list (string-append (dirname (current-filename)) "/patches"))))
|
|
(list (search-patch file-name) ...)))
|
|
|
|
(define (make-ssp-fixed-gcc xgcc)
|
|
"Given a XGCC package, return a modified package that uses the SSP function
|
|
from glibc instead of from libssp.so. Our `symbol-check' script will complain if
|
|
we link against libssp.so, and thus will ensure that this works properly.
|
|
|
|
Taken from:
|
|
http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
|
|
(package
|
|
(inherit xgcc)
|
|
(arguments
|
|
(substitute-keyword-arguments (package-arguments xgcc)
|
|
((#:make-flags flags)
|
|
`(cons "gcc_cv_libc_provides_ssp=yes" ,flags))))))
|
|
|
|
(define (make-gcc-rpath-link xgcc)
|
|
"Given a XGCC package, return a modified package that replace each instance of
|
|
-rpath in the default system spec that's inserted by Guix with -rpath-link"
|
|
(package
|
|
(inherit xgcc)
|
|
(arguments
|
|
(substitute-keyword-arguments (package-arguments xgcc)
|
|
((#:phases phases)
|
|
`(modify-phases ,phases
|
|
(add-after 'pre-configure 'replace-rpath-with-rpath-link
|
|
(lambda _
|
|
(substitute* (cons "gcc/config/rs6000/sysv4.h"
|
|
(find-files "gcc/config"
|
|
"^gnu-user.*\\.h$"))
|
|
(("-rpath=") "-rpath-link="))
|
|
#t))))))))
|
|
|
|
(define (make-cross-toolchain target
|
|
base-gcc-for-libc
|
|
base-kernel-headers
|
|
base-libc
|
|
base-gcc)
|
|
"Create a cross-compilation toolchain package for TARGET"
|
|
(let* ((xbinutils (cross-binutils target))
|
|
;; 1. Build a cross-compiling gcc without targeting any libc, derived
|
|
;; from BASE-GCC-FOR-LIBC
|
|
(xgcc-sans-libc (cross-gcc target
|
|
#:xgcc base-gcc-for-libc
|
|
#:xbinutils xbinutils))
|
|
;; 2. Build cross-compiled kernel headers with XGCC-SANS-LIBC, derived
|
|
;; from BASE-KERNEL-HEADERS
|
|
(xkernel (cross-kernel-headers target
|
|
base-kernel-headers
|
|
xgcc-sans-libc
|
|
xbinutils))
|
|
;; 3. Build a cross-compiled libc with XGCC-SANS-LIBC and XKERNEL,
|
|
;; derived from BASE-LIBC
|
|
(xlibc (cross-libc target
|
|
base-libc
|
|
xgcc-sans-libc
|
|
xbinutils
|
|
xkernel))
|
|
;; 4. Build a cross-compiling gcc targeting XLIBC, derived from
|
|
;; BASE-GCC
|
|
(xgcc (cross-gcc target
|
|
#:xgcc base-gcc
|
|
#:xbinutils xbinutils
|
|
#:libc xlibc)))
|
|
;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
|
|
;; XGCC
|
|
(package
|
|
(name (string-append target "-toolchain"))
|
|
(version (package-version xgcc))
|
|
(source #f)
|
|
(build-system trivial-build-system)
|
|
(arguments '(#:builder (begin (mkdir %output) #t)))
|
|
(propagated-inputs
|
|
`(("binutils" ,xbinutils)
|
|
("libc" ,xlibc)
|
|
("libc:static" ,xlibc "static")
|
|
("gcc" ,xgcc)
|
|
("gcc-lib" ,xgcc "lib")))
|
|
(synopsis (string-append "Complete GCC tool chain for " target))
|
|
(description (string-append "This package provides a complete GCC tool
|
|
chain for " target " development."))
|
|
(home-page (package-home-page xgcc))
|
|
(license (package-license xgcc)))))
|
|
|
|
(define base-gcc gcc-10)
|
|
|
|
;; Building glibc with stack smashing protector first landed in glibc 2.25, use
|
|
;; this function to disable for older glibcs
|
|
;;
|
|
;; From glibc 2.25 changelog:
|
|
;;
|
|
;; * Most of glibc can now be built with the stack smashing protector enabled.
|
|
;; It is recommended to build glibc with --enable-stack-protector=strong.
|
|
;; Implemented by Nick Alcock (Oracle).
|
|
(define (make-glibc-without-ssp xglibc)
|
|
(package-with-extra-configure-variable
|
|
(package-with-extra-configure-variable
|
|
xglibc "libc_cv_ssp" "no")
|
|
"libc_cv_ssp_strong" "no"))
|
|
|
|
(define* (make-bitcoin-cross-toolchain target
|
|
#:key
|
|
(base-gcc-for-libc gcc-7)
|
|
(base-kernel-headers linux-libre-headers-4.9)
|
|
(base-libc (make-glibc-without-ssp glibc-2.24))
|
|
(base-gcc (make-gcc-rpath-link base-gcc)))
|
|
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
|
|
desirable for building Bitcoin Core release binaries."
|
|
(make-cross-toolchain target
|
|
base-gcc-for-libc
|
|
base-kernel-headers
|
|
base-libc
|
|
base-gcc))
|
|
|
|
(define (make-gcc-with-pthreads gcc)
|
|
(package-with-extra-configure-variable gcc "--enable-threads" "posix"))
|
|
|
|
(define (make-mingw-pthreads-cross-toolchain target)
|
|
"Create a cross-compilation toolchain package for TARGET"
|
|
(let* ((xbinutils (cross-binutils target))
|
|
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
|
|
(pthreads-xgcc (make-gcc-with-pthreads
|
|
(cross-gcc target
|
|
#:xgcc (make-ssp-fixed-gcc base-gcc)
|
|
#:xbinutils xbinutils
|
|
#:libc pthreads-xlibc))))
|
|
;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
|
|
;; XGCC
|
|
(package
|
|
(name (string-append target "-posix-toolchain"))
|
|
(version (package-version pthreads-xgcc))
|
|
(source #f)
|
|
(build-system trivial-build-system)
|
|
(arguments '(#:builder (begin (mkdir %output) #t)))
|
|
(propagated-inputs
|
|
`(("binutils" ,xbinutils)
|
|
("libc" ,pthreads-xlibc)
|
|
("gcc" ,pthreads-xgcc)
|
|
("gcc-lib" ,pthreads-xgcc "lib")))
|
|
(synopsis (string-append "Complete GCC tool chain for " target))
|
|
(description (string-append "This package provides a complete GCC tool
|
|
chain for " target " development."))
|
|
(home-page (package-home-page pthreads-xgcc))
|
|
(license (package-license pthreads-xgcc)))))
|
|
|
|
(define (make-nsis-for-gcc-10 base-nsis)
|
|
(package-with-extra-patches base-nsis
|
|
(search-our-patches "nsis-gcc-10-memmove.patch")))
|
|
|
|
(define-public lief
|
|
(package
|
|
(name "python-lief")
|
|
(version "0.11.5")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/lief-project/LIEF.git")
|
|
(commit version)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"0qahjfg1n0x76ps2mbyljvws1l3qhkqvmxqbahps4qgywl2hbdkj"))))
|
|
(build-system python-build-system)
|
|
(native-inputs
|
|
`(("cmake" ,cmake)))
|
|
(home-page "https://github.com/lief-project/LIEF")
|
|
(synopsis "Library to Instrument Executable Formats")
|
|
(description "Python library to to provide a cross platform library which can
|
|
parse, modify and abstract ELF, PE and MachO formats.")
|
|
(license license:asl2.0)))
|
|
|
|
(define osslsigncode
|
|
(package
|
|
(name "osslsigncode")
|
|
(version "2.0")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://github.com/mtrojnar/"
|
|
name "/archive/" version ".tar.gz"))
|
|
(sha256
|
|
(base32
|
|
"0byri6xny770wwb2nciq44j5071122l14bvv65axdd70nfjf0q2s"))))
|
|
(build-system gnu-build-system)
|
|
(native-inputs
|
|
`(("pkg-config" ,pkg-config)
|
|
("autoconf" ,autoconf)
|
|
("automake" ,automake)
|
|
("libtool" ,libtool)))
|
|
(inputs
|
|
`(("openssl" ,openssl)))
|
|
(arguments
|
|
`(#:configure-flags
|
|
`("--without-gsf"
|
|
"--without-curl"
|
|
"--disable-dependency-tracking")))
|
|
(home-page "https://github.com/mtrojnar/osslsigncode")
|
|
(synopsis "Authenticode signing and timestamping tool")
|
|
(description "osslsigncode is a small tool that implements part of the
|
|
functionality of the Microsoft tool signtool.exe - more exactly the Authenticode
|
|
signing and timestamping. But osslsigncode is based on OpenSSL and cURL, and
|
|
thus should be able to compile on most platforms where these exist.")
|
|
(license license:gpl3+))) ; license is with openssl exception
|
|
|
|
(define-public python-elfesteem
|
|
(let ((commit "87bbd79ab7e361004c98cc8601d4e5f029fd8bd5"))
|
|
(package
|
|
(name "python-elfesteem")
|
|
(version (git-version "0.1" "1" commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/LRGH/elfesteem")
|
|
(commit commit)))
|
|
(file-name (git-file-name name commit))
|
|
(sha256
|
|
(base32
|
|
"1nyvjisvyxyxnd0023xjf5846xd03lwawp5pfzr8vrky7wwm5maz"))
|
|
(patches (search-our-patches "elfsteem-value-error-python-39.patch"))))
|
|
(build-system python-build-system)
|
|
;; There are no tests, but attempting to run python setup.py test leads to
|
|
;; PYTHONPATH problems, just disable the test
|
|
(arguments '(#:tests? #f))
|
|
(home-page "https://github.com/LRGH/elfesteem")
|
|
(synopsis "ELF/PE/Mach-O parsing library")
|
|
(description "elfesteem parses ELF, PE and Mach-O files.")
|
|
(license license:lgpl2.1))))
|
|
|
|
(define-public python-oscrypto
|
|
(package
|
|
(name "python-oscrypto")
|
|
(version "1.2.1")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/wbond/oscrypto")
|
|
(commit version)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"1d4d8s4z340qhvb3g5m5v3436y3a71yc26wk4749q64m09kxqc3l"))
|
|
(patches (search-our-patches "oscrypto-hard-code-openssl.patch"))))
|
|
(build-system python-build-system)
|
|
(native-search-paths
|
|
(list (search-path-specification
|
|
(variable "SSL_CERT_FILE")
|
|
(file-type 'regular)
|
|
(separator #f) ;single entry
|
|
(files '("etc/ssl/certs/ca-certificates.crt")))))
|
|
|
|
(propagated-inputs
|
|
`(("python-asn1crypto" ,python-asn1crypto)
|
|
("openssl" ,openssl)))
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
(add-after 'unpack 'hard-code-path-to-libscrypt
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
(let ((openssl (assoc-ref inputs "openssl")))
|
|
(substitute* "oscrypto/__init__.py"
|
|
(("@GUIX_OSCRYPTO_USE_OPENSSL@")
|
|
(string-append openssl "/lib/libcrypto.so" "," openssl "/lib/libssl.so")))
|
|
#t)))
|
|
(add-after 'unpack 'disable-broken-tests
|
|
(lambda _
|
|
;; This test is broken as there is no keyboard interrupt.
|
|
(substitute* "tests/test_trust_list.py"
|
|
(("^(.*)class TrustListTests" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line)))
|
|
(substitute* "tests/test_tls.py"
|
|
(("^(.*)class TLSTests" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line)))
|
|
#t))
|
|
(replace 'check
|
|
(lambda _
|
|
(invoke "python" "run.py" "tests")
|
|
#t)))))
|
|
(home-page "https://github.com/wbond/oscrypto")
|
|
(synopsis "Compiler-free Python crypto library backed by the OS")
|
|
(description "oscrypto is a compilation-free, always up-to-date encryption library for Python.")
|
|
(license license:expat)))
|
|
|
|
(define-public python-oscryptotests
|
|
(package (inherit python-oscrypto)
|
|
(name "python-oscryptotests")
|
|
(propagated-inputs
|
|
`(("python-oscrypto" ,python-oscrypto)))
|
|
(arguments
|
|
`(#:tests? #f
|
|
#:phases
|
|
(modify-phases %standard-phases
|
|
(add-after 'unpack 'hard-code-path-to-libscrypt
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
(chdir "tests")
|
|
#t)))))))
|
|
|
|
(define-public python-certvalidator
|
|
(let ((commit "a145bf25eb75a9f014b3e7678826132efbba6213"))
|
|
(package
|
|
(name "python-certvalidator")
|
|
(version (git-version "0.1" "1" commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/achow101/certvalidator")
|
|
(commit commit)))
|
|
(file-name (git-file-name name commit))
|
|
(sha256
|
|
(base32
|
|
"1qw2k7xis53179lpqdqyylbcmp76lj7sagp883wmxg5i7chhc96k"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-asn1crypto" ,python-asn1crypto)
|
|
("python-oscrypto" ,python-oscrypto)
|
|
("python-oscryptotests", python-oscryptotests))) ;; certvalidator tests import oscryptotests
|
|
(arguments
|
|
`(#:phases
|
|
(modify-phases %standard-phases
|
|
(add-after 'unpack 'disable-broken-tests
|
|
(lambda _
|
|
(substitute* "tests/test_certificate_validator.py"
|
|
(("^(.*)class CertificateValidatorTests" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line)))
|
|
(substitute* "tests/test_crl_client.py"
|
|
(("^(.*)def test_fetch_crl" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line)))
|
|
(substitute* "tests/test_ocsp_client.py"
|
|
(("^(.*)def test_fetch_ocsp" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line)))
|
|
(substitute* "tests/test_registry.py"
|
|
(("^(.*)def test_build_paths" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line)))
|
|
(substitute* "tests/test_validate.py"
|
|
(("^(.*)def test_revocation_mode_hard" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line)))
|
|
#t))
|
|
(replace 'check
|
|
(lambda _
|
|
(invoke "python" "run.py" "tests")
|
|
#t)))))
|
|
(home-page "https://github.com/wbond/certvalidator")
|
|
(synopsis "Python library for validating X.509 certificates and paths")
|
|
(description "certvalidator is a Python library for validating X.509
|
|
certificates or paths. Supports various options, including: validation at a
|
|
specific moment in time, whitelisting and revocation checks.")
|
|
(license license:expat))))
|
|
|
|
(define-public python-altgraph
|
|
(package
|
|
(name "python-altgraph")
|
|
(version "0.17")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/ronaldoussoren/altgraph")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"09sm4srvvkw458pn48ga9q7ykr4xlz7q8gh1h9w7nxpf001qgpwb"))))
|
|
(build-system python-build-system)
|
|
(home-page "https://github.com/ronaldoussoren/altgraph")
|
|
(synopsis "Python graph (network) package")
|
|
(description "altgraph is a fork of graphlib: a graph (network) package for
|
|
constructing graphs, BFS and DFS traversals, topological sort, shortest paths,
|
|
etc. with graphviz output.")
|
|
(license license:expat)))
|
|
|
|
|
|
(define-public python-macholib
|
|
(package
|
|
(name "python-macholib")
|
|
(version "1.14")
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/ronaldoussoren/macholib")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"0aislnnfsza9wl4f0vp45ivzlc0pzhp9d4r08700slrypn5flg42"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-altgraph" ,python-altgraph)))
|
|
(arguments
|
|
'(#:phases
|
|
(modify-phases %standard-phases
|
|
(add-after 'unpack 'disable-broken-tests
|
|
(lambda _
|
|
;; This test is broken as there is no keyboard interrupt.
|
|
(substitute* "macholib_tests/test_command_line.py"
|
|
(("^(.*)class TestCmdLine" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line)))
|
|
(substitute* "macholib_tests/test_dyld.py"
|
|
(("^(.*)def test_\\S+_find" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line))
|
|
(("^(.*)def testBasic" line indent)
|
|
(string-append indent
|
|
"@unittest.skip(\"Disabled by Guix\")\n"
|
|
line))
|
|
)
|
|
#t)))))
|
|
(home-page "https://github.com/ronaldoussoren/macholib")
|
|
(synopsis "Python library for analyzing and editing Mach-O headers")
|
|
(description "macholib is a Macho-O header analyzer and editor. It's
|
|
typically used as a dependency analysis tool, and also to rewrite dylib
|
|
references in Mach-O headers to be @executable_path relative. Though this tool
|
|
targets a platform specific file format, it is pure python code that is platform
|
|
and endian independent.")
|
|
(license license:expat)))
|
|
|
|
(define-public python-signapple
|
|
(let ((commit "8a945a2e7583be2665cf3a6a89d665b70ecd1ab6"))
|
|
(package
|
|
(name "python-signapple")
|
|
(version (git-version "0.1" "1" commit))
|
|
(source
|
|
(origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/achow101/signapple")
|
|
(commit commit)))
|
|
(file-name (git-file-name name commit))
|
|
(sha256
|
|
(base32
|
|
"0fr1hangvfyiwflca6jg5g8zvg3jc9qr7vd2c12ff89pznf38dlg"))))
|
|
(build-system python-build-system)
|
|
(propagated-inputs
|
|
`(("python-asn1crypto" ,python-asn1crypto)
|
|
("python-oscrypto" ,python-oscrypto)
|
|
("python-certvalidator" ,python-certvalidator)
|
|
("python-elfesteem" ,python-elfesteem)
|
|
("python-requests" ,python-requests)
|
|
("python-macholib" ,python-macholib)))
|
|
;; There are no tests, but attempting to run python setup.py test leads to
|
|
;; problems, just disable the test
|
|
(arguments '(#:tests? #f))
|
|
(home-page "https://github.com/achow101/signapple")
|
|
(synopsis "Mach-O binary signature tool")
|
|
(description "signapple is a Python tool for creating, verifying, and
|
|
inspecting signatures in Mach-O binaries.")
|
|
(license license:expat))))
|
|
|
|
(define-public glibc-2.24
|
|
(package
|
|
(inherit glibc-2.31)
|
|
(version "2.24")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://sourceware.org/git/glibc.git")
|
|
(commit "0d7f1ed30969886c8dde62fbf7d2c79967d4bace")))
|
|
(file-name (git-file-name "glibc" "0d7f1ed30969886c8dde62fbf7d2c79967d4bace"))
|
|
(sha256
|
|
(base32
|
|
"0g5hryia5v1k0qx97qffgwzrz4lr4jw3s5kj04yllhswsxyjbic3"))
|
|
(patches (search-our-patches "glibc-ldd-x86_64.patch"
|
|
"glibc-versioned-locpath.patch"
|
|
"glibc-2.24-elfm-loadaddr-dynamic-rewrite.patch"
|
|
"glibc-2.24-no-build-time-cxx-header-run.patch"))))))
|
|
|
|
(define-public glibc-2.27/bitcoin-patched
|
|
(package
|
|
(inherit glibc-2.31)
|
|
(version "2.27")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://sourceware.org/git/glibc.git")
|
|
(commit "23158b08a0908f381459f273a984c6fd328363cb")))
|
|
(file-name (git-file-name "glibc" "23158b08a0908f381459f273a984c6fd328363cb"))
|
|
(sha256
|
|
(base32
|
|
"1b2n1gxv9f4fd5yy68qjbnarhf8mf4vmlxk10i3328c1w5pmp0ca"))
|
|
(patches (search-our-patches "glibc-ldd-x86_64.patch"
|
|
"glibc-2.27-riscv64-Use-__has_include__-to-include-asm-syscalls.h.patch"))))))
|
|
|
|
(packages->manifest
|
|
(append
|
|
(list ;; The Basics
|
|
bash
|
|
which
|
|
coreutils
|
|
util-linux
|
|
;; File(system) inspection
|
|
file
|
|
grep
|
|
diffutils
|
|
findutils
|
|
;; File transformation
|
|
patch
|
|
gawk
|
|
sed
|
|
moreutils
|
|
;; Compression and archiving
|
|
tar
|
|
bzip2
|
|
gzip
|
|
xz
|
|
zlib
|
|
(list zlib "static")
|
|
;; Build tools
|
|
gnu-make
|
|
libtool
|
|
autoconf-2.71
|
|
automake
|
|
pkg-config
|
|
bison
|
|
;; Scripting
|
|
perl
|
|
python-3
|
|
;; Git
|
|
git
|
|
;; Tests
|
|
lief)
|
|
(let ((target (getenv "HOST")))
|
|
(cond ((string-suffix? "-mingw32" target)
|
|
;; Windows
|
|
(list ;; Native GCC 10 toolchain
|
|
gcc-toolchain-10
|
|
(list gcc-toolchain-10 "static")
|
|
zip
|
|
(make-mingw-pthreads-cross-toolchain "x86_64-w64-mingw32")
|
|
(make-nsis-for-gcc-10 nsis-x86_64)
|
|
osslsigncode))
|
|
((string-contains target "-linux-")
|
|
(list ;; Native GCC 7 toolchain
|
|
gcc-toolchain-7
|
|
(list gcc-toolchain-7 "static")
|
|
(cond ((string-contains target "riscv64-")
|
|
(make-bitcoin-cross-toolchain target
|
|
#:base-libc glibc-2.27/bitcoin-patched
|
|
#:base-kernel-headers linux-libre-headers-4.19))
|
|
(else
|
|
(make-bitcoin-cross-toolchain target)))))
|
|
((string-contains target "darwin")
|
|
(list ;; Native GCC 10 toolchain
|
|
gcc-toolchain-10
|
|
(list gcc-toolchain-10 "static")
|
|
clang-toolchain-10 binutils cmake xorriso python-signapple))
|
|
(else '())))))
|