Update bincat

LEPILLER JulienWed Jan 24 15:12:47+0100 2018

146028d

Update bincat

more/packages/ocaml.scm

528528
              (method git-fetch)
529529
              (uri (git-reference
530530
                     (url "https://github.com/airbus-seclab/c2newspeak")
531-
                     (commit "6f7adf13fefb7f8d4dc668b8290226e3c6a30063")))
531+
                     (commit "c97fd380111a49fa7baeb9e49c45238fca627492")))
532532
              (file-name (string-append name "-" version))
533533
              (sha256
534534
               (base32
535-
                "1apaz0b84865xfba0mxbskbnaq6llqsn3qhy8b0sssbdxzw5w1x4"))))
535+
                "0fxh868s5jraq61mnig9ilhyjzsq4iw32f20zh3982naanp4p8r6"))))
536536
    (build-system ocaml-build-system)
537537
    (arguments
538538
     `(#:test-target "check"

540540
       #:phases
541541
       (modify-phases %standard-phases
542542
         (delete 'configure)
543-
         (add-before 'install 'modify-installed-file-list
544-
           (lambda _
545-
             (substitute* "src/newspeak.Makefile"
546-
               (("c2newspeak/typedC.cmi")
547-
                "c2newspeak/typedC.cmi c2newspeak/typedC.cmx c2newspeak/typedC.o"))))
548543
         (add-after 'install 'install-bin
549544
           (lambda* (#:key outputs #:allow-other-keys)
550545
             (install-file "bin/c2newspeak" (string-append (assoc-ref outputs "out") "/bin")))))))

556551
(define-public ocaml-bincat
557552
  (package
558553
    (name "ocaml-bincat")
559-
    (version "0.6")
554+
    (version "0.8.1")
560555
    (source (origin
561556
              (method url-fetch)
562557
              (uri (string-append "https://github.com/airbus-seclab/bincat/archive/v"

564559
              (file-name (string-append name "-" version ".tar.gz"))
565560
              (sha256
566561
               (base32
567-
                "1762wrvf7fv16kxfvpblj4b0pwbwny1b39263q4jnqni12474djl"))))
562+
                "1ncwm1h428x1bs4sq7ql1isrkhw0angglsa9hnsvhhw2i1jsdk7j"))))
568563
    (build-system ocaml-build-system)
569564
    (arguments
570-
     `(#:tests? #f; some failures for unknown reasons
565+
     `(#:tests? #f; disabled for now
566+
       #:validate-runpath? #f; disabled for now
571567
       #:make-flags
572568
       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
573569
             "LDCONFIG=true"

577573
       (modify-phases %standard-phases
578574
         (delete 'configure)
579575
         (add-before 'build 'python-path
580-
           (lambda _
576+
           (lambda* (#:key outputs #:allow-other-keys)
581577
             (setenv "PYTHONPATH" (string-append (getenv "PYTHONPATH")
582-
                                                 ":../python"))))
583-
         (add-before 'build 'fix-makefile
578+
                                                 ":../python:"
579+
                                                 (assoc-ref outputs "out")
580+
                                                 "/lib/python2.7/site-packages/"))
581+
             #t))
582+
         (add-before 'build 'fix-makefiles
584583
           (lambda _
585584
             (substitute* "ocaml/src/Makefile"
586-
               (("GITVERSION:=.*") "GITVERSION:=0.6\n")
587-
               ;; typedC library is embedded in newspeak.cmxa
588-
               (("typedC.cmx") ""))))
585+
               (("GITVERSION:=.*") "GITVERSION:=0.8.1\n"))
586+
             (substitute* "python/Makefile"
587+
               (("./setup.py install") "./setup.py install --prefix=$(PREFIX)"))
588+
             #t))
589589
         (add-before 'check 'fix-test
590590
           (lambda _
591591
             (setenv "PATH" (string-append (getenv "PATH") ":" (getcwd) "/ocaml/src"))
592-
             (chmod "test/eggloader_x86" #o755))))))
592+
             ;; Remove tests that require an armv8 compiler
593+
             (substitute* "test/Makefile"
594+
               (("eggloader_armv8 eggloader_armv7 eggloader_armv7thumb") ""))
595+
             (chmod "test/eggloader_x86" #o755)
596+
             #t))
597+
         (add-before 'install 'install-python-dir
598+
           (lambda* (#:key outputs #:allow-other-keys)
599+
             (mkdir-p (string-append (assoc-ref outputs "out")
600+
                                     "/lib/python2.7/site-packages/")))))))
593601
    (inputs
594602
     `(("c2newspeak" ,ocaml-c2newspeak)
595603
       ("zarith" ,ocaml-zarith)
596604
       ("menhir" ,ocaml-menhir)
597605
       ("ocamlgraph" ,ocaml-graph)
606+
       ("ocaml-cppo" ,ocaml-cppo)
607+
       ("ocaml-ppx-tools" ,ocaml-ppx-tools)
598608
       ("gmp" ,gmp)))
599609
    (native-inputs
600610
     `(("python" ,python-2)