From unknown Sun Jun 22 22:47:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#64337] [PATCH v4 6/6] gnu: python-lief: Update to 0.13.2. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Wed, 28 Jun 2023 18:36:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64337 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64337@debbugs.gnu.org Cc: Hilton Chain , Lars-Dominik Braun , jgart X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Lars-Dominik Braun , jgart Received: via spool by submit@debbugs.gnu.org id=B.168797733415558 (code B ref -1); Wed, 28 Jun 2023 18:36:05 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jun 2023 18:35:34 +0000 Received: from localhost ([127.0.0.1]:51639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEa0r-00042m-RZ for submit@debbugs.gnu.org; Wed, 28 Jun 2023 14:35:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:42356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEa0l-00042R-1y for submit@debbugs.gnu.org; Wed, 28 Jun 2023 14:35:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEa0k-0005Wp-1r for guix-patches@gnu.org; Wed, 28 Jun 2023 14:35:26 -0400 Received: from mail.boiledscript.com ([144.168.59.46]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEa0h-0000I2-E4 for guix-patches@gnu.org; Wed, 28 Jun 2023 14:35:25 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1687977116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vVFtF1qzAgoVFHalMQbwwlOpZUsNpCWX/pIcH6DNgNY=; b=P5h1lE6sv3XDan6EfLyMC9GwYyCe37RNqejvsOPvB4zKJPU8a+39UI71YvSvgTlv+hxC+Y +kJE2nzEB0JybuIZQXXsFlgkr0SReDpwy5XeXyXCsoUrmRG9p4IFAWSWASayfaVvk5dcVf 9GutAMiq8dc5MXtsqjS/18SOTvNhzrqjpDGj3Cg7B2Oj03xVQ4QLtLXqLDrvR9ZKAKMVQB gQlt5KtWd9jaiIsRP3FLKl4+WhLnnAkIpruTpDKa+HxvnkTHrLHNFXDmmmI8Xi04AZdLtn JdC7s49q+0h3+GZ+/H9Q/V6lD7ZRKpbzVc96cwylUkg3VtkkB2LgsJstWnZWhg== Date: Thu, 29 Jun 2023 02:35:06 +0800 Message-Id: <8370361e570c5ffc906d9e348ceb0c5ce86a4f25.1687976817.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: -- Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@ultrarare.space; helo=mail.boiledscript.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/packages/python-xyz.scm (python-lief): Update to 0.13.2. [snippet]: Unbundle third-party dependencies. [build-system]: Change to cmake-build-system [native-inputs]: Add python-minimal-wrapper, python-tomli. Remove cmake. [inputs]: Add frozen, mbedtls-apache, nlohmann-json, pybind11, utfcpp, spdlog. [outputs]: Add "python" output. [home-page]: Update homepage. (shrinkwrap)[inputs]: Replace python-lief to its "python" output. --- gnu/packages/python-xyz.scm | 96 +++++++++++++++++++++++++++++++------ 1 file changed, 81 insertions(+), 15 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 55531b2785..a52c640fc5 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -212,6 +212,7 @@ (define-module (gnu packages python-xyz) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) + #:use-module (gnu packages logging) #:use-module (gnu packages machine-learning) #:use-module (gnu packages man) #:use-module (gnu packages markup) @@ -33167,29 +33168,94 @@ (define-public python-misskey (define-public python-lief (package (name "python-lief") - (version "0.12.3") + (version "0.13.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/lief-project/LIEF") (commit version))) (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet + '(begin + ;; Configure build for Python bindings. + (substitute* "api/python/config-default.toml" + (("(ninja = )true" all m) + (string-append m "false")) + (("(parallel-jobs = )0" all m) + (string-append m (number->string (parallel-job-count))))) + ;; Unbundle third-party dependencies. + (for-each delete-file + (find-files "third-party/" + (string-join '("spdlog" + "frozen" + "json" + "mbedtls" + "pybind11" + "utfcpp") + "|" ))) + ;; Same in argument #:configure-flags. + (substitute* "api/python/setup.py" + (("self\\._get_third_party_opt\\(\\)") + "[\"-DLIEF_EXTERNAL_SPDLOG=ON\", + \"-DLIEF_OPT_FROZEN_EXTERNAL=ON\", + \"-DLIEF_OPT_MBEDTLS_EXTERNAL=ON\", + \"-DLIEF_OPT_NLOHMANN_JSON_EXTERNAL=ON\", + \"-DLIEF_OPT_PYBIND11_EXTERNAL=ON\", + \"-DLIEF_OPT_UTFCPP_EXTERNAL=ON\"]")))) (sha256 (base32 - "11i6hqmcjh56y554kqhl61698n9v66j2qk1c1g63mv2w07h2z661")))) - (build-system python-build-system) - (native-inputs (list cmake)) + "0y48x358ppig5xp97ahcphfipx7cg9chldj2q5zrmn610fmi4zll")))) + (build-system cmake-build-system) (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") + (list #:modules + '((guix build utils) + (guix build cmake-build-system) + ((guix build python-build-system) #:prefix python:)) + #:imported-modules + (append %cmake-build-system-modules + '((guix build python-build-system))) + #:configure-flags + #~'("-DCMAKE_LINK_WHAT_YOU_USE=ON" + "-DBUILD_SHARED_LIBS=ON" + "-DLIEF_INSTALL_COMPILED_EXAMPLES=ON" + "-DLIEF_TESTS=ON" + ;; Unbundle third-party dependencies + "-DLIEF_EXTERNAL_SPDLOG=ON" + "-DLIEF_OPT_FROZEN_EXTERNAL=ON" + "-DLIEF_OPT_MBEDTLS_EXTERNAL=ON" + "-DLIEF_OPT_NLOHMANN_JSON_EXTERNAL=ON" + "-DLIEF_OPT_PYBIND11_EXTERNAL=ON" + "-DLIEF_OPT_UTFCPP_EXTERNAL=ON") + #:phases + ;; Phases from python-build-system, for Python bindings. + #~(modify-phases %standard-phases + (add-after 'install 'chdir + (lambda _ + (chdir "../source/api/python/"))) + (add-after 'chdir 'ensure-no-mtimes-pre-1980 + (assoc-ref python:%standard-phases 'ensure-no-mtimes-pre-1980)) + (add-after 'ensure-no-mtimes-pre-1980 'enable-bytecode-determinism + (assoc-ref python:%standard-phases 'enable-bytecode-determinism)) + (add-after 'enable-bytecode-determinism 'ensure-no-cythonized-files + (assoc-ref python:%standard-phases 'ensure-no-cythonized-files)) + (add-after 'ensure-no-cythonized-files 'python-install + (lambda* (#:key inputs outputs #:allow-other-keys) + ((assoc-ref python:%standard-phases 'install) + #:inputs inputs + #:outputs outputs + #:configure-flags '() + #:use-setuptools? #t))) + (add-after 'python-install 'add-install-to-pythonpath + (assoc-ref python:%standard-phases 'add-install-to-pythonpath)) + (add-after 'add-install-to-pythonpath 'add-install-to-path + (assoc-ref python:%standard-phases 'add-install-to-path)) + (add-after 'add-install-to-path 'python-wrap + (assoc-ref python:%standard-phases 'wrap))))) + (native-inputs (list python-minimal-wrapper python-tomli)) + (inputs (list frozen mbedtls-apache nlohmann-json pybind11 utfcpp spdlog)) + (outputs '("out" "python")) + (home-page "https://lief-project.github.io/") (synopsis "Library to instrument executable formats") (description "@code{python-lief} is a cross platform library which can parse, modify @@ -33237,7 +33303,7 @@ (define-public shrinkwrap python-poetry-core python-pypa-build python-pytest)) - (inputs (list python-lief python-sh)) + (inputs (list `(,python-lief "python") python-sh)) (home-page "https://github.com/fzakaria/shrinkwrap") (synopsis "Emboss needed dependencies on the top level executable") (description -- 2.40.1 From unknown Sun Jun 22 22:47:01 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Hilton Chain Subject: bug#64337: closed (Re: bug#64332: Acknowledgement ([PATCH v4 2/6] gnu: mbedtls-apache-for-hiawatha: Use inherited source.)) Message-ID: References: <6636D850-FD56-45A6-B12B-24EE58D2559D@ultrarare.space> <8370361e570c5ffc906d9e348ceb0c5ce86a4f25.1687976817.git.hako@ultrarare.space> X-Gnu-PR-Message: they-closed 64337 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 64337@debbugs.gnu.org Date: Wed, 28 Jun 2023 18:45:06 +0000 Content-Type: multipart/mixed; boundary="----------=_1687977906-16656-1" This is a multi-part message in MIME format... ------------=_1687977906-16656-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #64337: [PATCH v4 6/6] gnu: python-lief: Update to 0.13.2. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 64337@debbugs.gnu.org. --=20 64337: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D64337 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1687977906-16656-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 64337-close) by debbugs.gnu.org; 28 Jun 2023 18:44:30 +0000 Received: from localhost ([127.0.0.1]:51676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEa9W-0004Hz-2e for submit@debbugs.gnu.org; Wed, 28 Jun 2023 14:44:30 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:40680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEa9S-0004H5-9o; Wed, 28 Jun 2023 14:44:27 -0400 Date: Wed, 28 Jun 2023 18:44:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1687977661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2PK2WVqOYFPRQVt0YefnOJH6P7CLje6XgWRuCddxqX0=; b=RAWa0tSn8H+bEBp4ilywbMYg89fLapkr5hzuNTpZBCLPxxsRCScnDUnEg0r5YQx2IlKkz6 yTjYUxXmBolZrqT0aDjR0q2gjT8tviOMlqrgtH4RlGliQgykbZ7cpyCKWBr/H5jBQjE/nX 6ugcT7wnq/z2wxlF8OEXQr5UsETHJjQYcBLbyQpieb5Ldxq+85KuG1CuNV9nva7KFd++PO 6uGntE3TSsfjYGo7ILMnjg3mT9QWp0C5H8nQWiYfFvf7fIjjwP5zvoymEfmyYABGjjTt3+ aj+XaAWcfImQD0gc5ZQT9HbjYDS7fk7uhHIz3voEm44j+OJ+IyN6DbZXXmlGCA== From: hako To: 64332-close@debbugs.gnu.org, 64333-close@debbugs.gnu.org, 64334-close@debbugs.gnu.org, 64335-close@debbugs.gnu.org, 64336-close@debbugs.gnu.org, 64337-close@debbugs.gnu.org Subject: =?US-ASCII?Q?Re=3A_bug=2364332=3A_Acknowledg?= =?US-ASCII?Q?ement_=28=5BPATCH_v4_2/6=5D_gnu=3A?= =?US-ASCII?Q?_mbedtls-apache-for-hiawatha=3A_Use_inherited_source=2E=29?= In-Reply-To: References: Message-ID: <6636D850-FD56-45A6-B12B-24EE58D2559D@ultrarare.space> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----4FO2SOAB3OUGKNTNKQZX1HOXEEYMQP Content-Transfer-Encoding: 7bit X-Spamd-Bar: + Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-Spam-Level: * X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: ...... 😣 Forgot to add a --to= I'll resend the patches when I get up. ...... 😣 Forgot to add a --to= Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.5 SUSPICIOUS_RECIPS Similar addresses in recipient list 0.0 HTML_MESSAGE BODY: HTML included in message X-Debbugs-Envelope-To: 64337-close X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: ...... 😣 Forgot to add a --to= I'll resend the patches when I get up. ...... 😣 Forgot to add a --to= Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 2.5 SUSPICIOUS_RECIPS Similar addresses in recipient list 0.0 HTML_MESSAGE BODY: HTML included in message -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager ------4FO2SOAB3OUGKNTNKQZX1HOXEEYMQP Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =2E=2E=2E=2E=2E=2E =F0=9F=98=A3 Forgot to add a --to=3D I'll resend the patches when I get up=2E ------4FO2SOAB3OUGKNTNKQZX1HOXEEYMQP Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
=2E=2E=2E=2E=2E=2E =F0=9F=98= =A3 Forgot to add a --to=3D

I'll resend the patches when I get up=2E=
------4FO2SOAB3OUGKNTNKQZX1HOXEEYMQP-- ------------=_1687977906-16656-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Jun 2023 18:35:34 +0000 Received: from localhost ([127.0.0.1]:51639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEa0r-00042m-RZ for submit@debbugs.gnu.org; Wed, 28 Jun 2023 14:35:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:42356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEa0l-00042R-1y for submit@debbugs.gnu.org; Wed, 28 Jun 2023 14:35:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEa0k-0005Wp-1r for guix-patches@gnu.org; Wed, 28 Jun 2023 14:35:26 -0400 Received: from mail.boiledscript.com ([144.168.59.46]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEa0h-0000I2-E4 for guix-patches@gnu.org; Wed, 28 Jun 2023 14:35:25 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1687977116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vVFtF1qzAgoVFHalMQbwwlOpZUsNpCWX/pIcH6DNgNY=; b=P5h1lE6sv3XDan6EfLyMC9GwYyCe37RNqejvsOPvB4zKJPU8a+39UI71YvSvgTlv+hxC+Y +kJE2nzEB0JybuIZQXXsFlgkr0SReDpwy5XeXyXCsoUrmRG9p4IFAWSWASayfaVvk5dcVf 9GutAMiq8dc5MXtsqjS/18SOTvNhzrqjpDGj3Cg7B2Oj03xVQ4QLtLXqLDrvR9ZKAKMVQB gQlt5KtWd9jaiIsRP3FLKl4+WhLnnAkIpruTpDKa+HxvnkTHrLHNFXDmmmI8Xi04AZdLtn JdC7s49q+0h3+GZ+/H9Q/V6lD7ZRKpbzVc96cwylUkg3VtkkB2LgsJstWnZWhg== To: guix-patches@gnu.org Subject: [PATCH v4 6/6] gnu: python-lief: Update to 0.13.2. Date: Thu, 29 Jun 2023 02:35:06 +0800 Message-Id: <8370361e570c5ffc906d9e348ceb0c5ce86a4f25.1687976817.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 X-Debbugs-Cc: Lars-Dominik Braun , jgart Content-Transfer-Encoding: 8bit X-Spamd-Bar: -- Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@ultrarare.space; helo=mail.boiledscript.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Hilton Chain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/packages/python-xyz.scm (python-lief): Update to 0.13.2. [snippet]: Unbundle third-party dependencies. [build-system]: Change to cmake-build-system [native-inputs]: Add python-minimal-wrapper, python-tomli. Remove cmake. [inputs]: Add frozen, mbedtls-apache, nlohmann-json, pybind11, utfcpp, spdlog. [outputs]: Add "python" output. [home-page]: Update homepage. (shrinkwrap)[inputs]: Replace python-lief to its "python" output. --- gnu/packages/python-xyz.scm | 96 +++++++++++++++++++++++++++++++------ 1 file changed, 81 insertions(+), 15 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 55531b2785..a52c640fc5 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -212,6 +212,7 @@ (define-module (gnu packages python-xyz) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) + #:use-module (gnu packages logging) #:use-module (gnu packages machine-learning) #:use-module (gnu packages man) #:use-module (gnu packages markup) @@ -33167,29 +33168,94 @@ (define-public python-misskey (define-public python-lief (package (name "python-lief") - (version "0.12.3") + (version "0.13.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/lief-project/LIEF") (commit version))) (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet + '(begin + ;; Configure build for Python bindings. + (substitute* "api/python/config-default.toml" + (("(ninja = )true" all m) + (string-append m "false")) + (("(parallel-jobs = )0" all m) + (string-append m (number->string (parallel-job-count))))) + ;; Unbundle third-party dependencies. + (for-each delete-file + (find-files "third-party/" + (string-join '("spdlog" + "frozen" + "json" + "mbedtls" + "pybind11" + "utfcpp") + "|" ))) + ;; Same in argument #:configure-flags. + (substitute* "api/python/setup.py" + (("self\\._get_third_party_opt\\(\\)") + "[\"-DLIEF_EXTERNAL_SPDLOG=ON\", + \"-DLIEF_OPT_FROZEN_EXTERNAL=ON\", + \"-DLIEF_OPT_MBEDTLS_EXTERNAL=ON\", + \"-DLIEF_OPT_NLOHMANN_JSON_EXTERNAL=ON\", + \"-DLIEF_OPT_PYBIND11_EXTERNAL=ON\", + \"-DLIEF_OPT_UTFCPP_EXTERNAL=ON\"]")))) (sha256 (base32 - "11i6hqmcjh56y554kqhl61698n9v66j2qk1c1g63mv2w07h2z661")))) - (build-system python-build-system) - (native-inputs (list cmake)) + "0y48x358ppig5xp97ahcphfipx7cg9chldj2q5zrmn610fmi4zll")))) + (build-system cmake-build-system) (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") + (list #:modules + '((guix build utils) + (guix build cmake-build-system) + ((guix build python-build-system) #:prefix python:)) + #:imported-modules + (append %cmake-build-system-modules + '((guix build python-build-system))) + #:configure-flags + #~'("-DCMAKE_LINK_WHAT_YOU_USE=ON" + "-DBUILD_SHARED_LIBS=ON" + "-DLIEF_INSTALL_COMPILED_EXAMPLES=ON" + "-DLIEF_TESTS=ON" + ;; Unbundle third-party dependencies + "-DLIEF_EXTERNAL_SPDLOG=ON" + "-DLIEF_OPT_FROZEN_EXTERNAL=ON" + "-DLIEF_OPT_MBEDTLS_EXTERNAL=ON" + "-DLIEF_OPT_NLOHMANN_JSON_EXTERNAL=ON" + "-DLIEF_OPT_PYBIND11_EXTERNAL=ON" + "-DLIEF_OPT_UTFCPP_EXTERNAL=ON") + #:phases + ;; Phases from python-build-system, for Python bindings. + #~(modify-phases %standard-phases + (add-after 'install 'chdir + (lambda _ + (chdir "../source/api/python/"))) + (add-after 'chdir 'ensure-no-mtimes-pre-1980 + (assoc-ref python:%standard-phases 'ensure-no-mtimes-pre-1980)) + (add-after 'ensure-no-mtimes-pre-1980 'enable-bytecode-determinism + (assoc-ref python:%standard-phases 'enable-bytecode-determinism)) + (add-after 'enable-bytecode-determinism 'ensure-no-cythonized-files + (assoc-ref python:%standard-phases 'ensure-no-cythonized-files)) + (add-after 'ensure-no-cythonized-files 'python-install + (lambda* (#:key inputs outputs #:allow-other-keys) + ((assoc-ref python:%standard-phases 'install) + #:inputs inputs + #:outputs outputs + #:configure-flags '() + #:use-setuptools? #t))) + (add-after 'python-install 'add-install-to-pythonpath + (assoc-ref python:%standard-phases 'add-install-to-pythonpath)) + (add-after 'add-install-to-pythonpath 'add-install-to-path + (assoc-ref python:%standard-phases 'add-install-to-path)) + (add-after 'add-install-to-path 'python-wrap + (assoc-ref python:%standard-phases 'wrap))))) + (native-inputs (list python-minimal-wrapper python-tomli)) + (inputs (list frozen mbedtls-apache nlohmann-json pybind11 utfcpp spdlog)) + (outputs '("out" "python")) + (home-page "https://lief-project.github.io/") (synopsis "Library to instrument executable formats") (description "@code{python-lief} is a cross platform library which can parse, modify @@ -33237,7 +33303,7 @@ (define-public shrinkwrap python-poetry-core python-pypa-build python-pytest)) - (inputs (list python-lief python-sh)) + (inputs (list `(,python-lief "python") python-sh)) (home-page "https://github.com/fzakaria/shrinkwrap") (synopsis "Emboss needed dependencies on the top level executable") (description -- 2.40.1 ------------=_1687977906-16656-1--