aboutsummaryrefslogtreecommitdiff
path: root/contrib/guix/manifest.scm
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-03-27 14:36:20 +0100
committerfanquake <fanquake@gmail.com>2023-03-27 14:37:16 +0100
commit7fbc70395c9a41a6e5f8e2db0ce3dd0fe3ff7dd1 (patch)
tree4044eb3de2914bb18ff92d039a7377356029abde /contrib/guix/manifest.scm
parent39630675553280fe72254de69ec1ed2bc8fc9808 (diff)
parent24f26e08cc0db4041c51fe8391b1736b47a13af9 (diff)
downloadbitcoin-7fbc70395c9a41a6e5f8e2db0ce3dd0fe3ff7dd1.tar.xz
Merge bitcoin/bitcoin#27296: guix: import/sync python-lief (0.12.3) package definition from upstream
24f26e08cc0db4041c51fe8391b1736b47a13af9 guix: use cmake-minimal for python-lief (fanquake) 43d8173f9911cb2130e52d5ddac44c0e19edccce guix: import LIEF from upstream (0.12.3) (fanquake) Pull request description: Update to version 0.12.3. Retain our PPC64 patch. Mention when we can drop our local definition. Also switch to using cmake-minimal (see #27172), which fixes atleast one build failure I've seen on aarch64, where cmake dependencies fail to build. Fix that by using the cmake without all the dependencies we don't actually need: ```bash The following derivations will be built: /gnu/store/7qqvqq2g7l5ylrjv0gn6zha565a12kar-python-lief-0.12.1.drv /gnu/store/f9zwh1ldy63ga0i5w6cbbqlj6sfq226j-cmake-3.21.4.drv /gnu/store/3wg6ya847id503m5izhzhn1qqs464lfk-python-sphinx-4.2.0.drv building /gnu/store/3wg6ya847id503m5izhzhn1qqs464lfk-python-sphinx-4.2.0.drv... / 'check' phasenote: keeping build directory `/tmp/guix-build-python-sphinx-4.2.0.drv-5' builder for `/gnu/store/3wg6ya847id503m5izhzhn1qqs464lfk-python-sphinx-4.2.0.drv' failed with exit code 1 build of /gnu/store/3wg6ya847id503m5izhzhn1qqs464lfk-python-sphinx-4.2.0.drv failed View build log at '/var/log/guix/drvs/3w/g6ya847id503m5izhzhn1qqs464lfk-python-sphinx-4.2.0.drv.gz'. cannot build derivation `/gnu/store/f9zwh1ldy63ga0i5w6cbbqlj6sfq226j-cmake-3.21.4.drv': 1 dependencies couldn't be built cannot build derivation `/gnu/store/7qqvqq2g7l5ylrjv0gn6zha565a12kar-python-lief-0.12.1.drv': 1 dependencies couldn't be built guix environment: error: build of `/gnu/store/7qqvqq2g7l5ylrjv0gn6zha565a12kar-python-lief-0.12.1.drv' failed ``` ACKs for top commit: TheCharlatan: ACK 24f26e08cc0db4041c51fe8391b1736b47a13af9 Tree-SHA512: d4260cdf5121686fd2fa36c1fc85687848eeb26cabaad2c6566feb71a18ea7fb013cfc6353c99f6f74bc89108a9505adce513c1cfa22a0a67450e6a1c451d209
Diffstat (limited to 'contrib/guix/manifest.scm')
-rw-r--r--contrib/guix/manifest.scm63
1 files changed, 34 insertions, 29 deletions
diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm
index 7c1550a8d1..0cfce41117 100644
--- a/contrib/guix/manifest.scm
+++ b/contrib/guix/manifest.scm
@@ -208,35 +208,40 @@ chain for " target " development."))
(package-with-extra-patches lief
(search-our-patches "lief-fix-ppc64-nx-default.patch")))
-(define-public lief
+;; Our python-lief package can be removed once we are using
+;; guix 83bfdb409787cb2737e68b093a319b247b7858e6 or later.
+;; Note we currently use cmake-minimal.
+(define-public python-lief
(package
- (name "python-lief")
- (version "0.12.1")
- (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
- "1xzbh3bxy4rw1yamnx68da1v5s56ay4g081cyamv67256g0qy2i1"))))
- (build-system python-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'parallel-jobs
- ;; build with multiple cores
- (lambda _
- (substitute* "setup.py" (("self.parallel if self.parallel else 1") (number->string (parallel-job-count)))))))))
- (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)))
+ (name "python-lief")
+ (version "0.12.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/lief-project/LIEF")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "11i6hqmcjh56y554kqhl61698n9v66j2qk1c1g63mv2w07h2z661"))))
+ (build-system python-build-system)
+ (native-inputs (list cmake-minimal))
+ (arguments
+ (list
+ #:tests? #f ;needs network
+ #:phases #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (invoke
+ "python" "setup.py" "--sdk" "build"
+ (string-append
+ "-j" (number->string (parallel-job-count)))))))))
+ (home-page "https://github.com/lief-project/LIEF")
+ (synopsis "Library to instrument executable formats")
+ (description
+ "@code{python-lief} is a cross platform library which can parse, modify
+and abstract ELF, PE and MachO formats.")
+ (license license:asl2.0)))
(define osslsigncode
(package
@@ -596,7 +601,7 @@ inspecting signatures in Mach-O binaries.")
;; Git
git-minimal
;; Tests
- (fix-ppc64-nx-default lief))
+ (fix-ppc64-nx-default python-lief))
(let ((target (getenv "HOST")))
(cond ((string-suffix? "-mingw32" target)
;; Windows