;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2016, 2018, 2021 Ludovic Courtès ;;; Copyright © 2016, 2019 Efraim Flashner ;;; Copyright © 2017 Jonathan Brielmaier ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2021 Ricardo Wurmus ;;; Copyright © 2021 Mathieu Othacehe ;;; Copyright © 2022 Peter Polidoro ;;; ;;; 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 (flashrom_dasharo) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (gnu packages autotools) #:use-module (gnu packages admin) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages embedded) #:use-module (gnu packages flex) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gnupg) #:use-module (gnu packages graphviz) #:use-module (gnu packages groff) #:use-module (gnu packages pciutils) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages libusb) #:use-module (gnu packages libftdi) #:use-module (gnu packages pciutils) #:use-module (gnu packages qt) #:use-module (gnu packages tls)) (define-public flashrom_dasharo (package (name "flashrom_dasharo") (version "1.2.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/Dasharo/flashrom/archive/refs/tags/dasharo-v" version ".tar.gz")) (sha256 (base32 "04b409lfhb1c5nl0d7fj4vs36yg1388ic4n0xfv60kzxcsncal15")))) (build-system gnu-build-system) (inputs `(("dmidecode" ,dmidecode) ("pciutils" ,pciutils) ("zlib" ,zlib) ("libusb" ,libusb) ("libftdi" ,libftdi))) (native-inputs `(("pkg-config" ,pkg-config))) (arguments '(#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output) "CONFIG_ENABLE_LIBUSB0_PROGRAMMERS=no") #:tests? #f ; no 'check' target #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script (add-before 'build 'patch-exec-paths (lambda* (#:key inputs #:allow-other-keys) (substitute* "dmi.c" (("\"dmidecode\"") (format #f "~S" (string-append (assoc-ref inputs "dmidecode") "/sbin/dmidecode")))) #t))))) (home-page "https://flashrom.org/") (synopsis "Identify, read, write, erase, and verify ROM/flash chips") (description "flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips. It is designed to flash BIOS/EFI/coreboot/firmware/optionROM images on mainboards, network/graphics/storage controller cards, and various other programmer devices.") (license license:gpl2)))