gnu: add python-lief

  • Open
  • quality assurance status badge
Details
2 participants
  • Michael Ford
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Michael Ford
Severity
normal
M
N
N
Nicolas Goaziou wrote on 30 Dec 2021 11:02
(name . Michael Ford)(address . fanquake@gmail.com)(address . 52893@debbugs.gnu.org)
875yr676n3.fsf@nicolasgoaziou.fr
Hello,

Michael Ford <fanquake@gmail.com> writes:

Toggle quote (11 lines)
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 3a9e35aacf..08ab5431f3 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -27844,3 +27844,26 @@ (define-public python-iwlib
> (description
> "This package provides a Python interface to iw wireless tools.")
> (license license:gpl2)))
> +
> +(define-public lief

Thank you. Some comments follow.

But first and foremost, you need to provide a proper commit message, and
use `git format-patch' to send it to the list. See Contributing section
in the manual, and examples of messages in the commits history of the
probject.

Toggle quote (3 lines)
> + (package
> + (name "python-lief")

Package name and variable name are differents, this should be (name
"lief"), since it doesn't seem to be Python specific.

Toggle quote (7 lines)
> + (version "0.11.5")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/lief-project/LIEF.git")

You can remove ".git" suffix here.

Toggle quote (6 lines)
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0qahjfg1n0x76ps2mbyljvws1l3qhkqvmxqbahps4qgywl2hbdkj"))))

Hash string should go on the same line as base32.

Toggle quote (4 lines)
> + (build-system python-build-system)
> + (native-inputs
> + `(("cmake" ,cmake)))

I think this is the other way. You may use cmake-build-system, and
provide python-wrapper as a native input.

Toggle quote (5 lines)
> + (synopsis "Library to Instrument Executable Formats")
> + (description "Python library to to provide a cross platform library which can
> +parse, modify and abstract ELF, PE and MachO formats.")

AFAIU, this is not a Python-only library. Besides, the description
should consist of full sentences.

I made the changes suggested above, but couldn't run the tests. Also,
I didn't build documentation. Eventually, the process seems to create
static libraries, it would be nice to remove them. Could you look into
it and see what is possible to do?

Toggle snippet (28 lines)
(define-public lief
(package
(name "lief")
(version "0.11.5")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/lief-project/LIEF")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "0qahjfg1n0x76ps2mbyljvws1l3qhkqvmxqbahps4qgywl2hbdkj"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ;FIXME: Require git
#:configure-flags (list "-DLIEF_INSTALL_PYTHON=ON")))
(native-inputs
(list python-wrapper))
(home-page "https://github.com/lief-project/LIEF")
(synopsis "Library to Instrument Executable Formats")
(description
"LIEF is a library which can parse, modify and abstract ELF, PE
and MachO formats. It can be used in C, C++ and Python.")
(license license:asl2.0)))


Regards,
--
Nicolas Goaziou
?