From patchwork Wed Mar 19 17:00:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 40446 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 CFD3927BBE9; Wed, 19 Mar 2025 17:04:40 +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=-5.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, PP_MIME_FAKE_ASCII_TEXT,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 4A84F27BBE2 for ; Wed, 19 Mar 2025 17:04:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuwpu-0006Qk-U4; Wed, 19 Mar 2025 13:04:11 -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 1tuwpp-0006ET-An for guix-patches@gnu.org; Wed, 19 Mar 2025 13:04:07 -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 1tuwpo-0007wx-Sp for guix-patches@gnu.org; Wed, 19 Mar 2025 13:04:05 -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:Date:References:In-Reply-To:From:To:Subject; bh=L+Q1NDba/YWiYpnNZ9KBLgTk9U1gvIk8MuTXs168A98=; b=hRl8cwBQLk639oBFkI43/BHHKkBX2tJqcGA5f/KHBhbkYQ3Rh6QkiBpmmegasbfMgNOvqomKqDMS2yBq0y2q9yGSzxjMqdcXPwWNAiCYEeayecsrKPrT5XsUEHT2vjmECr6pFvok4TQqMaMFKf++ItYCW07T/Nrzcidjz0EhEXYoPIGm8Qwg2gU76tjVRFcyA7x/x/XVfyOFy6X4tIcinI1XFgVGBI+9zjeNgJPD8qPe4GKNtykzNaqWIXwzSjSMKUrl4Y6YKAB+ei0pcedtvmSWX+PpRSLaQqjqYCgu6c99Fnootp7A0w0UB0U7V72XE4k5saqgsyo3jVekvkeTJQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tuwpo-0005mM-NN for guix-patches@gnu.org; Wed, 19 Mar 2025 13:04:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#67755] [PATCH v6 7/8] gnu: Add imhex-pattern-language. Resent-From: "Sergio Pastor =?utf-8?b?UMOpcmV6?= " Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Mar 2025 17:04:04 +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?= Received: via spool by 67755-submit@debbugs.gnu.org id=B67755.174240381322126 (code B ref 67755); Wed, 19 Mar 2025 17:04:04 +0000 Received: (at 67755) by debbugs.gnu.org; 19 Mar 2025 17:03:33 +0000 Received: from localhost ([127.0.0.1]:52898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tuwpH-0005kn-Vp for submit@debbugs.gnu.org; Wed, 19 Mar 2025 13:03:33 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:44417) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tuwoq-0005h2-GD for 67755@debbugs.gnu.org; Wed, 19 Mar 2025 13:03:09 -0400 Received: by mail-wr1-x442.google.com with SMTP id ffacd0b85a97d-39143200ddaso4560521f8f.1 for <67755@debbugs.gnu.org>; Wed, 19 Mar 2025 10:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742403778; x=1743008578; darn=debbugs.gnu.org; h=mime-version:cc:to:subject:date:references:in-reply-to:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=L+Q1NDba/YWiYpnNZ9KBLgTk9U1gvIk8MuTXs168A98=; b=Ky240sOxCnMMnvGItLSdchCffkobkbDiEcGEVzwT7Ia3ScmTFOs9OWWWkYJ5yOnMFy jo/6qrHbOU47NFhOYy+b2IdXvQT6WWmVAu3XZnKkuPOWfEdIdLn19tiHGVRqBUjNRnzm G0+Pc3wwWF+iRBiL17PoYqNGLIgRjZvSi5PktYfS1UTWGKC35uReQEY78EV0BYVrVy6I qZnrwAGmWGBTIQ22CDNLrJWQ2FinHBblXatVw/67G6Wi2ANVe673qYbctnDI2KAKWpdS /Gw5nRjMdonCFgqriJjQ7f5K25z2V+bG9CYH+UUcOybeX3iFXEm3vOs5n9uT2A9x47Bt K8pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742403778; x=1743008578; h=mime-version:cc:to:subject:date:references:in-reply-to:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=L+Q1NDba/YWiYpnNZ9KBLgTk9U1gvIk8MuTXs168A98=; b=csVXihh0aiwpvlDdZABuZpx6swnZSMrCBC9lOZqapsT/AWLRm+0gHu+2CsDJ9TJMxT Q2eK9VSmlZNoqTj8ig0EjPGq7BJgSfXd7YpIswLcxLxlD3iL8HDijvR/LAOGmWre0TBR PeZGOkH4Fau+0rrkW1/uO+CFYIjout6mWcSB1bVyHL0TeFjd0t3BcmRdlO2oBKAK9snR 8RJZk4+dgKiznwN1z5zN2x9ATC5yLT9Cieb3FhFcGug/Vtoy3dPw6BV7IX7kCICLhQoU tzehGRoqAPe4xpupPwQqQfKNPjgW+XzgNeectKS94a00SZ9+aU7uVZD1cyXd9Qj8+FWM 4ZoQ== X-Gm-Message-State: AOJu0YzsdNvYasOG55uO0OHZK9OslbAMnD1QAe8aEGXG43FXnHLRg830 0OV4m0yhJEv+hmcOuKo4ZFFz2f/Gkph55fTGVn4jqIEkXnO0hqcNc+Gm3CQfoMo= X-Gm-Gg: ASbGncvSvPy8wTAa/YZwj48lOenxnLuUDr7+b+S4oFphz1ri2NZ5/LbnLTEOYmk6be3 vTG3EJ1XEq+8WX74JlzxG/qG28SlQfH0JX505QKQdM6PsFjtuGbXEXNCqaRgXKanhjsEFnbKCB7 PH4k/UnSLwtmM2MboFAqjYkmwuMRcCqa5h1KIqLEqXME4YIZ0oE5BHYB2rawBM0WUoJ1fPHyspV RSvsZAaSKrYqXbJGqYm5vMUx+4XNVS1CrGUyWUvDDJ+cAc5PNexITy2o79S5rGTZULLYLrPCcGW fXvZtSkdjfgpMQNScBEtdblWa/m4M3F9B9UmmLLqa/w6adftrc3QF9i7vQJoDO3Ki9iaxveg6N4 ec40fSo9FVfCs0Xb73DQ1 X-Google-Smtp-Source: AGHT+IFotv7fpTnWSgFU2JP/NoOhlgqFyWX2TdktP/ITHjQLI/ZW2+PWhUpsp6k89nySLGlyUqXXbg== X-Received: by 2002:a05:6000:1848:b0:391:39fb:59c8 with SMTP id ffacd0b85a97d-399739c8d2bmr3355649f8f.25.1742403776686; Wed, 19 Mar 2025 10:02:56 -0700 (PDT) Received: from lumine.fritz.box (85-127-114-32.dsl.dynamic.surfer.at. [85.127.114.32]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-395c7df3419sm21049661f8f.9.2025.03.19.10.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Mar 2025 10:02:56 -0700 (PDT) From: "Sergio Pastor =?utf-8?b?UMOpcmV6?= " X-Google-Original-From: Sergio Pastor =?utf-8?b?UMOpcmV6?= Message-ID: <3e69e80e8355c88c21debc4c63c3abc04633f042.1742403600.git.liliana.prikler@gmail.com> In-Reply-To: References: Date: Wed, 19 Mar 2025 18:00:08 +0100 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 * gnu/packages/hexedit.scm (imhex-pattern-language): New variable. Change-Id: I641bebed0bea9b2c8aca87f54d0fb457064a07d7 --- Changes from v5: * Use system fmt (fmt-11). * Use a keep list rather than a delete list. I think the header-only libraries should be provided as regular inputs, but haven't done that yet. gnu/packages/hexedit.scm | 71 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/gnu/packages/hexedit.scm b/gnu/packages/hexedit.scm index 15bf7db8773..ed30e882847 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,23 @@ (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 (gnu packages pretty-print) #: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 +144,68 @@ (define-public ht (home-page "https://hte.sourceforge.net/") (license license:gpl2))) +;; NOTE: The install target of imhex-pattern-language falls short in a few areas +;; that make this package difficult to use outside of ImHex. Neither header +;; files nor package information (using e.g. pkg-config or CMake files) are +;; currently available. +(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")) + (modules '((guix build utils) (ice-9 ftw))) + (snippet #~(begin + ;; 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" + (for-each + (lambda (dir) + (unless (member dir '("." ".." "libwolv" "throwing_ptr")) + (delete-file-recursively dir))) + (scandir "."))))))) + (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" + "-DUSE_SYSTEM_FMT=ON") + #: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 fmt-11 nlohmann-json python)) + (home-page "https://imhex.werwolv.net") + (synopsis "Pattern language used by the ImHex Hex Editor") + (description "This package provides a C-like domain-specific language used +for specifying patterns in the ImHex Hex Editor.") + (license license:lgpl2.1))) + (define-public bvi (package (name "bvi")