From patchwork Sun Feb 4 17:14:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Artyom V. Poptsov" X-Patchwork-Id: 59791 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E83F227BBEA; Sun, 4 Feb 2024 17:16:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2216627BBE9 for ; Sun, 4 Feb 2024 17:16:04 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWg5x-0008Is-Nn; Sun, 04 Feb 2024 12:15:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rWg5u-0008FM-P0 for guix-patches@gnu.org; Sun, 04 Feb 2024 12:15:51 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rWg5u-0003Vg-Gz for guix-patches@gnu.org; Sun, 04 Feb 2024 12:15:50 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rWg66-0000aD-3l for guix-patches@gnu.org; Sun, 04 Feb 2024 12:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68617] [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype. Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Feb 2024 17:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68617 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68617@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17070669152178 (code B ref -1); Sun, 04 Feb 2024 17:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Feb 2024 17:15:15 +0000 Received: from localhost ([127.0.0.1]:49975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWg5K-0000Z1-71 for submit@debbugs.gnu.org; Sun, 04 Feb 2024 12:15:14 -0500 Received: from lists.gnu.org ([2001:470:142::17]:51246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWg5F-0000YZ-Gs for submit@debbugs.gnu.org; Sun, 04 Feb 2024 12:15:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rWg4x-00082p-FP for guix-patches@gnu.org; Sun, 04 Feb 2024 12:14:51 -0500 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rWg4u-000365-20 for guix-patches@gnu.org; Sun, 04 Feb 2024 12:14:51 -0500 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2d07ffa0a9cso27645331fa.2 for ; Sun, 04 Feb 2024 09:14:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707066886; x=1707671686; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ePQxzG0uzefbONpkKmihgAxXqoNDtOS4a2Pwq/ksaDo=; b=OdXMSnWQisNDgtoaXfIo4qJNBwbI4xTal6JFAnIDp8bwbaYXL8FIXEoW8ZBQ/2YIch b2oSYo0wbw/51U+FH+Hw4avqJvmBS3zbB7aPEFMYxslLSR5mJSRv6klKOSZCs5tF3r1z o8/bGqtiytQYEF3b6P0M6Lwx9vDWm/Lhr++xn6OwFDid8ri6ti47feDzgXevFYoihZi5 VRVaWAKSXS3pXerjJyHDsvVGeUW+dcH3aiwWPWvoj3xsOsrGT5jzYsKLU00Ny3YUR9TY WzLrqTX/m4XRRQTDbzzFSOilEoZFvV9ZPJQBseFCbflRzFaVoPLn6R6NjTKMgnto4Viv Eh0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707066886; x=1707671686; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ePQxzG0uzefbONpkKmihgAxXqoNDtOS4a2Pwq/ksaDo=; b=oOozuzVZNgG0zQtpXMMegNTW/dtlRgug38frucThI6+Lwil2NgB21KaHZBds3UQCa5 GegM6dXAJBwZrVZeRU/yQU6yGxc/P/WQzEgRfQhFsjgbUM4lCNEAEj0ELoOf8Sj9hP8p s98lneXWhR3oZpT8xIg4GnhcroSfEbLf9k0lNLUyvaPOaN+ShJQmu9fUwMUkYc75+kDc Jvl/sTSrl9svbWDC/lRDAZoWZSQi3fkikBtl6kpKKNDUQYHhxr3GyXXr2jgXsZblz9os yZsQnXZEbMxTGUswF8qa4k9qFIs1vb/SG/vNK9wZvYCAZbAXmnAvlKMg7xkYQs/CbzwV Y6Ig== X-Gm-Message-State: AOJu0Yyhk8JMJb4TMSG3GTKxSMyfsRpE9E1rPneUpsTwSK3qxtX82hjo YvF4hpj5FGNrE8LSPwjsRWnWiAv6g0ehG0ezWYtHAEtmPm+YLrUpM5BtnmT3X4U= X-Google-Smtp-Source: AGHT+IEzlcjeFQ0xfo9ae9o2IFJf+5gXUtRBb4y5X2RLRXvcakmD3rpMCaC/xd99qls2Kb4NxvBPkg== X-Received: by 2002:a2e:8085:0:b0:2d0:9a6e:106 with SMTP id i5-20020a2e8085000000b002d09a6e0106mr2801333ljg.43.1707066885546; Sun, 04 Feb 2024 09:14:45 -0800 (PST) Received: from elephant ([5.164.220.172]) by smtp.gmail.com with ESMTPSA id z9-20020a2e3509000000b002d07289b191sm872557ljz.22.2024.02.04.09.14.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 09:14:44 -0800 (PST) From: "Artyom V. Poptsov" In-Reply-To: <878r404sxu.fsf@gmail.com> (Artyom V. Poptsov's message of "Sun, 04 Feb 2024 09:58:05 +0300") References: <87msszev23.fsf@gmail.com> <878r404sxu.fsf@gmail.com> Date: Sun, 04 Feb 2024 20:14:43 +0300 Message-ID: <874jeo40e4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=poptsov.artyom@gmail.com; helo=mail-lj1-x22f.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello, I attached the old version of the patch by mistake to the previous email. Here's the right version. Thanks, - avp From c6cc2c6c04019a10717bc19c80a4d4f18013e793 Mon Sep 17 00:00:00 2001 Message-ID: From: "Artyom V. Poptsov" Date: Sat, 20 Jan 2024 21:07:27 +0300 Subject: [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype. * gnu/packages/golang.scm (go-github-com-gabriel-vasile-mimetype): New variable. Change-Id: Icb1624eb9a890b6f711dacf5ff80f15b041f3b7d --- gnu/packages/golang.scm | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 014ca01602..ab92cec4e4 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -4112,6 +4112,57 @@ (define-public go-github-com-technoweenie-multipartstreamer without reading the entire content into memory.") (license license:expat))) +(define-public go-github-com-gabriel-vasile-mimetype + (package + (name "go-github-com-gabriel-vasile-mimetype") + (version "1.4.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/gabriel-vasile/mimetype") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "11swnjczhrza0xi8q2wlk056nnbcghm44vqs52zfv6rwqvy6imhj")))) + (build-system go-build-system) + (arguments + (list + #:go go-1.20 + #:import-path "github.com/gabriel-vasile/mimetype" + #:phases #~(modify-phases %standard-phases + (add-before 'check 'add-supported-mimes-md + (lambda* (#:key import-path #:allow-other-keys) + ;; This file needs to be available for writing during the + ;; tests otherwise they will fail. + (let ((file (format #f "src/~a/supported_mimes.md" + import-path))) + (invoke "touch" file) + (chmod file #o644))))))) + (propagated-inputs (list go-golang-org-x-net)) + (home-page "https://github.com/gabriel-vasile/mimetype") + (synopsis "Golang library for media type and file extension detection") + (description + "A Golang package that uses magic number signatures to detect the MIME type of a +file. + +Main features: +@itemize +@item Fast and precise MIME type and file extension detection. +@item Supports +@url{https://github.com/gabriel-vasile/mimetype/blob/master/supported_mimes.md, +many MIME types}. +@item Allows to +@url{https://pkg.go.dev/github.com/gabriel-vasile/mimetype#example-package-Extend, +extend} with other file formats. +@item Common file formats are prioritized. +@item +@url{https://pkg.go.dev/github.com/gabriel-vasile/mimetype#example-package-TextVsBinary, +Differentiation between text and binary files}. +@item Safe for concurrent usage. +@end itemize") + (license license:expat))) + (define-public go-github-com-tevino-abool (let ((commit "3c25f2fe7cd0ef3eabefce1d90efd69a65d35b12") base-commit: abeffc82379c4f9bd2e6226ea27453b22cb4e0c8 -- 2.41.0