From patchwork Tue Sep 26 19:04:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 54322 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 EEEC727BBE2; Tue, 26 Sep 2023 20:39:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, 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 A606D27BBE9 for ; Tue, 26 Sep 2023 20:39:34 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlDtc-0006qF-Nr; Tue, 26 Sep 2023 15:39:00 -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 1qlDtW-0006gF-FJ for guix-patches@gnu.org; Tue, 26 Sep 2023 15:38:54 -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 1qlDtS-0006MG-QC for guix-patches@gnu.org; Tue, 26 Sep 2023 15:38:52 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qlDtf-00011K-Ti for guix-patches@gnu.org; Tue, 26 Sep 2023 15:39:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66217] [PATCH 06/22] gnu: Add lufa. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Sep 2023 19:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66217 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66217@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 66217-submit@debbugs.gnu.org id=B66217.16957571133721 (code B ref 66217); Tue, 26 Sep 2023 19:39:03 +0000 Received: (at 66217) by debbugs.gnu.org; 26 Sep 2023 19:38:33 +0000 Received: from localhost ([127.0.0.1]:49822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlDtA-0000xr-TK for submit@debbugs.gnu.org; Tue, 26 Sep 2023 15:38:33 -0400 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]:57473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlDss-0000uu-C4 for 66217@debbugs.gnu.org; Tue, 26 Sep 2023 15:38:15 -0400 Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-773ac11de71so597289185a.2 for <66217@debbugs.gnu.org>; Tue, 26 Sep 2023 12:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695757075; x=1696361875; 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=RlGqm//yDOTpso3efW0OU0tcClx3e5S3NuehTudLxoU=; b=Bsv0JmDCxnpoX58M9S/l4G3vvc01TY6ZMqL6o6PLdtYzltN1ODTSbHX5dpJFOEnHD3 t6ktaFqWvYilnV96nLJaKOwKyLkXs6h+EkDDeT+RH8vGGHCZXYKf+ePjyyWAkS7AQaaj ZotqwHiGzd7GPLDUVdGhuaI1mWAsAncUaMSySXp7Twm9MqgHXxnIEqLM6nKibq3yHL1P GsjYSPvolnTkNXy0T1yccCUWmuHZwCpWU+bSpwH2x1gUdw/jWX2gjU6LDY6DAi+Hh5ZD Iiv2yP6tEkX/Z+UiNocP/e+muj5QV94J+bcbKZEYrHdCN4egdelkfhKqdamMZpZI2pHd MTFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695757075; x=1696361875; 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=RlGqm//yDOTpso3efW0OU0tcClx3e5S3NuehTudLxoU=; b=XAXdgsM20N2NYbTAu9dDOSJdqDIJbxLu77PTpW+qyt/Fo0MTHQ5rEMZJUSL9NseZgz 2fRbJVtfNlDrVgI+J7OAdV43fulyAcxF3aJKs5vMExjpWhxpnhmEccdmZSkA+MDtJmVs 6VUlOumlyZ7kqSNYcgriFlPJcym9scvuKSZr5WYhIPBvlZjz4ndDKw5B6Hr9qOcEB+xo l3d/prM+b0w6h2WbmjRlFrFuTUe+EMW9leJvrWN83zSfalQ2SsYFjmsNogI90J9l03ou aRWFtP/ppzM5vEYiPHCZwEnuztt9WPAIIslCzqImIZfrq9YymHkwngDoSLGVIUJWSATo Sz6w== X-Gm-Message-State: AOJu0Yw1jmG/7jzRzujjz/t0HsPRmz3q75dL9GJGgzRtSuhJssKrT4i/ arr0rtmjlLs+JRToeuNvlEFFNhksWEI= X-Google-Smtp-Source: AGHT+IH1Wtw7pFYmdjxVvn2AvZ9oPkO2U1cIlvkl4XU6ioLMEmoJ8S0s1R2x2whcKdOOXrtW1exUOQ== X-Received: by 2002:a05:620a:24d3:b0:774:38cc:61b0 with SMTP id m19-20020a05620a24d300b0077438cc61b0mr5619988qkn.32.1695757075425; Tue, 26 Sep 2023 12:37:55 -0700 (PDT) Received: from localhost.localdomain (dsl-10-130-229.b2b2c.ca. [72.10.130.229]) by smtp.gmail.com with ESMTPSA id a13-20020a05620a16cd00b0076cbcf8ad3bsm2887595qkn.55.2023.09.26.12.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 12:37:55 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 26 Sep 2023 15:04:29 -0400 Message-ID: <21857466a2ff7222d1f4aedbb6dadb61e44307ef.1695754731.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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/avr-xyz.scm (lufa): New variable. --- gnu/packages/avr-xyz.scm | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/gnu/packages/avr-xyz.scm b/gnu/packages/avr-xyz.scm index e8844b8d438..e0db2e3a0c7 100644 --- a/gnu/packages/avr-xyz.scm +++ b/gnu/packages/avr-xyz.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Artyom V. Poptsov +;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -29,6 +30,7 @@ (define-module (gnu packages avr-xyz) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages avr) + #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages gl) #:use-module (gnu packages pkg-config) @@ -95,3 +97,84 @@ (define-public simavr in the emulated code using an @code{.elf} section. You can also load multipart HEX files.") (license license:gpl3))) + +(define-public lufa + (package + (name "lufa") + (version "210130") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/abcminiuser/lufa") + (commit (string-append "LUFA-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0ylr7qsiikcy827k18zj1vdzf0kb8hb0gjmifd75y8krkhhar49g")))) + (outputs '("bootloaders" "demos" "projects" "doc")) + (build-system gnu-build-system) + (arguments + ;; There are tests, but even LUFA's own CI doesn't run them (they are + ;; only built). + (list + #:tests? #f + #:modules '((guix build gnu-build-system) + (guix build utils) + (ice-9 match) + (srfi srfi-26)) + #:make-flags + #~(list (string-append "SHELL="(search-input-file %build-inputs + "bin/sh"))) + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'build-documentation + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "-j" (number->string + (or (parallel-job-count) + 1)) + "doxygen" + ;; Ignore errors (see: + ;; https://github.com/abcminiuser/lufa/issues/90). + "-i" + make-flags))) + (replace 'install + ;; There is no default install target as the library is + ;; intended to be integrated in source form in a + ;; project. Install the example projects and demos + ;; binaries as well as the documentation. + (lambda _ + (let ((doc (string-append #$output:doc + "/share/doc/lufa/")) + (html-dirs (find-files "." "^html$" + #:directories? #t))) + (for-each (cut install-file <> #$output:bootloaders) + (find-files "Bootloaders" "\\.hex$")) + (for-each (cut install-file <> #$output:demos) + (find-files "Demos" "\\.hex$")) + (for-each (cut install-file <> #$output:projects) + (find-files "Projects" "\\.hex$")) + ;; Install Doxygen generated HTML documentation. + (for-each + (lambda (html) + (let* ((suffix "Documentation/html") + (l (string-length suffix)) + (dest (string-append + doc + (string-drop + (if (string-suffix? suffix html) + (string-drop-right html l) + (error "unexpected path" html)) + 1)))) ;drop leading "." + (mkdir-p dest) + (copy-recursively html dest))) + html-dirs))))))) + (native-inputs (list doxygen (make-avr-toolchain))) + (home-page "https://www.lufa-lib.org/") + (synopsis "Lightweight USB Framework for AVRs") + (description "UFA is a simple to use, lightweight framework which sits +atop the hardware USB controller in specific AVR microcontroller models, and +allows for the quick and easy creation of complex USB devices and hosts. This +package contains the user-submitted projects and bootloaders for use with +compatible microcontroller models, as well as the demos and the +documentation.") + (license license:expat))) ;see LUFA/License.txt