From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id xgjsNJY0LWEfvQAAgWs5BA (envelope-from ) for ; Mon, 30 Aug 2021 21:42:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SMn1L5Y0LWEHewAAB5/wlQ (envelope-from ) for ; Mon, 30 Aug 2021 19:42:14 +0000 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 9C147366B for ; Mon, 30 Aug 2021 21:42:14 +0200 (CEST) Received: from localhost ([::1]:36060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKnAb-0000Sp-LT for larch@yhetil.org; Mon, 30 Aug 2021 15:42:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKn4d-0007gs-9B for guix-patches@gnu.org; Mon, 30 Aug 2021 15:36:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mKn4c-00027p-Un for guix-patches@gnu.org; Mon, 30 Aug 2021 15:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mKn4c-0000nw-Q6 for guix-patches@gnu.org; Mon, 30 Aug 2021 15:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50283] [PATCH v1 1/2] gnu: Add libx86emu. References: <2c8e9e9d-c492-ea37-3414-c38e8bc4b2a1@raghavgururajan.name> In-Reply-To: <2c8e9e9d-c492-ea37-3414-c38e8bc4b2a1@raghavgururajan.name> Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Aug 2021 19:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50283 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 50283@debbugs.gnu.org Cc: Raghav Gururajan Received: via spool by 50283-submit@debbugs.gnu.org id=B50283.16303521573066 (code B ref 50283); Mon, 30 Aug 2021 19:36:02 +0000 Received: (at 50283) by debbugs.gnu.org; 30 Aug 2021 19:35:57 +0000 Received: from localhost ([127.0.0.1]:60338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKn4T-0000nE-5K for submit@debbugs.gnu.org; Mon, 30 Aug 2021 15:35:57 -0400 Received: from out2.migadu.com ([188.165.223.204]:45581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKn4N-0000mu-2q for 50283@debbugs.gnu.org; Mon, 30 Aug 2021 15:35:51 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1630352145; 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; bh=vGVwNgdaBrK0LltdUDyY/MIdRwKQgMnNlgncaYv6xmk=; b=hkbiy26KdhGNPGvjAZz8SbH5OR6hNjeKJyk96tG4oEM862GuDuvgXTbDMcegBxrcRbAHXg dzYyfKVk4DUzuEwAIuAbFrP2VdLjpCSO1HhUKGApjZ5ilyLoMiwpwPPMgVHRmYGg5V2SOd jZ21svFkY11z6rg1s3PeIOz47y/VB+w7NaF600fBt3Vh9PRSal+BeMV4tefbUNxW++qBkD Jltia6vxsdIiCYSiF7SgeyH27X/bNv0XEC45HsmO8Ce/ElZdGACTC4goyr73CR9FlVF86A wHsQ2OmD1rB8KTrUg6OsssnZe8gZns0NIQIiFQ0nocJXsuytNkP5wkRbpBj3gA== Date: Mon, 30 Aug 2021 15:35:24 -0400 Message-Id: <20210830193525.2288-1-rg@raghavgururajan.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Auth-User: rg@raghavgururajan.name 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches From: Raghav Gururajan via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: 9C147366B X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: eQ4ZLN/vw2AO * gnu/packages/virtualization.scm (libx86emu): New variable. --- gnu/packages/virtualization.scm | 52 +++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index e952c009b5..6dd5127bc6 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -130,6 +130,58 @@ #:use-module (srfi srfi-26) #:use-module (ice-9 match)) +(define-public libx86emu + (package + (name "libx86emu") + (version "3.1") + (home-page "https://github.com/wfeldt/libx86emu") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "104xqc6nj9rpi7knl3dfqvasf087hlz2n5yndb1iycw35a6j509b")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (include (string-append out "/include")) + (lib (string-append out "/lib"))) + ;; Remove unnecessary variables and + ;; correct the values of version and prefix. + (substitute* (find-files "." "Makefile") + (("GIT2LOG.*=.*$") "") + (("GITDEPS.*=.*$") "") + (("VERSION.*=.*$") + (string-append "VERSION := " + ,version "\n")) + (("BRANCH.*=.*$") "") + (("PREFIX.*=.*$") + (string-append "PREFIX := " out "\n")) + (("MAJOR_VERSION.*=.*$") + (string-append "MAJOR_VERSION := " + ,(version-major version) "\n")) + (("LIBDIR.*=.*$") + (string-append "LIBDIR = " lib "\n")) + (("/usr/include") include))))) + (delete 'configure)))) ; no configure script + (native-inputs + `(("nasm" ,nasm) + ("perl" ,perl))) + (synopsis "ISA x86 emulation library") + (description "Libx86emu is a small library to emulate x86 instructions. The +focus here is not a complete emulation but to cover enough for typical +firmware blobs.") + (license license:isc))) + (define (qemu-patch commit file-name sha256-bv) "Return an origin for COMMIT." (origin -- 2.33.0