From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id aJ61AhVNzmRARgEASxT56A (envelope-from ) for ; Sat, 05 Aug 2023 15:22:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0ON2AhVNzmTogwEAauVa8A (envelope-from ) for ; Sat, 05 Aug 2023 15:22:29 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 41AB641D2C for ; Sat, 5 Aug 2023 15:22:28 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=q2bDpH5p; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691241748; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=onURQWPth0U3hqEu3CnUjkGgWNvLcMj/NZT7f0Y/Le4=; b=eb4o12aGBtaJyYHg+quSFjsMIfu+XLsJXpycTESa5vb0VzKeN/FIqqIqubCCRaX6knHnqt D4poEVmj6FP+u3Reuz1Uiit+ZC/TjaMjIw9W3cD3h9GjmgMLoWhLvpeKLzSbYU9jUVEBwK Iag+uthbPgqwkRkelN+jb4z8XftwqXivKzn8hRCUlAjjwAf46iIKrcDN525WsKBhhguhZM Wn7J7gVlSbYub5/MaQ4IjTY+7g/YvkyqKNfyRIAgwb+X5RCWdR2TPyR8vbBEMvSl8XvfIm Db1+FBepi/B1HiM3IVVExBhzfYvTMqt+4T/6TnwH8eNXaeUoVYFZxhwnZ01grw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=q2bDpH5p; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691241748; a=rsa-sha256; cv=none; b=lU7g2xt9kkgrpEnjkDIW1qyQZk3eemtGu1Vr8VXAyoibbARd4pJu9qPT8fcfPY7BNimA9g ixjZwk36B4vN0zRu008iAKtaea/GGPh6GYtcSN7Qji9g3S7qp7NMJ5JQ7QaKfii5owEv56 2Q8GSX/+3WZ1+HPc+AQZfwJnllQ3uj8F//a/CcYssEKuTkYX6WeWgN5JIgDBViiFCrYiV4 rAzsUeGU2w3DcrlBhqwJDh003cBAhkSIIro7Lie/VYzmWF8K01B0Ux9eFCzXEY6sRfDEYL 0fuUmTLN8B2bCXhKAUnQLx3PHtfItTqbxt1hTremRirm56Jc14F00ypw4qWacQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSHEM-0003yo-6K; Sat, 05 Aug 2023 09:22:06 -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 1qSHEI-0003yU-Pp for guix-patches@gnu.org; Sat, 05 Aug 2023 09:22:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qSHEI-0003lo-Gd for guix-patches@gnu.org; Sat, 05 Aug 2023 09:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSHEI-00069n-80; Sat, 05 Aug 2023 09:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63765] [PATCH v6 10/10] gnu: python-lief: Rename to lief. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Sat, 05 Aug 2023 13:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63765 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63765@debbugs.gnu.org Cc: Hilton Chain , Lars-Dominik Braun , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , jgart Received: via spool by 63765-submit@debbugs.gnu.org id=B63765.169124167923595 (code B ref 63765); Sat, 05 Aug 2023 13:22:02 +0000 Received: (at 63765) by debbugs.gnu.org; 5 Aug 2023 13:21:19 +0000 Received: from localhost ([127.0.0.1]:56165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSHDa-00068U-Kh for submit@debbugs.gnu.org; Sat, 05 Aug 2023 09:21:19 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:51120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSHDY-00068L-7A for 63765@debbugs.gnu.org; Sat, 05 Aug 2023 09:21:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1691241659; 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=onURQWPth0U3hqEu3CnUjkGgWNvLcMj/NZT7f0Y/Le4=; b=q2bDpH5pyMREuwFlPN3v9/vHh9X/a1WHI8xVhlseJx+uqPxSfgHIBayAFcu0dq/Gpmg65L zy6i4WkYDiduakK/n17sbBWBEbTZrSOLkYVOrbLZRZG6kbgK/k8wQtRjAoew02wvND2Xtk WR9UiO0Z4gFOrCnxr0Lfvm5BL2W2BWUehojpWZQdBVG+o+HUodAzJ8NWq91U2T4iWHHHJv Ks9mbsY1zXuEkSqsa+a8/mGPHTjtfpkB0xjRYaoBKkeCRmzP4EW9hfj87mv1Vzb23aD9L0 Hhwx4dNlTVN9vaL/mrVk4UjICyRNpg2k2GYTvuhYQGrbU/PGaYNd4GV9GTIWuA== Date: Sat, 5 Aug 2023 21:19:06 +0800 Message-ID: <830b737f3fc3f03303daee9d53169d5676db9598.1691240736.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: -- X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 41AB641D2C X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -3.15 X-Migadu-Spam-Score: -3.15 X-TUID: tsGHqJUlmEi+ * gnu/packages/elf.scm(lief): Renamed from ... * gnu/packages/python-xyz.scm (python-lief): ...this. (shrinkwrap)[inputs]: Adjust accordingly. --- gnu/packages/elf.scm | 125 +++++++++++++++++++++++++++++++++++- gnu/packages/python-xyz.scm | 117 +-------------------------------- 2 files changed, 125 insertions(+), 117 deletions(-) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 3ddb6c4064..41fd1c72f2 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -33,18 +33,27 @@ (define-module (gnu packages elf) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) - #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+ lgpl2.1 gpl2 bsd-2)) + #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+ lgpl2.1 gpl2 asl2.0 bsd-2)) #:use-module (gnu packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages boost) + #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) #:use-module (gnu packages documentation) #:use-module (gnu packages gcc) + #:use-module (gnu packages logging) #:use-module (gnu packages m4) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages sphinx) #:use-module (gnu packages texinfo) + #:use-module (gnu packages textutils) + #:use-module (gnu packages tls) #:use-module (gnu packages xml) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26)) @@ -342,6 +351,120 @@ (define-public libdwarf ;; See https://www.prevanders.net/dwarflicense.html: (license (list lgpl2.1 gpl2 bsd-2)))) +(define-public lief + (package + (name "lief") + (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)) + (patches (search-patches "lief-unbundle-test-dependencies.patch")) + (modules '((guix build utils))) + (snippet + '(begin (delete-file-recursively "third-party") + (substitute* "api/python/config-default.toml" + (("(ninja *= ).*" _ m) + (string-append m "false\n"))))) + (sha256 + (base32 + "0y48x358ppig5xp97ahcphfipx7cg9chldj2q5zrmn610fmi4zll")))) + (build-system cmake-build-system) + (arguments + (list + #:imported-modules + `(,@%cmake-build-system-modules + (guix build python-build-system)) + #:modules + '(((guix build python-build-system) #:prefix python:) + (guix build cmake-build-system) + (guix build utils)) + #:configure-flags + #~'("-DBUILD_SHARED_LIBS=ON" + "-DLIEF_INSTALL_COMPILED_EXAMPLES=ON" + "-DLIEF_TESTS=ON" + ;; Use dependencies from Guix. + "-DLIEF_EXTERNAL_SPDLOG=ON" + "-DLIEF_OPT_EXTERNAL_LEAF=ON" + "-DLIEF_OPT_EXTERNAL_SPAN=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 + ;; Python bindings. + #~(modify-phases %standard-phases + (add-after 'unpack 'configure-python-build + (lambda* (#:key configure-flags build-type parallel-build? + #:allow-other-keys) + (with-directory-excursion "api/python" + (substitute* "config-default.toml" + ;; Honor `#:build-type'. + (("(type *)= .*" _ m) + (format #f "~a= \"~a\"~%" + m build-type)) + ;; Honor `#:parallel-build?'. + (("(parallel-jobs *)= .*" _ m) + (format #f "~a= ~a~%" + m (if parallel-build? + (parallel-job-count) + 1)))) + (substitute* "setup.py" + ;; Honor `#:configure-flags'. + (("(configure_cmd = .*)\n" _ m) + (format #f "~a + [~a]~%" + m (apply string-append + (map (lambda (flag) + (format #f "\"~a\"," flag)) + (append configure-flags + '("-DBUILD_SHARED_LIBS=OFF")))) + )))))) + (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 '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 catch2 + melkor + python-wrapper + python-tomli)) + (inputs + (list boost-leaf + frozen + mbedtls-apache + nlohmann-json + pybind11 + spdlog + tcb-span + utfcpp)) + (outputs '("out" "python")) + (home-page "https://lief-project.github.io/") + (synopsis "Library to instrument executable formats") + (description + "@acronym{LIEF, Library to Instrument Executable Formats} is a cross +platform library which can parse, modify and abstract ELF, PE and MachO +formats.") + (license asl2.0))) + (define-public melkor (let ((commit "ac2495bef2a744e7931537e023b1129229b001c4") (revision "8")) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 5066fcd1dd..8aa39f679a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -167,7 +167,6 @@ (define-module (gnu packages python-xyz) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bdw-gc) - #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -215,7 +214,6 @@ (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) @@ -33438,119 +33436,6 @@ (define-public python-misskey platform using the ActivityPub protocol.") (license license:expat))) -(define-public python-lief - (package - (name "python-lief") - (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)) - (patches (search-patches "lief-unbundle-test-dependencies.patch")) - (modules '((guix build utils))) - (snippet - '(begin (delete-file-recursively "third-party") - (substitute* "api/python/config-default.toml" - (("(ninja *= ).*" _ m) - (string-append m "false\n"))))) - (sha256 - (base32 - "0y48x358ppig5xp97ahcphfipx7cg9chldj2q5zrmn610fmi4zll")))) - (build-system cmake-build-system) - (arguments - (list - #:imported-modules - `(,@%cmake-build-system-modules - (guix build python-build-system)) - #:modules - '(((guix build python-build-system) #:prefix python:) - (guix build cmake-build-system) - (guix build utils)) - #:configure-flags - #~'("-DBUILD_SHARED_LIBS=ON" - "-DLIEF_INSTALL_COMPILED_EXAMPLES=ON" - "-DLIEF_TESTS=ON" - ;; Use dependencies from Guix. - "-DLIEF_EXTERNAL_SPDLOG=ON" - "-DLIEF_OPT_EXTERNAL_LEAF=ON" - "-DLIEF_OPT_EXTERNAL_SPAN=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 - ;; Python bindings. - #~(modify-phases %standard-phases - (add-after 'unpack 'configure-python-build - (lambda* (#:key configure-flags build-type parallel-build? - #:allow-other-keys) - (with-directory-excursion "api/python" - (substitute* "config-default.toml" - ;; Honor `#:build-type'. - (("(type *)= .*" _ m) - (format #f "~a= \"~a\"~%" - m build-type)) - ;; Honor `#:parallel-build?'. - (("(parallel-jobs *)= .*" _ m) - (format #f "~a= ~a~%" - m (if parallel-build? - (parallel-job-count) - 1)))) - (substitute* "setup.py" - ;; Honor `#:configure-flags'. - (("(configure_cmd = .*)\n" _ m) - (format #f "~a + [~a]~%" - m (apply string-append - (map (lambda (flag) - (format #f "\"~a\"," flag)) - (append configure-flags - '("-DBUILD_SHARED_LIBS=OFF")))) - )))))) - (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 '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 catch2 - melkor - python-wrapper - python-tomli)) - (inputs - (list boost-leaf - frozen - mbedtls-apache - nlohmann-json - pybind11 - spdlog - tcb-span - utfcpp)) - (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 -and abstract ELF, PE and MachO formats.") - (license license:asl2.0))) - (define-public python-eris (package (name "python-eris") @@ -33592,7 +33477,7 @@ (define-public shrinkwrap python-poetry-core python-pypa-build python-pytest)) - (inputs (list `(,python-lief "python") python-sh)) + (inputs (list `(,lief "python") python-sh)) (home-page "https://github.com/fzakaria/shrinkwrap") (synopsis "Emboss needed dependencies on the top level executable") (description -- 2.41.0