From patchwork Tue Mar 11 19:15:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Sergio_Pastor_P=C3=A9rez?= X-Patchwork-Id: 40107 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5F77F27BBEA; Tue, 11 Mar 2025 19:18:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B8CA627BBE2 for ; Tue, 11 Mar 2025 19:18:54 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ts57K-0001pW-RN; Tue, 11 Mar 2025 15:18:18 -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 1ts579-0001mC-O1 for guix-patches@gnu.org; Tue, 11 Mar 2025 15:18:10 -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 1ts577-0002Mh-P2 for guix-patches@gnu.org; Tue, 11 Mar 2025 15:18:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=HMY/Te1Tok4lI2kVbgIXt1uASSl7Gv9VV0sAtnDKHq8=; b=PATjN2dboHZip91F3W/PIEjCOzARrz6VVaS/RRmHPoluEiTAvu3OgG0z/I96uTh7Jrv8qjh0LEKBHRtDhDPO52gfFpdziIHhWWx49b9FsI9cdTRxd9xK5C3phjW3kuzddCnPlrB0RF9RoviUDctCwMjFsDC0Rmu6GoVBb4vQZ+v9tbhcSFXgpk1GB9duBWX6J6j3+f8ZjWwiXaJUAYgwa1mXcRwknMsD6C0TZ3fSaUBdy/Px4rHNNb/Xnj/5/lI35/OkQiuTvPHYrC9aVCquNElPwoXXuHavQPTzLkdSPkvfY9TjWDDzn9PZgHPXHM69kgCEOoBFLHINg+g7AfeHCg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ts577-0000IG-Im; Tue, 11 Mar 2025 15:18:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#67755] [PATCH v5 8/9] gnu: Add imhex-pattern-language. Resent-From: Sergio Pastor =?utf-8?b?UMOpcmV6?= Original-Sender: "Debbugs-submit" Resent-CC: sergio.pastorperez@outlook.es, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Tue, 11 Mar 2025 19:18:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67755 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67755@debbugs.gnu.org Cc: Sergio Pastor =?utf-8?b?UMOpcmV6?= , Sergio Pastor =?utf-8?b?UMOpcmV6?= , jgart X-Debbugs-Original-Xcc: Sergio Pastor =?utf-8?b?UMOpcmV6?= , jgart Received: via spool by 67755-submit@debbugs.gnu.org id=B67755.17417206661023 (code B ref 67755); Tue, 11 Mar 2025 19:18:05 +0000 Received: (at 67755) by debbugs.gnu.org; 11 Mar 2025 19:17:46 +0000 Received: from localhost ([127.0.0.1]:45744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ts56n-0000GL-Ke for submit@debbugs.gnu.org; Tue, 11 Mar 2025 15:17:46 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:53327) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1ts56U-0000Ee-SK for 67755@debbugs.gnu.org; Tue, 11 Mar 2025 15:17:28 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-390cf7458f5so5637549f8f.2 for <67755@debbugs.gnu.org>; Tue, 11 Mar 2025 12:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741720640; x=1742325440; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HMY/Te1Tok4lI2kVbgIXt1uASSl7Gv9VV0sAtnDKHq8=; b=gGNGXsg3pqE+I06ql/xGTW58u7xWCbT3waktC3EkVk/dBlFXN4WYAmgXKcBOVrJH8K +OYIQH1TijRpmEmF94n5ssVgSO9eaJmHzzvHdLF01TClCLXpXzY9oGgpnNSEME+nTUM1 pf42w7zIHeWrzY0qGzshhvM3bWYI9h2lYn1AP2CW6eV69/gxCbc2p68XaiFORVHweUcH QLgxetNMZTiN8Tek76nnkEVRmEuLYb3v/jRivCuRQmsmXcmoIC802Y8YfXcGC2pIbXjm 3f0X9zGN/hG80QcfJYquuBu3KjL5MvZV9h890wjrp6jVLk/HBLyK4GPhX6Lac1Y7nH6i E9zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741720640; x=1742325440; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HMY/Te1Tok4lI2kVbgIXt1uASSl7Gv9VV0sAtnDKHq8=; b=QKkJFFNvDezIlXqM7eWV/lkX3Us5ipQSK/vaGrFkjSSxXzisBC0wL5C7KhRcHGIhIX Otk3Hdi+h94xzmADesKLE+/hlJRtWM64oIqT8nhfzhIcjuC7IRs4McaC0ONxxNvykJdf 0056BBCP8K4pY5PHmthrf4S35SA9T4x2NiHCin42crDa2Uv5mds33I9xwV2a4NW8RfZM /heflsxxn8Rkns/+71lNrr3jy0f1d86ZtTPAQAY1+yLrZRY/PNeSll+uNTkQZt72MbLk lSV/WRJeo9KGmpFFSYrs6R76Uj/3A287ZcqyFtiBHA4YbgyCefsmkDEu9Riq8Jl4LNl8 i2YQ== X-Gm-Message-State: AOJu0YwHClIpjjPOBrPGOlQ9xubUqBLC8zszTfz64vg23wLgbLMYShLF 8VyYqerWP4wdqUiD8FUdeOYXp8QTyzUMGr/MnOPmsXUqYRlHmPguke/oew== X-Gm-Gg: ASbGncurJS81yL58OYjGF9LkHlj4QEL7WPJNT2sXFRyHR6sjT9GaGb+YFZ+YaF0I/Sf r/eCJ6xSzUsipb/hjzJY7HJL2StRd5/TujZFzzDB7VVMzJlHG6d5Z4L4eT3cLKBsHujqxX/2NIu BrjEYWoR1hvMBLtLQwUvQZ0MXr6v86UzsCcQQrpjoR5zhjck3TKcL86rZi6pLr0mfR92CzLX8Di EpNkpDWRsJWbf6rSxJvTVZOgvZk7pc/jGioDs3/LQdiUvq2n4NG58GcZ2NJiwfevE/4D+gEq1UV 5WJpa/757v4Z53rdsuJh05ej6IgwW8TvXafrwQWLvLLXIs8h0UR/WbTbBg== X-Google-Smtp-Source: AGHT+IGtv83U3mZ8GxbV+afgOSp0odt0MtJU6ui6XMEuugMQRu3/St+pDDBQ5EDLmt5pEmR+ZoHqvg== X-Received: by 2002:a05:6000:1acc:b0:392:bf8:fc96 with SMTP id ffacd0b85a97d-3920bf8fccfmr6022526f8f.4.1741720640022; Tue, 11 Mar 2025 12:17:20 -0700 (PDT) Received: from localhost ([2a0c:5a85:d50e:8e00:c7d4:a3dc:7540:dcad]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ce720f93bsm128497305e9.25.2025.03.11.12.17.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Mar 2025 12:17:19 -0700 (PDT) From: Sergio Pastor =?utf-8?b?UMOpcmV6?= Date: Tue, 11 Mar 2025 20:15:24 +0100 Message-ID: <5ed489950e0cfd7f368ebf073f01da8b1d8c8c3c.1741720525.git.sergio.pastorperez@gmail.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <5af801299bc13936ebbd6d1cbc5076dc5f11b463.1741720525.git.sergio.pastorperez@gmail.com> References: <5af801299bc13936ebbd6d1cbc5076dc5f11b463.1741720525.git.sergio.pastorperez@gmail.com> MIME-Version: 1.0 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Sergio Pastor Pérez * gnu/packages/hexedit.scm (imhex-pattern-language): New variable. Change-Id: I641bebed0bea9b2c8aca87f54d0fb457064a07d7 --- gnu/packages/hexedit.scm | 74 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/gnu/packages/hexedit.scm b/gnu/packages/hexedit.scm index 15bf7db877..2eab13e239 100644 --- a/gnu/packages/hexedit.scm +++ b/gnu/packages/hexedit.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018, 2020, 2022 Tobias Geerinckx-Rice ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2024 Artyom V. Poptsov +;;; Copyright © 2025 Sergio Pastor Pérez ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,17 +23,22 @@ (define-module (gnu packages hexedit) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages man) + #:use-module (gnu packages cpp) + #:use-module (gnu packages gcc) + #:use-module (gnu packages python) #:use-module (gnu packages ncurses) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix gexp) #:use-module (guix utils) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix build-system cmake)) (define-public hexedit (package @@ -137,6 +143,72 @@ (define-public ht (home-page "https://hte.sourceforge.net/") (license license:gpl2))) +;; NOTE: `imhex-pattern-language' should improve it's build system to be used +;; easily outside of ImHex. It should update it's shared library install +;; target to deploy the header files and it should create the pertinent +;; 'libpl-config.cmake' and 'libpl-config-version.cmake' files. +(define-public imhex-pattern-language + (package + (name "imhex-pattern-language") + (version "1.37.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/WerWolv/PatternLanguage") + (commit (string-append "ImHex-v" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 "13mlbclg2r3axv6vz4dsyry5azc6xavcbdkvwan6zyaq9ngk7r3r")) + (snippet #~(begin + (use-modules (guix build utils)) + (define (delete-files-from-list-recursively . args) + (for-each (lambda (path) + (delete-file-recursively path)) args)) + ;; NOTE: the `throwing-ptr' hasn't been updated in 6 years + ;; and the testsuite expects to use an outdated version of + ;; Conan, since this library if not interesting to have it + ;; in Guix it will remain bundled. + ;; NOTE: `libwolf' does not have an install target. Until + ;; the maintainers create one, it will be bundled. + (with-directory-excursion "external" + (delete-files-from-list-recursively "nlohmann_json" + "cli11")))))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags ''("-DLIBPL_SHARED_LIBRARY=ON" + "-DLIBPL_ENABLE_TESTS=ON" + + "-DUSE_SYSTEM_NLOHMANN_JSON=ON" + "-DUSE_SYSTEM_CLI11=ON" + ;; NOTE: the `fmt' package is vendored since it + ;; needs a specific commit. Until there is a + ;; compatible release, there is no interest in + ;; creating a Guix package for it. + "-DUSE_SYSTEM_FMT=OFF") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-rel-paths + (lambda _ + (substitute* "tests/include/test_patterns/test_pattern_format.hpp" + (("../tests/files/export/") + "../source/tests/files/export/")))) + (add-after 'build 'build-tests + (lambda _ + (invoke "make" "pattern_language_tests" "plcli"))) + (add-before 'check 'plcli-integration-tests + (lambda _ + (with-directory-excursion "../source" + (invoke "python3" "tests/integration/integration.py" + "../build/cli/plcli"))))))) + (native-inputs (list cli11 gcc-14 nlohmann-json python)) + (home-page "https://imhex.werwolv.net") + (synopsis "The Pattern Language used by the ImHex Hex Editor") + (description "The Pattern Language used by the ImHex Hex Editor.") + (license license:lgpl2.1))) + (define-public bvi (package (name "bvi")