From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KOFJNAgSZmBnNgEAgWs5BA (envelope-from ) for ; Thu, 01 Apr 2021 20:33:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6CkzLggSZmBBBwAAB5/wlQ (envelope-from ) for ; Thu, 01 Apr 2021 18:33:44 +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 5F9918B2B for ; Thu, 1 Apr 2021 20:33:44 +0200 (CEST) Received: from localhost ([::1]:34484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lS28V-0007Zf-IG for larch@yhetil.org; Thu, 01 Apr 2021 14:33:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lS271-000632-MY for guix-patches@gnu.org; Thu, 01 Apr 2021 14:32:12 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lS271-0004hr-Dd for guix-patches@gnu.org; Thu, 01 Apr 2021 14:32:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lS271-0008Fx-B8 for guix-patches@gnu.org; Thu, 01 Apr 2021 14:32:11 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47539] [PATCH v2 14/26] gnu: Add go-github-com-gabriel-vasile-mimetype. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 Apr 2021 18:32:11 +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.161730190931511 (code B ref 47539); Thu, 01 Apr 2021 18:32:11 +0000 Received: (at 47539) by debbugs.gnu.org; 1 Apr 2021 18:31:49 +0000 Received: from localhost ([127.0.0.1]:58618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lS26e-0008CA-N4 for submit@debbugs.gnu.org; Thu, 01 Apr 2021 14:31:48 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:39254 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lS26d-0008Av-1C for 47539@debbugs.gnu.org; Thu, 01 Apr 2021 14:31:47 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1617301900; bh=2CYQO11bixE0UEazFN+MrD8+xzr7uI2eDZGKOeTgqZ8=; h=From:To:Subject:In-Reply-To:References:Date; b=bNTenZMu8CpPI1oqA7MoLqvXLn1jvzv9SmMqR6sR+GhYVvBxn0gtQs4ZcHmeXCDD5 pcYakV+f70WeDpxlf3E5TjPpvHTSa+QEa4tPsI2M9Qh5oFiLDg5B1HOzVdn1ReLe/d XkQ85Hg1Rzh5CSj0o/RZYTYvSjOPyBRtta2BmYEE= In-Reply-To: References: Message-Id: <4590a87c1ec7d8ce4e64befbdc54a1f52925193e.1617301221.git.public@yoctocell.xyz> Date: Thu, 01 Apr 2021 20:31:39 +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=1617302024; 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=eXG8pB+k0/zcepp9o1xcrk4B99bJe/9RDcKgMNUwoPY=; b=Uaa3BRUqp8lA+ekaTMCNvs1ANOkoxVx8FcmHIj7+XwZm6Z9B2cvUf9YcF3AwcqPsSY1UCy 8XnK/1JcHq7vpfhrvpQASrQwZFXKRUJNiuU0gMspH2sFaRGBSj1NzFAhM2+zO8vw/XTz6V kyS8IXYyMY2msGEPZ1nPfgAfTHANI+WEYkKu7guwJQAzjPombG3caeP4Z389muAsi42pnh uamVqYBDPPAmnllgq5oFR26boAN5Qw3pJIjfGhnzGsk/ynFODSrawb3AB8iTR8mYlHjIiF DyXOiKW1T/AbUdtYkLN6q/ZHzgWGod54uMgOzhyHZQ/wQKW2dC6K84gZATCOpg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617302024; a=rsa-sha256; cv=none; b=sRCJyIKYLPEOByKl2EjYNW5r5ZZy2dfPelomVT9J1nH4LgRwRM0iwzfx6kc/tNSXAexsC/ rl1KmX3xKAQF32UZ0g40N8rD+TaJhpdBOYHy0QgAAKDaV5pXfkVtYv/CHle9+yZ1v4PuCn YjMxLVF6/SIlFVqHLHNNDnT3SE6oPr7qQPXPEYF1NCW+SmegGrp7PUCKVn/0HAxGi/D10y /NCrXmL95uFR6syZI051FCAAuAft6lVBgyzUj+NPVyTPRFo74xF8nLS6qOyGwMuSeYtF6G A2qw2EvgataKOjAL9nOcXcynUmQhbFuh5tsjczvaKDjJLWVTgaSoilJMEFeYXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=bNTenZMu; 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.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=bNTenZMu; 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: 5F9918B2B X-Spam-Score: -0.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: zlfXYtcCIH/m * 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 231f1babc6..5d05c383c6 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -7393,3 +7393,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