From 1cb7404fee01417eb474a2b687dccb5bbf355683 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 17 Sep 2023 11:14:24 -0400 Subject: gnu: Add lufa. * gnu/packages/avr-xyz.scm (lufa): New variable. --- gnu/packages/avr-xyz.scm | 83 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) (limited to 'gnu/packages') diff --git a/gnu/packages/avr-xyz.scm b/gnu/packages/avr-xyz.scm index e8844b8d43..e0db2e3a0c 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 @@ #: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 @@ 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))) + +(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 -- cgit v1.2.3 : static-networking: Adjust to new style....* gnu/tests/networking.scm (run-static-networking-test)[test]: Remove 'mkdir', 'chdir', and 'exit' calls'. Add 'test-runner-current' call. Ludovic Courtès 2021-12-13Merge branch 'master' into core-updates-frozenLudovic Courtès 2021-12-12tests: Replace uses of deprecated 'static-networking-service'....* gnu/tests/ganeti.scm (%ganeti-os): Replace call to 'static-networking-service' by instantiating STATIC-NETWORKING-SERVICE-TYPE. * gnu/tests/networking.scm (%test-static-networking) (%openvswitch-os, %dhcpd-os): Likewise. Ludovic Courtès 2021-12-12services: static-networking: Change interface to mimic netlink....* gnu/services/base.scm (<static-networking>)[interface, ip, netmask] [gateway]: Remove. [addresses, links, routes]: New fields. [requirement]: Default to '(udev). (<network-address>, <network-link>, <network-route>): New record types. (ensure-no-separate-netmask, %ensure-no-separate-netmask): Remove. (ipv6-address?, cidr->netmask, ip+netmask->cidr) (network-set-up/hurd, network-tear-down/hurd) (network-set-up/linux, network-tear-down/linux) (static-networking->hurd-pfinet-options): New procedures. (static-networking-shepherd-service): New procedure. (static-networking-shepherd-services): Rewrite in terms of the above. (static-networking-service): Deprecate. Adjust to new 'static-networking' API. (%base-services): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * gnu/system/hurd.scm (%base-services/hurd): Likewise, and separate 'loopback' from 'networking'. * gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove "servers/socket/2". * gnu/tests/networking.scm (run-openvswitch-test)["networking has started on ovs0"]: Check for 'networking instead of 'networking-ovs0, which is no longer provided. * doc/guix.texi (Networking Setup): Document the new interface. Remove documentation of 'static-networking-service'. (Virtualization Services): Change Ganeti example to use the new interface. Ludovic Courtès 2021-12-12tests: openvswitch: Check whether ovs0 is up....* gnu/tests/networking.scm (run-openvswitch-test)["ovs0 is up"]: New test. Ludovic Courtès 2021-12-12tests: Add 'static-networking' test....* gnu/tests/networking.scm (run-static-networking-test): New procedure. (%test-static-networking): New variable. Ludovic Courtès 2021-09-26tests: Reduce boilerplate for users of 'system-test-runner'....* gnu/tests/audio.scm, gnu/tests/base.scm, gnu/tests/ci.scm, gnu/tests/cups.scm, gnu/tests/databases.scm, gnu/tests/desktop.scm, gnu/tests/dict.scm, gnu/tests/docker.scm, gnu/tests/file-sharing.scm, gnu/tests/ganeti.scm, gnu/tests/guix.scm, gnu/tests/ldap.scm, gnu/tests/linux-modules.scm, gnu/tests/mail.scm, gnu/tests/messaging.scm, gnu/tests/monitoring.scm, gnu/tests/networking.scm, gnu/tests/nfs.scm, gnu/tests/package-management.scm, gnu/tests/reconfigure.scm, gnu/tests/rsync.scm, gnu/tests/security-token.scm, gnu/tests/singularity.scm, gnu/tests/ssh.scm, gnu/tests/telephony.scm, gnu/tests/version-control.scm, gnu/tests/virtualization.scm, gnu/tests/web.scm: Remove (mkdir #$output) (chdir #$output) and pass #$output as argument to 'system-test-runner'. Ludovic Courtès 2021-09-25tests: Adjust to SRFI-64 as found in Guile 3.0.7....In Guile 3.0.7, 'test-runner-current' is set to #f upon 'test-end'. Consequently, the previous strategy, where we'd call 'test-runner-current' after 'test-end', no longer works. Instead, set the test runner in each test right before 'test-begin'. * gnu/build/marionette.scm (system-test-runner): New procedure. * gnu/tests/audio.scm (run-mpd-test): Replace (exit (= ...)) idiom by (test-runner-current (system-test-runner)). * gnu/tests/base.scm (run-basic-test) (run-cleanup-test, run-mcron-test, run-nss-mdns-test): Likewise. * gnu/tests/ci.scm (run-laminar-test): Likewise. * gnu/tests/cups.scm (run-cups-test): Likewise. * gnu/tests/databases.scm (run-memcached-test) (run-postgresql-test, run-mysql-test): Likewise. * gnu/tests/desktop.scm (run-elogind-test): Likewise. * gnu/tests/dict.scm (run-dicod-test): Likewise. * gnu/tests/docker.scm (run-docker-test): Likewise. (run-docker-system-test): Likewise. * gnu/tests/file-sharing.scm (run-transmission-daemon-test): Likewise. * gnu/tests/ganeti.scm (run-ganeti-test): Likewise. * gnu/tests/guix.scm (run-guix-build-coordinator-test): Likewise. (run-guix-data-service-test): Likewise. * gnu/tests/ldap.scm (run-ldap-test): Likewise. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test-base): Likewise. * gnu/tests/mail.scm (run-opensmtpd-test) (run-exim-test, run-dovecot-test, run-getmail-test): Likewise. * gnu/tests/messaging.scm (run-xmpp-test) (run-bitlbee-test, run-quassel-test): Likewise. * gnu/tests/monitoring.scm (run-prometheus-node-exporter-server-test) (run-zabbix-server-test): Likewise. * gnu/tests/networking.scm (run-inetd-test, run-openvswitch-test) (run-dhcpd-test, run-tor-test, run-iptables-test, run-ipfs-test): Likewise. * gnu/tests/nfs.scm (run-nfs-test) (run-nfs-server-test, run-nfs-root-fs-test): Likewise. * gnu/tests/package-management.scm (run-nix-test): Likewise. * gnu/tests/reconfigure.scm (run-switch-to-system-test) (run-upgrade-services-test, run-install-bootloader-test): Likewise. * gnu/tests/rsync.scm (run-rsync-test): Likewise. * gnu/tests/security-token.scm (run-pcscd-test): Likewise. * gnu/tests/singularity.scm (run-singularity-test): Likewise. * gnu/tests/ssh.scm (run-ssh-test): Likewise. * gnu/tests/telephony.scm (run-jami-test): Likewise. * gnu/tests/version-control.scm (run-cgit-test): Likewise. (run-git-http-test, run-gitolite-test, run-gitile-test): Likewise. * gnu/tests/virtualization.scm (run-libvirt-test, run-childhurd-test): Likewise. * gnu/tests/web.scm (run-webserver-test, run-php-fpm-test) (run-hpcguix-web-server-test, run-tailon-test, run-patchwork-test): Likewise. Ludovic Courtès 2021-04-12gnu: tests: Test basic funtionality of the IPFS service....It is tested whether the IPFS service listens at the gateway and API ports and whether it is possible to upload and download a bytevector. * gnu/tests/networking.scm (%ipfs-os): New variable. (run-ipfs-test): New procedure. (%test-ipfs): New system test. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Maxime Devos 2020-07-11tests: networking: Use 'net.ifnames=0' for the Open vSwitch test....* gnu/tests/networking.scm (%openvswitch-os): Override KERNEL-ARGUMENTS. Marius Bakke 2020-04-10tests: openvswitch: Use the absolute file name of ovs-vsctl....This fixes a regression introduced in 8b9cad01e9619f53dc5a65892ca6a09ca5de3447 where ovs-vsctl would no longer be available in PATH. * gnu/tests/networking.scm (run-openvswitch-test): Qualify "ovs-vsctl" invocation by ungexping the OPENVSWITCH variable instead of assuming it's available on PATH. Marius Bakke 2020-03-16tests: dhcpd: Adjust network interface name....This is a followup to 8e53fe2b91d2776bc1529e7b34967c8f1d9edc32. * gnu/tests/networking.scm (dhcpd-v4-configuration) (%dhcpd-os): Use "ens3" instead of "eth0". Ludovic Courtès