diff mbox series

[bug#65074,v2,07/13] gnu: Add go-github-com-pkg-profile

Message ID e7674f7e5f0ab59e0e102bf1729629c19ec6a2c3.1691233116.git.fries1234@protonmail.com
State New
Headers show
Series Add scc | expand

Commit Message

Fries Aug. 5, 2023, 11:01 a.m. UTC
* gnu/packages/golang.scm (go-github-com-pkg-profile): New variable.
---
 gnu/packages/golang.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index ab03812125..c8bc3040d9 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -2113,6 +2113,37 @@  (define-public go-github-com-dhowett-go-plist
 types.")
       (license license:giftware))))
 
+(define-public go-github-com-pkg-profile
+  (package
+    (name "go-github-com-pkg-profile")
+    (version "1.7.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/pkg/profile")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0ifr9gnycjwh7dbvsb5vgs9kzlr548cb4m45zvl8i8lgd3qhppy1"))))
+    (build-system go-build-system)
+    (arguments
+     (list #:import-path "github.com/pkg/profile"
+           #:phases #~(modify-phases %standard-phases
+                        ;; profile drops a cpu.pprof file inside its source directory
+                        ;; after tests which makes it unreproducible so we remove it.
+                        (add-after 'check 'delete-test-file
+                          (lambda* (#:key import-path #:allow-other-keys)
+                            (delete-file (string-append "src/" import-path
+                                                        "/cpu.pprof")))))))
+    (propagated-inputs (list go-github-com-felixge-fgprof))
+    (home-page "https://github.com/pkg/profile")
+    (synopsis "Simple profiling for Go")
+    (description
+     "Profile provides a simple way to manage runtime/pprof profiling of your
+Go application.")
+    (license license:bsd-2)))
+
 (define-public go-github-com-felixge-fgprof
   (package
     (name "go-github-com-felixge-fgprof")