* [bug#68617] [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype.
@ 2024-01-20 18:09 Artyom V. Poptsov
2024-02-03 5:42 ` Sharlatan Hellseher
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Artyom V. Poptsov @ 2024-01-20 18:09 UTC (permalink / raw)
To: 68617
[-- Attachment #1.1: Type: text/plain, Size: 67 bytes --]
Hello,
this patch adds "go-github-com-gabriel-vasile-mimetype"[1]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-go-github-com-gabriel-vasile-mimetype.patch --]
[-- Type: text/x-diff, Size: 2602 bytes --]
From 140d517610c3e9be4c5fb74e354f411c51d25cdc Mon Sep 17 00:00:00 2001
Message-ID: <140d517610c3e9be4c5fb74e354f411c51d25cdc.1705774054.git.poptsov.artyom@gmail.com>
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
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
[-- Attachment #1.3: Type: text/plain, Size: 288 bytes --]
Thanks,
- avp
References:
1. https://github.com/gabriel-vasile/mimetype/
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#68617] [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype.
2024-01-20 18:09 [bug#68617] [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype Artyom V. Poptsov
@ 2024-02-03 5:42 ` Sharlatan Hellseher
2024-02-04 6:58 ` Artyom V. Poptsov
2024-02-05 15:51 ` bug#68617: " Sharlatan Hellseher
2 siblings, 0 replies; 5+ messages in thread
From: Sharlatan Hellseher @ 2024-02-03 5:42 UTC (permalink / raw)
To: 68617; +Cc: poptsov.artyom
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
Hi,
Thank you for the patch!
> + (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
Instead of path string you may use import-path (change inputs in
lambda to use it. Check for examples in golang.scm.
> + ;; tests otherwise they will fail.
> + (let ((file
> + "src/
github.com/gabriel-vasile/mimetype/supported_mimes.md"))
It would be something like this (invoke "touch" (string-append import-path
"supported_mimes.md"). Or check if the code
depends on HOME envar.
>+ (description
> + "A fast Golang library for media type and file extension detection,
based on
> +magic numbers .")
Trailing space in the end of the sentence. Try to add more detail,
I've checked github page there is a link to a little bit detailed doc.
Apply common steps: guix lint, guix style.
Looking forward for v2.
Thanks,
Oleg
[-- Attachment #2: Type: text/html, Size: 1852 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#68617] [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype.
2024-01-20 18:09 [bug#68617] [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype Artyom V. Poptsov
2024-02-03 5:42 ` Sharlatan Hellseher
@ 2024-02-04 6:58 ` Artyom V. Poptsov
2024-02-04 17:14 ` Artyom V. Poptsov
2024-02-05 15:51 ` bug#68617: " Sharlatan Hellseher
2 siblings, 1 reply; 5+ messages in thread
From: Artyom V. Poptsov @ 2024-02-04 6:58 UTC (permalink / raw)
To: 68617
[-- Attachment #1.1: Type: text/plain, Size: 89 bytes --]
Hello,
I took into account the comments from Sharlatan Hellseher and updated
the patch.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-go-github-com-gabriel-vasile-mimetype.patch --]
[-- Type: text/x-diff, Size: 2602 bytes --]
From c090118a564bd6c3b2672f5422490b765efcc56e Mon Sep 17 00:00:00 2001
Message-ID: <c090118a564bd6c3b2672f5422490b765efcc56e.1707029680.git.poptsov.artyom@gmail.com>
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
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 014ca01602..966a8b0eaa 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4112,6 +4112,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: abeffc82379c4f9bd2e6226ea27453b22cb4e0c8
--
2.41.0
[-- Attachment #1.3: Type: text/plain, Size: 225 bytes --]
Thanks,
- avp
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#68617] [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype.
2024-02-04 6:58 ` Artyom V. Poptsov
@ 2024-02-04 17:14 ` Artyom V. Poptsov
0 siblings, 0 replies; 5+ messages in thread
From: Artyom V. Poptsov @ 2024-02-04 17:14 UTC (permalink / raw)
To: 68617
[-- Attachment #1.1: Type: text/plain, Size: 109 bytes --]
Hello,
I attached the old version of the patch by mistake to the previous
email.
Here's the right version.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-go-github-com-gabriel-vasile-mimetype.patch --]
[-- Type: text/x-diff, Size: 3260 bytes --]
From c6cc2c6c04019a10717bc19c80a4d4f18013e793 Mon Sep 17 00:00:00 2001
Message-ID: <c6cc2c6c04019a10717bc19c80a4d4f18013e793.1707066776.git.poptsov.artyom@gmail.com>
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
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
[-- Attachment #1.3: Type: text/plain, Size: 225 bytes --]
Thanks,
- avp
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#68617: [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype.
2024-01-20 18:09 [bug#68617] [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype Artyom V. Poptsov
2024-02-03 5:42 ` Sharlatan Hellseher
2024-02-04 6:58 ` Artyom V. Poptsov
@ 2024-02-05 15:51 ` Sharlatan Hellseher
2 siblings, 0 replies; 5+ messages in thread
From: Sharlatan Hellseher @ 2024-02-05 15:51 UTC (permalink / raw)
To: 68617-done
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-05 15:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-20 18:09 [bug#68617] [PATCH] gnu: Add go-github-com-gabriel-vasile-mimetype Artyom V. Poptsov
2024-02-03 5:42 ` Sharlatan Hellseher
2024-02-04 6:58 ` Artyom V. Poptsov
2024-02-04 17:14 ` Artyom V. Poptsov
2024-02-05 15:51 ` bug#68617: " Sharlatan Hellseher
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.