From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id S5O/IdqgfWAflwAAgWs5BA (envelope-from ) for ; Mon, 19 Apr 2021 17:25:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GLElG9qgfWBRFgAAbx9fmQ (envelope-from ) for ; Mon, 19 Apr 2021 15:25:14 +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 DCB0F9643 for ; Mon, 19 Apr 2021 17:25:13 +0200 (CEST) Received: from localhost ([::1]:53098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVlw-0007Wk-VQ for larch@yhetil.org; Mon, 19 Apr 2021 11:25:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVkp-0006Js-CC for guix-patches@gnu.org; Mon, 19 Apr 2021 11:24:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40160) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVkp-0004zt-3N for guix-patches@gnu.org; Mon, 19 Apr 2021 11:24:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lYVko-00012V-Vw for guix-patches@gnu.org; Mon, 19 Apr 2021 11:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47539] [PATCH v3 13/25] gnu: Add go-github-com-gabriel-vasile-mimetype. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Apr 2021 15:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47539@debbugs.gnu.org Received: via spool by 47539-submit@debbugs.gnu.org id=B47539.16188458043846 (code B ref 47539); Mon, 19 Apr 2021 15:24:02 +0000 Received: (at 47539) by debbugs.gnu.org; 19 Apr 2021 15:23:24 +0000 Received: from localhost ([127.0.0.1]:51685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVkC-0000zy-9L for submit@debbugs.gnu.org; Mon, 19 Apr 2021 11:23:24 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:57474 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYVk5-0000zJ-4O for 47539@debbugs.gnu.org; Mon, 19 Apr 2021 11:23:17 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1618845791; bh=Y8yDfqESTl29AUFBCvNzrqKUEpc7SXsYUp4E6ghybNQ=; h=From:To:Subject:In-Reply-To:References:Date; b=bs3GhicbI6qa8KT7oHF3jHkkjDjG9AtaNiPbWpSvW3b/dpd7g6pp0JFL2bjPTxLQ9 sEk7mpb6tj+Vx07cw2Xz0NUFVPEjeMzeEzOphwKbWsjp4UqWWg9Iganb9KcZFAhgos mBIbE8uPQZpQbQJYtNoEyvRostsiIfaxGCh0gP1g= In-Reply-To: References: Message-Id: <1bcd355c58e0f9eb20973ca783fec866c11005af.1618845646.git.public@yoctocell.xyz> Date: Mon, 19 Apr 2021 17:23:11 +0200 MIME-Version: 1.0 Content-Type: text/plain 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618845914; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=0z5ko4iaHNb7NS+38cwJAhBUrPPPlNZX/cjqruXR1m8=; b=lz01crj2kf9l8Hk3sMMNuXsNRuq04BcurVaIrj4vgGsy5twFAYVwp4rgkpAQDnrQ4uV9nG 0pW9axZgPzxiJ03BIwkdabds+lgZv1psQGwuhz2RmMs7ow/tvUpTZJRdx6qxRCQQq028Vr GcZGeBEgaQeTHnYOk0gqFAdA9PwuUkkVByP0MTqiv0PILh5bbRf5Y54M9GhU9jHGClBSxF Am9JyPcE5jC8Bp5TytSKOsz7rSgszamKvsh2O+NydvTqLZEchQnMAy4IV5WwVO/wiXsBuB uYwjexJSuVSoSfqOZk3Rq6rzp5aNBBR3csXUYplC39DZXCFgUHpWcpR9ODXoFw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618845914; a=rsa-sha256; cv=none; b=FaDAh5GYFRvy1zlmvUPYtUW8fW3hwlYgTU1RFnIkEt3IQBcQc+BGiDhVZ9B4+0Hc8XtCKM dwdSAYGSBJ3TNC8+zkXxOgJROPIb3ElgCz7gve+ldraHk7K7t4JgHKykwD+be1sKEr4U2K ZfkCOptKnAiOZoYqVEzkBy9KVVH1tqw4YCgRNxwppFIqTlDIx6y3xMcAbvs3rp5yN4M3S8 M3VtAVJXpkOjKG4UFOLpEeZP4n4MT/NKKDAjAAYq15K/EnmLoI6157neGOuOcVcazWugQw EuGdtJ1VDoEzlGr4U0FUC3PMnwedWw25voRt4qZXzGV26IhsV/im97OarH36ag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=bs3Ghicb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); 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: -0.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=bs3Ghicb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); 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: DCB0F9643 X-Spam-Score: -0.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: EPzRFMIwI2my * gnu/packages/golang.scm (go-github-com-gabriel-vasile-mimetype): New variable. --- gnu/packages/golang.scm | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 289685ef4c..7dfc098480 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -7367,3 +7367,50 @@ substitutions, etc.), and it is safe for all utf-8 (unicode) input.") Go. It lets you use emoji characters in strings.") (license license:expat))) +(define-public go-github-com-gabriel-vasile-mimetype + (package + (name "go-github-com-gabriel-vasile-mimetype") + (version "1.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/gabriel-vasile/mimetype.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0ysb0pjhyr9b7q2y39b5hpwsaidgfl42gd07yj34mgmb9wfjb7ch")))) + (build-system go-build-system) + (arguments + '(#:import-path + "github.com/gabriel-vasile/mimetype" + ;; FIXME: Cannot open 'supported_mimes.md' + #:tests? #f + #:phases + (modify-phases %standard-phases + ;; The files are read-only + (add-before 'reset-gzip-timestamps 'make-gz-files-writable + (lambda* (#:key outputs #:allow-other-keys) + (for-each make-file-writable + (find-files (string-append (assoc-ref outputs "out")) + ".*\\.gz$")) + #t))))) + + (home-page + "https://github.com/gabriel-vasile/mimetype") + (synopsis "A fast golang library for MIME type and file extension detection") + (description "This is a package for detecting MIME types and extensions +based on magic numbers. Features include + +@itemize +@item fast and precise MIME type and file extension detection +@item long list of supported MIME types +@item common file formats are prioritized +@item small and simple API +@item handles MIME type aliases +@item thread safe +@item low memory usage, besides the file header +@end itemize") + (license license:expat))) + -- 2.31.1