Add bincat
more/packages/ocaml.scm
19 | 19 | (define-module (more packages ocaml) | |
20 | 20 | #:use-module (guix packages) | |
21 | 21 | #:use-module (guix download) | |
22 | + | #:use-module (guix git-download) | |
22 | 23 | #:use-module (guix utils) | |
23 | 24 | #:use-module (guix build-system gnu) | |
24 | 25 | #:use-module (guix build-system ocaml) | |
25 | 26 | #:use-module ((guix licenses) #:prefix license:) | |
26 | 27 | #:use-module (gnu packages) | |
28 | + | #:use-module (gnu packages assembly) | |
27 | 29 | #:use-module (gnu packages base) | |
28 | 30 | #:use-module (gnu packages bison) | |
29 | 31 | #:use-module (gnu packages boost) | |
… | |||
35 | 37 | #:use-module (gnu packages ocaml) | |
36 | 38 | #:use-module (gnu packages perl) | |
37 | 39 | #:use-module (gnu packages protobuf) | |
40 | + | #:use-module (gnu packages python) | |
38 | 41 | #:use-module (gnu packages texinfo) | |
39 | 42 | #:use-module (more packages smt)) | |
40 | 43 | ||
… | |||
601 | 604 | arbitrary number of processes. Cache coherence protocols and mutual exclusion | |
602 | 605 | algorithms are typical examples of such systems.") | |
603 | 606 | (license license:asl2.0))) | |
607 | + | ||
608 | + | (define-public ocaml-c2newspeak | |
609 | + | (package | |
610 | + | (name "ocaml-c2newspeak") | |
611 | + | (version "1") | |
612 | + | (source (origin | |
613 | + | (method git-fetch) | |
614 | + | (uri (git-reference | |
615 | + | (url "https://github.com/airbus-seclab/c2newspeak") | |
616 | + | (commit "6f7adf13fefb7f8d4dc668b8290226e3c6a30063"))) | |
617 | + | (file-name (string-append name "-" version)) | |
618 | + | (sha256 | |
619 | + | (base32 | |
620 | + | "1apaz0b84865xfba0mxbskbnaq6llqsn3qhy8b0sssbdxzw5w1x4")))) | |
621 | + | (build-system ocaml-build-system) | |
622 | + | (arguments | |
623 | + | `(#:test-target "check" | |
624 | + | #:tests? #f | |
625 | + | #:phases | |
626 | + | (modify-phases %standard-phases | |
627 | + | (delete 'configure) | |
628 | + | (add-before 'install 'modify-installed-file-list | |
629 | + | (lambda _ | |
630 | + | (substitute* "src/newspeak.Makefile" | |
631 | + | (("c2newspeak/typedC.cmi") | |
632 | + | "c2newspeak/typedC.cmi c2newspeak/typedC.cmx c2newspeak/typedC.o")))) | |
633 | + | (add-after 'install 'install-bin | |
634 | + | (lambda* (#:key outputs #:allow-other-keys) | |
635 | + | (install-file "bin/c2newspeak" (string-append (assoc-ref outputs "out") "/bin"))))))) | |
636 | + | (home-page "https://github.com/airbus-seclab/c2newspeak") | |
637 | + | (synopsis "") | |
638 | + | (description "") | |
639 | + | (license license:lgpl2.1+))) | |
640 | + | ||
641 | + | (define-public ocaml-bincat | |
642 | + | (package | |
643 | + | (name "ocaml-bincat") | |
644 | + | (version "0.6") | |
645 | + | (source (origin | |
646 | + | (method url-fetch) | |
647 | + | (uri (string-append "https://github.com/airbus-seclab/bincat/archive/v" | |
648 | + | version ".tar.gz")) | |
649 | + | (file-name (string-append name "-" version ".tar.gz")) | |
650 | + | (sha256 | |
651 | + | (base32 | |
652 | + | "1762wrvf7fv16kxfvpblj4b0pwbwny1b39263q4jnqni12474djl")))) | |
653 | + | (build-system ocaml-build-system) | |
654 | + | (arguments | |
655 | + | `(#:tests? #f; some failures for unknown reasons | |
656 | + | #:make-flags | |
657 | + | (list (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
658 | + | "LDCONFIG=true" | |
659 | + | (string-append "CFLAGS+=-I " (assoc-ref %build-inputs "ocaml") | |
660 | + | "/lib/ocaml")) | |
661 | + | #:phases | |
662 | + | (modify-phases %standard-phases | |
663 | + | (delete 'configure) | |
664 | + | (add-before 'build 'python-path | |
665 | + | (lambda _ | |
666 | + | (setenv "PYTHONPATH" (string-append (getenv "PYTHONPATH") | |
667 | + | ":../python")))) | |
668 | + | (add-before 'build 'fix-makefile | |
669 | + | (lambda _ | |
670 | + | (substitute* "ocaml/src/Makefile" | |
671 | + | (("GITVERSION:=.*") "GITVERSION:=0.6\n") | |
672 | + | ;; typedC library is embedded in newspeak.cmxa | |
673 | + | (("typedC.cmx") "")))) | |
674 | + | (add-before 'check 'fix-test | |
675 | + | (lambda _ | |
676 | + | (setenv "PATH" (string-append (getenv "PATH") ":" (getcwd) "/ocaml/src")) | |
677 | + | (chmod "test/eggloader_x86" #o755)))))) | |
678 | + | (inputs | |
679 | + | `(("c2newspeak" ,ocaml-c2newspeak) | |
680 | + | ("zarith" ,ocaml-zarith) | |
681 | + | ("menhir" ,ocaml-menhir) | |
682 | + | ("ocamlgraph" ,ocamlgraph) | |
683 | + | ("gmp" ,gmp))) | |
684 | + | (native-inputs | |
685 | + | `(("python" ,python-2) | |
686 | + | ("pytest" ,python2-pytest) | |
687 | + | ("sphinx" ,python2-sphinx) | |
688 | + | ("nasm" ,nasm))) | |
689 | + | (home-page "https://github.com/airbus-seclab/bincat") | |
690 | + | (synopsis "") | |
691 | + | (description "") | |
692 | + | (license license:lgpl2.1+))) | |
693 | + |