libextractor-python

GNU libextractor
Log | Files | Refs | README | LICENSE

guix-env.scm (2467B)


      1 ;;; This file is part of GNUnet.
      2 ;;; Copyright (C) 2016, 2017, 2018 GNUnet e.V.
      3 ;;;
      4 ;;; GNUnet is free software: you can redistribute it and/or modify it
      5 ;;; under the terms of the GNU Affero General Public License as published
      6 ;;; by the Free Software Foundation, either version 3 of the License,
      7 ;;; or (at your option) any later version.
      8 ;;;
      9 ;;; GNUnet is distributed in the hope that it will be useful, but
     10 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
     11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12 ;;; Affero General Public License for more details.
     13 ;;;
     14 ;;; You should have received a copy of the GNU Affero General Public License
     15 ;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
     16 
     17 (use-modules
     18  (ice-9 popen)
     19  (ice-9 match)
     20  (ice-9 rdelim)
     21  (guix packages)
     22  (guix build-system python)
     23  (guix gexp)
     24  ((guix build utils) #:select (with-directory-excursion))
     25  (guix git-download)
     26  (guix utils) ; current-source-directory
     27  (gnu packages)
     28  (gnu packages gnunet)
     29  (gnu packages python)
     30  (gnu packages base)
     31  (gnu packages version-control)
     32  (gnu packages ssh)
     33  (gnu packages linux)
     34  ((guix licenses) #:prefix license:))
     35 
     36 (define %source-dir (current-source-directory))
     37 
     38 (define python-libextractor
     39   (let* ((revision "1")
     40          (select? (delay (or (git-predicate
     41                               (current-source-directory))
     42                              source-file?))))
     43     (package
     44       (name "python-libextractor")
     45       (version (string-append "git" revision))
     46       (source
     47        (local-file
     48         (string-append (getcwd))
     49         #:recursive? #t))
     50       (build-system python-build-system)
     51       (arguments
     52        `(#:python ,python-2
     53          #:tests? #f))
     54       (propagated-inputs
     55        `(("libextractor" ,libextractor)))
     56       (home-page "https://github.com/docker/docker-py")
     57       (synopsis "Python bindings for libextractor")
     58       (description "Python bindings for libextractor")
     59       (license #f))))
     60 
     61 (define-public python2-libextractor
     62   (package-with-python2 python-libextractor))
     63 
     64 (package
     65   (inherit python2-libextractor)
     66   (name "python2-libextractor-hackenv")
     67   (version "git")
     68   (inputs
     69    `(("coreutils" ,coreutils)
     70      ("which" ,which)
     71      ("git" ,git)
     72      ,@(package-inputs python2-libextractor)))
     73   (propagated-inputs
     74    `(("python" ,python-2)
     75      ("openssh" ,openssh)
     76      ("strace" ,strace)
     77      ("git" ,git)
     78      ,@(package-propagated-inputs python2-libextractor))))