Subject: bug#68617: closed ([PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 05 Feb 2024 15:53:02 +0000

Your bug report

#68617: [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
68617: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68617
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype.
From: Sharlatan Hellseher <[email-masked]>
To: [email-masked]
Date: Mon, 05 Feb 2024 15:51:15 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

 Modification applied
 - package placed in golang-xyz.scm, as golang.scm in a process of split into logical modules,
   see <https://lists.gnu.org/archive/html/guix-devel/2024-01/msg00113.html>
 - [description]: Append "This package provides a"

Pushed as 317d9840d371469daa23d13ac7c62477ed347b54 to master.

Thanks,
Oleg

Subject: [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype.
From: "Artyom V. Poptsov" <[email-masked]>
To: [email-masked]
Date: Sat, 20 Jan 2024 21:09:08 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

this patch adds "go-github-com-gabriel-vasile-mimetype"[1]
From 140d517610c3e9be4c5fb74e354f411c51d25cdc Mon Sep 17 00:00:00 2001
Message-ID: <140d51[email-masked]>
From: "Artyom V. Poptsov" <[email-masked]>
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 | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8fea581248..c2154ca675 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4410,6 +4410,42 @@ (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 inputs #:allow-other-keys #:rest args)
+              ;; This file needs to be available for writing during the
+              ;; tests otherwise they will fail.
+              (let ((file
+                     "src/github.com/gabriel-vasile/mimetype/supported_mimes.md"))
+                (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 fast Golang library for media type and file extension detection, based on
+magic numbers .")
+    (license license:expat)))
+
 (define-public go-github-com-tevino-abool
   (let ((commit
           "3c25f2fe7cd0ef3eabefce1d90efd69a65d35b12")

base-commit: 9c367ee1967b213b507a8bf041ea6c2623ceea96
-- 
2.41.0

Thanks,
- avp

References:
1. https://github.com/gabriel-vasile/mimetype/

-- 
Artyom "avp" Poptsov <[email-masked]>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F