diff mbox series

[bug#52043,v2,1/2] gnu: Add instrumentation packages.

Message ID 1bbfcda6f8e1c1fd94170b9af7186076d4f5bc3c.1637632353.git.olivier.dion@polymtl.ca
State Accepted
Headers show
Series [bug#52043,v2,1/2] gnu: Add instrumentation packages. | expand

Commit Message

Olivier Dion Nov. 23, 2021, 1:53 a.m. UTC
* gnu/packages/instrumentation.scm: New file
(dyninst): New variable.
---
 gnu/local.mk                     |  1 +
 gnu/packages/instrumentation.scm | 56 ++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 gnu/packages/instrumentation.scm

Comments

Ludovic Courtès Dec. 10, 2021, 2:32 p.m. UTC | #1
Hi,

Olivier Dion <olivier.dion@polymtl.ca> skribis:

> * gnu/packages/instrumentation.scm: New file
> (dyninst): New variable.

[...]

> +    (name "dyninst")
> +    ;; Newer versions are not promoted on main home page and require libiberty.

Note that there’s a ‘libiberty’ package.

> +    (version "10.2.1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/dyninst/dyninst/archive/v"
> +                                  version ".tar.gz"))

As reported by ‘guix lint’, this URL refers to an autogenerated
tarball whose content may change over time.

Could you instead use ‘git-fetch’?

> +    (synopsis "Dynamic instrumentation")
> +    (description "Tools for binary instrumentation, analysis, and modification.")

Please expound a bit and write full sentences:

  https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html

Otherwise LGTM.  Could you send an updated patch?

The second patch LGTM.

Thanks,
Ludo’.
diff mbox series

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 3227fc3835..26dc098417 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -307,6 +307,7 @@  GNU_SYSTEM_MODULES =				\
   %D%/packages/inklingreader.scm		\
   %D%/packages/inkscape.scm			\
   %D%/packages/installers.scm			\
+  %D%/packages/instrumentation.scm		\
   %D%/packages/ipfs.scm			\
   %D%/packages/irc.scm  			\
   %D%/packages/irods.scm  			\
diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
new file mode 100644
index 0000000000..8b55b313dc
--- /dev/null
+++ b/gnu/packages/instrumentation.scm
@@ -0,0 +1,56 @@ 
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Olivier Dion <olivier.dion@polymtl.ca>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages instrumentation)
+  #:use-module (gnu packages boost)
+  #:use-module (gnu packages elf)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages tbb)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system cmake)
+  #:use-module ((guix licenses) #:prefix license:))
+
+(define-public dyninst
+  (package
+    (name "dyninst")
+    ;; Newer versions are not promoted on main home page and require libiberty.
+    (version "10.2.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/dyninst/dyninst/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32 "18bvmvm3l18lpw8fz9yrjkd6fwqvxg0j2xfhvkzx4xr5l73wcxw0"))))
+
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f
+       ;; STERILE_BUILD: Do not download/build third-party dependencies from
+       ;; source.
+       #:configure-flags
+       (list "-DSTERILE_BUILD=ON")))
+    (propagated-inputs
+     `(("elfutils" ,elfutils)
+       ("boost" ,boost)
+       ("tbb" ,tbb)
+       ("libomp" ,libomp)))
+    (home-page "https://dyninst.org/")
+    (synopsis "Dynamic instrumentation")
+    (description "Tools for binary instrumentation, analysis, and modification.")
+    (license license:lgpl2.0)))