From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mOvlCUiAQGH06gAAgWs5BA (envelope-from ) for ; Tue, 14 Sep 2021 12:58:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sCGhBUiAQGHtQAAA1q6Kng (envelope-from ) for ; Tue, 14 Sep 2021 10:58:16 +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 BD23814023 for ; Tue, 14 Sep 2021 12:58:15 +0200 (CEST) Received: from localhost ([::1]:53618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQ68k-0005MY-Sv for larch@yhetil.org; Tue, 14 Sep 2021 06:58:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ68Y-0005Ll-3D for guix-patches@gnu.org; Tue, 14 Sep 2021 06:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQ68X-00059V-SG for guix-patches@gnu.org; Tue, 14 Sep 2021 06:58:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQ68X-0005RY-P5 for guix-patches@gnu.org; Tue, 14 Sep 2021 06:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50578] [PATCH] gnu: Add minipro Resent-From: Thomas Albers Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 14 Sep 2021 10:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50578@debbugs.gnu.org Cc: Thomas Albers X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163161703420858 (code B ref -1); Tue, 14 Sep 2021 10:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Sep 2021 10:57:14 +0000 Received: from localhost ([127.0.0.1]:47698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ67h-0005QG-CO for submit@debbugs.gnu.org; Tue, 14 Sep 2021 06:57:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:55744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQ67f-0005Q9-Sb for submit@debbugs.gnu.org; Tue, 14 Sep 2021 06:57:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ67f-0004TO-Jz for guix-patches@gnu.org; Tue, 14 Sep 2021 06:57:07 -0400 Received: from vmd69031.contaboserver.net ([161.97.172.214]:48104 helo=mail.thomaslabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ67Z-0004Ib-HB for guix-patches@gnu.org; Tue, 14 Sep 2021 06:57:07 -0400 Received: from localhost.localdomain (ip2505fce3.dynamic.kabel-deutschland.de [37.5.252.227]) by mail.thomaslabs.org (Postfix) with ESMTPSA id 3B9EA9C001F; Tue, 14 Sep 2021 12:56:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thomaslabs.org; s=mail; t=1631617017; bh=1DI1ZXpGoOscaTzQqLlNb35ZpetqfliBoRhzhWa8gfM=; h=From:To:Cc:Subject:Date:From; b=UuJS+8iXDHiREvdWWSzglI1ZU+AgvyMtSTMpjtGqbVl0Q1rm+SOO0dcLH8iggjSmW 4F+0tb90cK2oo6idmKDlcZkmb0VnWgrAShJI8ck9sFdFEkl/l1FUGirKsmbH+22+eV KXba8AkIkzDttAQh3GViivh/5JZnopy2zcj9RK5lUZ1yDpFhPkLivZd7/Wq4P3LdQw xNzXCFLdbUeXZUUA35nUURTvItuOvqJDTCgyH++VRhemDux4E8OzW64VGgu6VugpWj pnYxwYbP6DXrel0bi6MszfWtMNfAMUEcSx7NJmogM54pbB8ni2OUjFXXikkof7lcFz HJ/QPzopa8nTw== Date: Tue, 14 Sep 2021 12:56:01 +0200 Message-Id: <20210914105601.12562-1-thomas@thomaslabs.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=161.97.172.214; envelope-from=thomas@thomaslabs.org; helo=mail.thomaslabs.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Thomas Albers X-ACL-Warn: , Thomas Albers via Guix-patches From: Thomas Albers via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631617095; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=OBI5GAZCgIazUnFIHkiIbarYejo/IAKjYA2k3eenH7Y=; b=Ux8n0WgHr0+kT0KFGQmC5ZV2Y63zwUPGZOUjKVwnArbhoWQQyU/WimFMhCbzUVe6jYHAt2 ud3uRaeQ2zjPQvlpiJXpjieP9tKx0Z1npyoWdbsnSb4fzAnx/+uWDmAmhcEXSCWNvXcoMC vBKYO5mTooCv3oSrhBroZft+4tDstbq10MBKrPp2ydA6p2DxZIXUSMOCpm/2SXNLXS0qAg iflNL6hy3tp+Xc7yMiPTfl6Bb2K0ZRdXTfyWVR6DN47kHwFGohbU9FDBIkHACIbc5YNrKC TmmIgXoD+rlBtT72/+8r60xA7YeTtkIjvkQgFPmGOoyP6JxZOn+nmAE4fMnK1w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631617095; a=rsa-sha256; cv=none; b=EVeG59i5RnI22vM4u1WMLINXWrWaH2CHfxD/dfWOzAydqUinEeEiy1tZDVSttILLT8/lFk NPe4DbajNa8C0EEZtykvjh0uWlGNrYe6q4rqAM5DMkBTcm7XJuOH1MVkDUR/j2vA4N/lmy +2jRBSo9d7QWf9rfjN9HBu0xQQ+7bzMs/0K4q/Yw0U4x3dSiJjEkfxgIcOOAMlugO3B3Dc RNjJ5tb83n78xUlmoGThhH2blD/pYvr46MNHCgTm+thpNPSXlFSuDfDDU8h1emUfgWUGgi M+Y/u5sASQpUJMwKhAAlUK2g0a4LN3iDy6PeL4P/vttLJvX77rJCaxT7LojkgQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=thomaslabs.org header.s=mail header.b=UuJS+8iX; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=thomaslabs.org header.s=mail header.b=UuJS+8iX; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: BD23814023 X-Spam-Score: -1.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: gjOFavR+dL9H --- gnu/packages/electronics.scm | 66 ++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm index 0e985c9750..e6abdc6562 100644 --- a/gnu/packages/electronics.scm +++ b/gnu/packages/electronics.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2019 Clément Lassieur ;;; Copyright © 2021 Efraim Flashner ;;; Copyright © 2021 Leo Famulari +;;; Copyright © 2021 Thomas Albers Raviola ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) @@ -333,3 +335,67 @@ from ALSA, ESD, and COMEDI sources. This package currently does not include support for ESD sources.") (home-page "http://xoscope.sourceforge.net/") (license license:gpl2+))) + +(define-public minipro + ;; Information needed to fix Makefile + (let* ((commit "0774b071361366c866ec97302ec02972379418b0") + (commit-short (substring commit 0 8)) + ;; git show -s --format="%ci" + (date "2021-08-05 07:54:42 +0300") + (revision "1")) + (package + (name "minipro") + (version (git-version "0.5" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/DavidGriffith/minipro.git") + (commit commit))) + (sha256 + (base32 "174m2dwgpxwkm1yrf54p6k5skihgpcd1iblxivg2f6xbdrsz8b18")))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("which" ,which) + ("sed" ,sed))) + (inputs + `(("libusb" ,libusb))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (add-before 'build 'fix-makefile + (lambda* (#:key outputs #:allow-other-keys) + ;; Modify the makefile so that its 'PREFIX' variable points to + ;; "out". + ;; Also fix the folder to where the udev rules are installed and + ;; some git related variables that minipro expects. + (let ((out (assoc-ref outputs "out"))) + (substitute* "Makefile" + (("PREFIX \\?= .*") + (string-append "PREFIX ?= " out "\n" )) + (("UDEV_DIR=.*") + (string-append "UDEV_DIR=" out "/lib/udev/\n")) + (("GIT_BRANCH = .*") + (string-append "GIT_BRANCH = \"master\"\n")) + (("GIT_HASH = .*") + (string-append "GIT_HASH = \"" ,commit "\"\n")) + (("GIT_HASH_SHORT = .*") + (string-append "GIT_HASH_SHORT = \"" ,commit-short "\"\n")) + (("GIT_DATE = .*") + (string-append "GIT_DATE = \"" ,date "\"\n")))) + #t))))) + (synopsis "Controls the TL866xx series of chip programmers") + (description "minipro is designed to program or read the contents of +chips supported by the TL866xx series of programmers. This includes many +microcontrollers, ROMs, EEPROMs and PLDs. + +To use this program without root privileges you must install the necessary udev +rules. This can be done by extending @code{udev-service-type} in your +@code{operating-system} configuration with this package. E.g.: +@code{(udev-rules-service 'minipro minipro #:groups '(\"plugdev\")}. +Additionally your user must be member of the @code{plugdev} group.") + (home-page "https://gitlab.com/DavidGriffith/minipro") + (license license:gpl3+)))) -- 2.33.0