From patchwork Mon Mar 21 21:00:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Artyom V. Poptsov" X-Patchwork-Id: 37989 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 19F5C27BBEA; Mon, 21 Mar 2022 21:02:15 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 7815B27BBE9 for ; Mon, 21 Mar 2022 21:02:14 +0000 (GMT) Received: from localhost ([::1]:52762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWPAL-0000ak-Ls for patchwork@mira.cbaines.net; Mon, 21 Mar 2022 17:02:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWPAA-0000aO-W7 for guix-patches@gnu.org; Mon, 21 Mar 2022 17:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWPAA-0005Lh-K6 for guix-patches@gnu.org; Mon, 21 Mar 2022 17:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nWPAA-0001z1-HA for guix-patches@gnu.org; Mon, 21 Mar 2022 17:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54482] [PATCH] gnu: Add simavr Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Mar 2022 21:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54482 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 54482@debbugs.gnu.org Received: via spool by 54482-submit@debbugs.gnu.org id=B54482.16478964877575 (code B ref 54482); Mon, 21 Mar 2022 21:02:02 +0000 Received: (at 54482) by debbugs.gnu.org; 21 Mar 2022 21:01:27 +0000 Received: from localhost ([127.0.0.1]:38553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWP9Q-0001xo-6M for submit@debbugs.gnu.org; Mon, 21 Mar 2022 17:01:27 -0400 Received: from mail-lf1-f51.google.com ([209.85.167.51]:40874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWP9N-0001xa-Mf for 54482@debbugs.gnu.org; Mon, 21 Mar 2022 17:01:14 -0400 Received: by mail-lf1-f51.google.com with SMTP id t25so26597957lfg.7 for <54482@debbugs.gnu.org>; Mon, 21 Mar 2022 14:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=paP/fvSgrdFENEAUpWnzOlFfZTBzCglMRhMNg4NrJyY=; b=TRCiY2N4vqrHg8WLZ7IVc3kQ41pR2AF/ODHq7gkGoapcpuIzahZS6kusJZzFbK6otz UuhIXN8kNUV9Jv6cvLTknxxpCVJCOvb5Ht4fOi/HdUQyByGZhKN89NXZB0wB7EGDPZZs gEKRX6c4J4+I/7byvuEdIg7/9AwCI2w4s+oMAik4LFakYJUCymmPB6eDkcjT87fBFvra KpsgcihMh9w9NEnyKnNAo50/H20RkJtdddrbqxcOFU416v2PCBuUormCadZg0EYR4DM8 xZmuyIfxP3P4kmfBHFIwxacVjQmvalqCcTuqW/WeXqAlj+OKOWeVjEkFoxkD70NX6NIR pMwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=paP/fvSgrdFENEAUpWnzOlFfZTBzCglMRhMNg4NrJyY=; b=qNqGcECdNx2CQ0+UZwRmP+FIRTzU0jDLqwsuvluTbUjuN6TQrzAOAmr7MRbyn35TzK AMyioE1me9rqfG5ldirRVfYu1g649lQGD1nPSd7DLQrkP7i3ISyUN499p5TinB9BXVCf YUB+BoNUMLuhfSfwNAeG6IRkjFyLE4Q6WbdZ7xuLog45snsUvwOITm7fInTKysO94IB4 FxksVxpIJSkOmE35xAQxNqZVfsuaJLvasFuc75YiIDqL3hGWoGGrPVs7L+lnrXRItrsU oEmgHyw57+/CCcpSftUvpjAO/T5C7tG2QIcA/wqdcRUXoPJMaU5hGMEZjw/QKHVyNCEX Bv6Q== X-Gm-Message-State: AOAM532T8D/MTWsC50muDBoocG1LFZ1xGI7inZ7suffqHYkD1GPaHit4 A8s0MM+nDhu+hqEXEvMtTYg3f3oI9hs= X-Google-Smtp-Source: ABdhPJzXAoJc+9rabXXJSCNST8tpppT067O83YSdbdZ8Ox1V4CmFmULgpUtTdU46wCkXRiZsmZvjSA== X-Received: by 2002:a05:6512:2614:b0:445:777d:3530 with SMTP id bt20-20020a056512261400b00445777d3530mr15905192lfb.647.1647896467153; Mon, 21 Mar 2022 14:01:07 -0700 (PDT) Received: from elephant ([5.164.192.110]) by smtp.gmail.com with ESMTPSA id i2-20020a2e8082000000b002497e36acffsm686776ljg.78.2022.03.21.14.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 14:01:06 -0700 (PDT) From: "Artyom V. Poptsov" References: <878rt4shrc.fsf@gmail.com> Date: Tue, 22 Mar 2022 00:00:56 +0300 In-Reply-To: (Maxime Devos's message of "Sun, 20 Mar 2022 18:30:22 +0100") Message-ID: <874k3rrpfb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) 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" X-getmail-retrieved-from-mailbox: Patches Hello Maxime, thanks for the feedback! Here's the updated version of the patch. I decided to move 'simavr' package to a new 'avr-xyz' module. - Artyom From 2ea020a319f5c2fa27662a8e505a1d4b8e916ea9 Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Sat, 19 Mar 2022 23:39:54 +0300 Subject: [PATCH] gnu: avr-xyz: Add simavr * gnu/packages/avr-xyz.scm: New module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add 'avr-xyz.scm'. --- gnu/local.mk | 2 + gnu/packages/avr-xyz.scm | 97 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 gnu/packages/avr-xyz.scm diff --git a/gnu/local.mk b/gnu/local.mk index 484757b207..edb8f6a576 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -49,6 +49,7 @@ # Copyright © 2021 Simon Tournier # Copyright © 2022 Daniel Meißner # Copyright © 2022 Remco van 't Veer +# Copyright © 2022 Artyom V. Poptsov # # This file is part of GNU Guix. # @@ -119,6 +120,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/autotools.scm \ %D%/packages/avahi.scm \ %D%/packages/avr.scm \ + %D%/packages/avr-xyz.scm \ %D%/packages/axoloti.scm \ %D%/packages/backup.scm \ %D%/packages/base.scm \ diff --git a/gnu/packages/avr-xyz.scm b/gnu/packages/avr-xyz.scm new file mode 100644 index 0000000000..800f8af21e --- /dev/null +++ b/gnu/packages/avr-xyz.scm @@ -0,0 +1,97 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Artyom V. Poptsov +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages avr-xyz) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages avr) + #:use-module (gnu packages elf) + #:use-module (gnu packages gl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages version-control) + #:use-module (gnu packages ruby)) + +(define-public simavr + (package + (name "simavr") + (version "1.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/buserror/simavr") + (commit (string-append "v" version)))) + (sha256 + (base32 "0njz03lkw5374x1lxrq08irz4b86lzj2hibx46ssp7zv712pq55q")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f + #:modules '((guix build gnu-build-system) + (guix build utils)) + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (replace 'check + (lambda* (#:key tests? outputs #:allow-other-keys) + (when tests? + (invoke "make" + "-C" + "tests" + (string-append "CC=" #$(cc-for-target)) + "RELEASE=1" + "run_tests"))))) + #:make-flags #~(list (string-append "CC=" #$(cc-for-target)) + "RELEASE=1" + (string-append "PREFIX=" #$output) + (string-append "DESTDIR=" #$output)))) + (propagated-inputs + (list avr-toolchain)) + (native-inputs + (list autoconf + which + git + automake + pkg-config + ncurses + ruby)) + (inputs + (list bash-minimal libelf freeglut)) + (home-page "https://github.com/buserror/simavr") + (synopsis "Lean, mean and hackable AVR simulator for GNU/Linux and OSX") + (description + "simavr is a new AVR simulator for GNU/Linux, or any platform that uses +@command{avr-gcc}. It uses avr-gcc's own register definition to simplify +creating new targets for supported AVR devices. The core was made to be small +and compact, and hackable so allow quick prototyping of an AVR project. The +AVR core is now stable for use with parts with <= 128KB flash, and with +preliminary support for the bigger parts. The simulator loads ELF files +directly, and there is even a way to specify simulation parameterps directly +in the emulated code using an @code{.elf} section. You can also load +multipart HEX files.") + (license license:gpl3))) -- 2.25.1